cloudflare / cloudflare/developer-platform

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

Offen
#58 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
product:workers-ai
Vorherrschende Sprache
Keine Sprachdaten
Sterne
1
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die SDK-Tests und das in PR 396 referenzierte Verhalten des binding-path zu prüfen, und verfolge dann, wie Parameter für die Bildgenerierung die aufgeführten Flux-Modelle erreichen. Als abgeschlossen gilt die Unterstützung eines optionalen Opt-out- oder Tuning-Parameters für diese Modelle, während das bestehende Filterverhalten standardmäßig verfügbar bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
ai, cloud
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.