From cd0034cd997335cb5f55fff36114b2dc00d119f1 Mon Sep 17 00:00:00 2001 From: William Gill Date: Sun, 19 Apr 2026 12:39:24 -0500 Subject: [PATCH] Flesh out per-style negatives in smart_image_gen Tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each style now gets a proper baseline covering quality, anatomy, and watermark/signature suppression — plus the appropriate style-leak guards (no-cartoon for photo, no-human for furry, score_4–6 suppression for pony). Quality terms only; no NSFW filtering by default since several checkpoints in this set are commonly used for adult work and would fight a baked-in content filter. If SFW-by-default is wanted, add an explicit safe-mode flag rather than expanding NEGATIVES. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../openwebui-tools/smart_image_gen.py | 66 ++++++++++++++++--- 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/deployments/ai-stack/openwebui-tools/smart_image_gen.py b/deployments/ai-stack/openwebui-tools/smart_image_gen.py index f3711ee..94985c7 100644 --- a/deployments/ai-stack/openwebui-tools/smart_image_gen.py +++ b/deployments/ai-stack/openwebui-tools/smart_image_gen.py @@ -31,15 +31,65 @@ CHECKPOINTS = { "furry-il": "novaFurryXL_ilV170.safetensors", } -# Style-specific negative prompts. Appended to whatever the caller supplies. +# Style-specific negative prompts. Always applied as the baseline; whatever +# the caller supplies via `negative_prompt` is appended on top. +# +# Quality-focused only — no NSFW or content filtering by default. If you +# want SFW-by-default, add an explicit safe-mode flag rather than baking +# content terms in here (some checkpoints in this set are commonly used +# for adult work and would fight the negative). NEGATIVES = { - "photo": "cartoon, drawing, illustration, anime, painting, sketch, lowres, blurry", - "juggernaut": "cartoon, drawing, illustration, anime, painting, sketch, lowres, blurry", - "pony": "score_6, score_5, score_4, lowres, blurry, worst quality, bad anatomy", - "general": "lowres, blurry, jpeg artifacts, watermark, text, signature", - "furry-nai": "human, lowres, blurry, worst quality, bad anatomy", - "furry-noob": "human, lowres, blurry, worst quality, bad anatomy", - "furry-il": "human, lowres, blurry, worst quality, bad anatomy", + "photo": ( + "cartoon, drawing, illustration, anime, manga, painting, sketch, " + "render, 3d, cgi, watercolor, plastic skin, doll-like, oversaturated, " + "lowres, blurry, jpeg artifacts, noisy, grainy, low quality, worst quality, " + "bad anatomy, deformed, mutated, extra limbs, extra fingers, missing fingers, " + "fused fingers, malformed hands, asymmetric face, " + "watermark, signature, text, logo, username" + ), + "juggernaut": ( + "cartoon, drawing, illustration, anime, manga, painting, sketch, " + "render, 3d, cgi, plastic skin, washed out, oversaturated, " + "lowres, blurry, jpeg artifacts, low quality, worst quality, " + "bad anatomy, deformed, mutated, extra limbs, extra fingers, missing fingers, " + "fused fingers, malformed hands, " + "watermark, signature, text, logo, username" + ), + "pony": ( + "score_6, score_5, score_4, " + "worst quality, low quality, lowres, blurry, jpeg artifacts, noisy, " + "bad anatomy, bad proportions, bad hands, extra digit, fewer digits, " + "fused fingers, malformed limbs, deformed, ugly, " + "censored, monochrome, " + "watermark, signature, text, logo, artist name, patreon username, twitter username" + ), + "general": ( + "lowres, blurry, jpeg artifacts, noisy, grainy, low quality, worst quality, " + "bad anatomy, deformed, mutated, extra limbs, missing fingers, fused fingers, " + "malformed hands, ugly, " + "watermark, signature, text, logo" + ), + "furry-nai": ( + "human, realistic, photorealistic, 3d, cgi, " + "worst quality, low quality, lowres, blurry, jpeg artifacts, noisy, " + "bad anatomy, bad proportions, extra digit, fewer digits, fused fingers, " + "malformed limbs, deformed, ugly, " + "watermark, signature, text, logo, artist signature, patreon username" + ), + "furry-noob": ( + "human, realistic, photorealistic, 3d, cgi, " + "worst quality, low quality, lowres, blurry, jpeg artifacts, noisy, " + "bad anatomy, bad proportions, extra digit, fewer digits, fused fingers, " + "malformed limbs, deformed, ugly, " + "watermark, signature, text, logo, artist signature, patreon username" + ), + "furry-il": ( + "human, realistic, photorealistic, 3d, cgi, " + "worst quality, low quality, lowres, blurry, jpeg artifacts, noisy, " + "bad anatomy, bad proportions, extra digit, fewer digits, fused fingers, " + "malformed limbs, deformed, ugly, " + "watermark, signature, text, logo, artist signature, patreon username" + ), } # First-match-wins keyword router used when the caller didn't pick a style.