FLUX.2 JSON Prompt Generator
FLUX.2 speaks JSON — this node writes the prompt for you
- json_prompt
- formatted_prompt
- camera_settings
- json_to_clip_prompt
FLUX.2 moved away from the single free-text prompt your SD1.5 habits expect - it wants a structured JSON prompt with camera, scene, subject, style, lighting, and composition as separate fields. Typing that by hand every run is misery. This node is a giant form that assembles it for you, and here's the part that surprises people: it calls no API and needs no key. The name sounds like an LLM wrapper, but it's pure offline string assembly with a big pile of curated presets.
Open it and you'll see a long list of dropdowns - camera_preset, style_preset, lighting_preset, mood_preset, background_preset, composition_preset, focus_preset, lens_preset, f_number_preset, iso_preset, camera angle/distance/model - each with genuinely curated options, from "Kodachrome 1960s" film looks to "DJI Inspire 3 aerial" to "2000s digicam style." The defaults even ship a full sample product shot: a ceramic coffee mug with steam, studio three-point lighting, f/5.6, Sony A7IV.
How it's structured
Every preset has a matching *_text_override field, and the rule is consistent: a non-empty override wins over its preset. So you can lean on presets for 90% of a shot and hand-type the one thing that matters - scene, style_text_override, background, whatever.
subject_count- number of subjects (0–10), parsed as int. Onlysubject_1_*is required; subjects 2–5 are optional inputs you add as needed, each with description, position, action, pose, and color palette.color_hex_1throughcolor_hex_5- exact hex colors for the palette.include_shot_on_prefix- whether to prepend "Shot on [camera]" to the natural-language version.enable_prompt_expansion- this one is a trap in the fun way: the tooltip itself admits it's a no-op, "reserved for future auto-expansion." Leave it off.
Four outputs, and which you want depends on where the prompt goes:
json_prompt- the structured JSON, pretty-printed.formatted_prompt- a readable natural-language version of the same shot.camera_settings- just the camera block, e.g.Sony A7IV | 85mm | f/5.6 | ISO 200.json_to_clip_prompt- a flattened version meant for the CLIP/text-encoder input when your workflow expects a plain string.
Wire json_prompt (or json_to_clip_prompt) into your FLUX.2 conditioning/text-encode node. That's the whole loop.
Install
Same as every node in this pack - Manager, search TBG Takeaways, install, restart:
cd ComfyUI/custom_nodes
git clone https://github.com/Ltamann/ComfyUI-TBG-Takeaways
Restart, find it under TBG/Takeaways. No dependencies, no downloads.
Reach for this if you're building FLUX.2 product/editorial shots and want the structured prompt without memorizing the schema. Skip it if you're on FLUX.1 or SD-class models - the JSON prompt schema is FLUX.2's thing. And fair warning: it's a Patreon side-project, so the huge preset list is the polish and there's no doc beyond the tooltips. But for offline, schema-safe FLUX.2 prompting, it does exactly what it says.
Inputs (63)
| Name | Type | Default | Description |
|---|---|---|---|
| camera_preset | COMBO | Sony A7IV - 85mm f/5.6 ISO200 (Product/Portrait) | Camera presets with model, lens, f-number, ISO. |
| scene_preset | COMBO | Professional studio product photography setup with polished concrete surface | Pre-made scene descriptions or Custom. |
| scene | STRING | Scene description. Overrides scene_preset when non-empty. | |
| subject_count | STRING | 1 | Number of subjects (0-10). Parsed as int; invalid values default to 1. |
| subject_1_description | STRING | Minimalist ceramic coffee mug with steam rising from hot coffee inside | Subject 1 description. |
| subject_1_position | STRING | Center foreground on polished concrete surface | Subject 1 position in frame. |
| subject_1_action | STRING | Stationary on surface | Subject 1 action. |
| subject_1_pose | STRING | Subject 1 pose (optional). | |
| subject_1_color_palette | STRING | Subject 1 colors (#hex, comma-separated). | |
| style_preset | COMBO | Ultra-realistic product photography with commercial quality | Style preset. |
| style_text_override | STRING | Custom style text. Overrides style_preset when non-empty. | |
| lighting_preset | COMBO | Studio three-point lighting - professional setup, key fill rim lights | Lighting preset. |
| lighting_text_override | STRING | Custom lighting. Overrides lighting_preset. | |
| mood_preset | COMBO | Clean, professional, minimalist | Mood preset. |
| mood_text_override | STRING | Custom mood. Overrides mood_preset. | |
| background_preset | COMBO | Polished concrete surface with studio backdrop | Background preset. |
| background | STRING | Background description. Overrides background_preset. | |
| composition_preset | COMBO | Rule of thirds (classic balanced) | Composition preset. |
| composition_text_override | STRING | Custom composition. Overrides preset. | |
| camera_model_preset | COMBO | Sony A7IV | Camera model preset. |
| camera_model_text_override | STRING | Custom camera model. Overrides preset. | |
| camera_angle_preset | COMBO | High angle (looking down) | Camera angle preset. |
| camera_angle_text_override | STRING | Custom camera angle. Overrides preset. | |
| camera_distance_preset | COMBO | Medium shot (waist up) | Camera distance preset. |
| camera_distance_text_override | STRING | Custom camera distance. Overrides preset. | |
| focus_preset | COMBO | Sharp focus on steam rising from coffee and mug details | Focus preset. |
| focus_text_override | STRING | Custom focus. Overrides preset. | |
| lens_preset | COMBO | 85mm portrait lens | Lens preset. |
| lens_text_override | STRING | Custom lens. Overrides preset. | |
| f_number_preset | COMBO | f/5.6 (product standard) | Aperture preset. |
| f_number_text_override | STRING | Custom f-number. Overrides preset. | |
| iso_preset | COMBO | 200 (studio/outdoors) | ISO preset. |
| iso_text_override | STRING | Custom ISO. Overrides preset. | |
| lens_mm | STRING | 0 | Lens focal length in mm. 0 or empty = use preset or omit. |
| shutter_speed | STRING | Shutter speed (optional), e.g. 1/125. | |
| color_hex_1 | STRING | Primary hex color (e.g. #FF5733). | |
| color_hex_2 | STRING | Secondary hex color. | |
| color_hex_3 | STRING | Tertiary hex color. | |
| color_hex_4 | STRING | Accent hex color 1. | |
| color_hex_5 | STRING | Accent hex color 2. | |
| include_shot_on_prefix | BOOLEAN | true | Add 'Shot on [camera]' prefix to formatted prompt. |
| enable_prompt_expansion | BOOLEAN | false | Reserved for future auto-expansion (no-op now). |
| subject_2_descriptionopt | STRING | Subject 2 description (optional). | |
| subject_2_positionopt | STRING | Subject 2 position. | |
| subject_2_actionopt | STRING | Subject 2 action. | |
| subject_2_poseopt | STRING | Subject 2 pose. | |
| subject_2_color_paletteopt | STRING | Subject 2 colors. | |
| subject_3_descriptionopt | STRING | Subject 3 description. | |
| subject_3_positionopt | STRING | Subject 3 position | |
| subject_3_actionopt | STRING | Subject 3 action | |
| subject_3_poseopt | STRING | Subject 3 pose | |
| subject_3_color_paletteopt | STRING | Subject 3 colors | |
| subject_4_descriptionopt | STRING | Subject 4 description. | |
| subject_4_positionopt | STRING | Subject 4 position | |
| subject_4_actionopt | STRING | Subject 4 action | |
| subject_4_poseopt | STRING | Subject 4 pose | |
| subject_4_color_paletteopt | STRING | Subject 4 colors | |
| subject_5_descriptionopt | STRING | Subject 5 description. | |
| subject_5_positionopt | STRING | Subject 5 position | |
| subject_5_actionopt | STRING | Subject 5 action | |
| subject_5_poseopt | STRING | Subject 5 pose | |
| subject_5_color_paletteopt | STRING | Subject 5 colors | |
| additional_json_fieldsopt | STRING | Extra JSON object merged into final output (advanced). |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| json_prompt | STRING | — |
| formatted_prompt | STRING | — |
| camera_settings | STRING | — |
| json_to_clip_prompt | STRING | — |