cloudflare / cloudflare/developer-platform
Workers AI: need opt-out for NSFW content filter on image generation models
- 主要言語
- 言語のデータがありません
- スター
- 1
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
コントリビューションガイド
調査の方向性
まず SDK のテストと PR 396 で参照されている binding-path の動作を確認し、次に画像生成パラメーターが一覧にある Flux モデルへどのように到達するかを追跡します。これらのモデルで任意のオプトアウトまたはチューニングパラメーターがサポートされ、既存のフィルタリング動作がデフォルトで引き続き利用できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- ai, cloud
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100