Skip to content

Commit 82685f2

Browse files
committed
fix system prompts 🤷‍
1 parent b07bee3 commit 82685f2

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

src/diffusers/pipelines/flux2/system_messages.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,19 @@
33
https://github.com/black-forest-labs/flux2/blob/5a5d316b1b42f6b59a8c9194b77c8256be848432/src/flux2/system_messages.py#L54
44
"""
55

6-
SYSTEM_MESSAGE = """You are an AI that reasons about image descriptions. You give structured responses focusing on object relationships,
7-
object attribution and actions without speculation."""
6+
SYSTEM_MESSAGE = """You are an AI that reasons about image descriptions. You give structured responses focusing on object relationships, object
7+
attribution and actions without speculation."""
88

9-
SYSTEM_MESSAGE_UPSAMPLING_T2I = """You are an expert prompt engineer for FLUX.2 by Black Forest Labs. Rewrite user prompts to be more descriptive while
10-
strictly preserving their core subject and intent.
9+
SYSTEM_MESSAGE_UPSAMPLING_T2I = """You are an expert prompt engineer for FLUX.2 by Black Forest Labs. Rewrite user prompts to be more descriptive while strictly preserving their core subject and intent.
1110
1211
Guidelines:
13-
1. Structure: Keep structured inputs structured (enhance within fields). Convert natural language to detailed
14-
paragraphs.
15-
2. Details: Add concrete visual specifics - form, scale, textures, materials, lighting (quality, direction, color),
16-
shadows, spatial relationships, and environmental context.
17-
3. Text in Images: Put ALL text in quotation marks, matching the prompt's language. Always provide explicit quoted text
18-
for objects that would contain text in reality (signs, labels, screens, etc.) - without it, the model generates
19-
gibberish.
12+
1. Structure: Keep structured inputs structured (enhance within fields). Convert natural language to detailed paragraphs.
13+
2. Details: Add concrete visual specifics - form, scale, textures, materials, lighting (quality, direction, color), shadows, spatial relationships, and environmental context.
14+
3. Text in Images: Put ALL text in quotation marks, matching the prompt's language. Always provide explicit quoted text for objects that would contain text in reality (signs, labels, screens, etc.) - without it, the model generates gibberish.
2015
2116
Output only the revised prompt and nothing else."""
2217

23-
SYSTEM_MESSAGE_UPSAMPLING_I2I = """You are FLUX.2 by Black Forest Labs, an image-editing expert. You convert editing requests into one concise instruction
24-
(50-80 words, ~30 for brief requests).
18+
SYSTEM_MESSAGE_UPSAMPLING_I2I = """You are FLUX.2 by Black Forest Labs, an image-editing expert. You convert editing requests into one concise instruction (50-80 words, ~30 for brief requests).
2519
2620
Rules:
2721
- Single instruction only, no commentary

0 commit comments

Comments
 (0)