cloudflare / cloudflare/developer-platform

Workers AI: need opt-out for NSFW content filter on image generation models

Đang mở
#58 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
product:workers-ai
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
1
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The NSFW content filter on Flux image models (flux-1-schnell, flux-2-klein-4b, flux-2-klein-9b) has aggressive false positives that make these models unusable for production workloads.

**The problem**: single words like "hamburger", portrait descriptions like "a man in his late 50s wearing a suit", and other completely benign prompts trigger error 3030 (`AiError: Input prompt contains NSFW content`). There is no parameter to disable or tune the filter sensitivity.

I'm using `@cf/black-forest-labs/flux-2-klein-9b` for generating logo text via img2img. Completely innocuous brand names get flagged with no recourse. Adding more context to prompts helps sometimes but is not reliable. This makes Workers AI image generation impossible to depend on for any user-facing feature.

Your own SDK tests acknowledge this. From https://github.com/cloudflare/ai/pull/396:

> Flux 1 Schnell content filter has intermittent false positives on innocuous prompts. We changed the test prompt but it still occasionally triggers via the binding path.

The Cloudflare community thread has been open since Oct 2024 with many reports and no resolution: https://community.cloudflare.com/t/image-rendering-issue-with-flux-api-nsfw-warning/729440

**Request**: add an optional parameter (e.g. `skip_content_filter: true` or `content_filter: "off"`) to image generation models so developers can opt out of the filter when their use case doesn't require it.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng việc xem xét các bài kiểm thử SDK và hành vi của binding-path được tham chiếu trong PR 396, sau đó theo dõi cách các tham số tạo ảnh đến được các model Flux được liệt kê. Công việc được xem là hoàn thành khi các model đó hỗ trợ một tham số tùy chọn để opt-out hoặc tinh chỉnh, đồng thời hành vi lọc hiện có vẫn mặc định khả dụng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
ai, cloud
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.