Skip to main content
FLUX 3.1 Image is Black Forest Labs’ photoreal image model, available in ComfyUI as a Partner Node. It generates an image from a prompt or edits one you supply, and accepts up to 10 reference images, or 9 with a mask, and boxes from Create Bounding Boxes. Three templates cover text to image, instruction edit, and bounding-box edit.

What FLUX 3.1 Image is good at

  • Text to image: renders a prompt at sixteen aspect ratios and resolutions from 1K to 4K
  • Instruction edits: describe one change and keep the rest of the photo as it is
  • Many references: up to 10 images, or 9 when a mask is connected, addressed as image 1, image 2, and so on
  • Masks: white areas may change, black areas stay untouched
  • Boxes: place an object or a line of text where you draw it, up to 32 boxes
  • Quality or fast mode: quality is better at text, many references and fine detail, fast costs less
  • Grounding: auto searches the web when the prompt names a real place or product

Use it

Call it from code

Call it over HTTP through Comfy Router, with copy-paste Python, TypeScript, Swift and cURL snippets
This node runs through the Black Forest Labs API, so it needs a Comfy account with credits and downloads no local model. The Router call bills the same credits. See Partner Nodes pricing for per-image rates and Concurrency limits for how many requests you can have in flight.
To use the Partner Nodes, you need to ensure that you are logged in properly and using a permitted network environment. Please refer to the Partner Nodes Overview section of the documentation to understand the specific requirements for using the Partner Nodes.
Make sure your ComfyUI is updated.Workflows in this guide can be found in the Workflow Templates. If you can’t find them in the template, your ComfyUI may be outdated.If nodes are missing when loading a workflow, possible reasons:
  1. You are not using the latest ComfyUI version (Nightly version)
  2. Some nodes failed to import at startup

Text to image

Generate an image from a prompt. No input files are required. FLUX 3.1 Image text to image workflow

Download Workflow

Download JSON or search “FLUX 3.1 Image: Text to Image” in Template Library
  1. Write the prompt in the FLUX 3.1 Image node
  2. Set mode to quality or fast, then pick a resolution from 1K to 4K
  3. Leave aspect_ratio on auto unless you want a specific frame, and grounding on auto
  4. Click Queue

Instruction edit

Describe one change and say what must stay. The node expands the prompt and repaints what you describe; anything you leave unnamed can change too. FLUX 3.1 Image instruction edit workflow

Download Workflow

Download JSON or search “FLUX 3.1 Image: Image Edit” in Template Library
  1. Load your photo into image_1, and add references with the Autogrow slots, up to 10, or 9 when a mask is connected
  2. Name each connected image in the prompt as image 1, image 2, and so on
  3. State the change, then close with what must stay: “keep her face and the shirt exactly as they are”. Anything you do not name can be repainted
  4. The template sets both aspect_ratio and resolution to match image 1, which keeps the framing and size of image 1. That input must be at least 0.25 megapixels and no wider than 8:1, and anything above 4096x4096 is reduced first, so prepare a supported input before chaining edits
  5. Click Queue

Bounding-box edit

Draw a box over the area to change and describe what happens inside it. Boxes tell the model where to place something; they do not clip the frame, so light and shadows outside a box can still shift. FLUX 3.1 Image bounding box edit workflow

Download Workflow

Download JSON or search “FLUX 3.1 Image: Bounding Box Edit” in Template Library
  1. Load the photo into image_1
  2. Draw boxes in Create Bounding Boxes and write the change into each box’s description. Describe background boxes first and foreground boxes last
  3. Set the canvas width and height in Create Bounding Boxes to the aspect ratio of the output. The box grid stretches with the frame, so a mismatched canvas puts boxes in the wrong place
  4. Write the overall rule in the prompt, for example “change only what the boxes describe, keep everything else as it is”. The node reads the boxes as <box_1>, <box_2>, in row order
  5. Click Queue
A box you click without dragging has zero size, so the node expands it to 10% of the frame in each collapsed direction. Give a new element a box you actually drag. To change several things, draw several boxes. When the pixels around the box must stay exactly as they are, connect a mask with the edit area in white and the surrounding pixels in black.

Get started

  1. Update ComfyUI to the latest version (0.47.2 or later)
  2. Open the Template Library and search for FLUX 3.1 Image
  3. Drag a template onto the canvas, replace the sample input if it has one, then click Queue