Nodes/DiffSynth-ComfyUI/DiffSynth: FLUX Inference
ComfyUI Node

DiffSynth: FLUX Inference

FLUX Inference — the node with thirty-odd sockets, explained

By modelscope·Created about a month ago·Updated a day ago· 8
DiffSynth: FLUX Inference
  • pipe
  • input_image
  • kontext_images
  • controlnet_inputs
  • ipadapter_images
  • eligen_entity_masks
  • infinityou_id_image
  • flex_inpaint_image
  • flex_inpaint_mask
  • flex_control_image
  • value_controller_inputs
  • step1x_reference_image
  • nexus_gen_reference_image
  • flux_fill_image
  • flux_fill_mask
  • flux_redux_image
  • insert_anything_source_image
  • insert_anything_source_mask
  • insert_anything_ref_image
  • insert_anything_ref_mask
  • image
◄prompt►
◄seed0►
◄num_inference_steps30►
◄height1024►
◄width1024►
◄negative_prompt►
◄cfg_scale1.0►
◄embedded_guidance3.5►
◄t5_sequence_length512►
◄denoising_strength1.0►
◄sigma_shift0.0►
◄ipadapter_scale1.0►
◄eligen_entity_prompts►
◄eligen_enable_on_negativefalse►
◄eligen_enable_inpaintfalse►
◄infinityou_guidance1.0►
◄flex_control_strength0.5►
◄flex_control_stop0.5►
◄lora_encoder_inputs►
◄lora_encoder_scale1.0►
◄tea_cache_l1_thresh0.0►
◄tiledfalse►
◄tile_size128►
◄tile_stride64►

Open this node and you'll count more optional sockets than most packs have nodes. Don't panic. The pack generated these inputs by introspecting the DiffSynth FLUX pipeline's call signature, and that pipeline fronts the whole FLUX.1-era zoo: dev, Schnell, Kontext, Fill, Redux, Flex.2, ControlNet, IP-Adapter, Step1X, NexusGen, Insert-Anything. You are meant to wire the two or three that your checkpoint supports and leave the rest empty - unconnected sockets are simply not passed to the pipeline, so they cost nothing.

Required: pipe (from the FLUX Loader), prompt, seed, num_inference_steps (default 30), height, width. Output: image.

The four that matter on a plain dev run

  • embedded_guidance - default 3.5, and this is FLUX.1-dev's real control. The dev checkpoint is guidance-distilled: this value is the guidance, delivered through the conditioning rather than a second network pass.
  • cfg_scale - default 1. Leave it there while you're on dev or Schnell. Above 1 you're paying for an unconditional pass the model wasn't built around, and on the distilled variants that means a burnt image and double the time.
  • t5_sequence_length - default 512, the T5 encoder's token budget. Long prompts get truncated at this. Raising it costs a little speed and buys room for detailed scene descriptions.
  • num_inference_steps - dev wants 20-30, Schnell wants 4. Watch tea_cache_l1_thresh too: 0 by default, which is off; nudge it up when you want the caching speedup and can accept a small quality trade.

The rest, grouped so the list makes sense

Image in: input_image + denoising_strength is plain img2img (strength 1.0 means "ignore the input", so start around 0.5). kontext_images is the instruction-editing path - Kontext checkpoints read that socket as the thing to edit. ipadapter_images with ipadapter_scale (default 1) is style reference, and it only does anything if the pipeline you loaded actually has IP-Adapter attached.

Inpainting and fill: flux_fill_image + flux_fill_mask for the Fill checkpoints, flex_inpaint_image + flex_inpaint_mask for Flex, and insert_anything_source_image / _source_mask / _ref_image / _ref_mask for the Insert-Anything variant. If you can't tell which pair your checkpoint wants, you're on the wrong checkpoint.

Control-shaped: controlnet_inputs and value_controller_inputs are wildcard sockets - the pack leaves them untyped, so you hand the pipeline whatever the variant expects. flex_control_image with flex_control_strength and flex_control_stop (0.5 each) is Flex.2's native control, and step1x_reference_image and nexus_gen_reference_image are the same idea for those variants.

Long-tail experiments: eligen_entity_prompts / eligen_entity_masks / eligen_enable_on_negative / eligen_enable_inpaint (region-guided prompting), infinityou_id_image with infinityou_guidance (identity reference), flux_redux_image (Redux), lora_encoder_inputs with lora_encoder_scale (a LoRA-direct encoder path), and sigma_shift.

Tiling: tiled with tile_size (128) and tile_stride (64) - for large canvases on small cards, at the usual cost of seams.

Install

# Manager: search "DiffSynth-ComfyUI" → Install → restart
pip install git+https://github.com/modelscope/DiffSynth-Studio.git
cd ComfyUI/custom_nodes && git clone https://github.com/modelscope/DiffSynth-ComfyUI.git

Template tab → DiffSynth FLUX workflows (dev and Flex.2 preview both ship) is the honest starting point: it's a lot of sockets and a template that already selects the right three is worth more than any explanation. Worth knowing you're on a niche path - across two years of Reddit I found about 190 threads mentioning DiffSynth at all and two naming this ComfyUI plugin, so a workflow you find online was almost certainly built for other FLUX nodes.

Troubleshooting

Deep-fried output: cfg_scale above 1 on a distilled checkpoint. Burnt and slow: the same thing. Reference image ignored: you edited the prompt instead of wiring kontext_images or ipadapter_images, or you loaded a checkpoint that doesn't implement the path. Tiling seams: raise tile_stride toward tile_size so neighbouring tiles overlap more. And every "nothing happens, no nodes" report on this pack has the same cause - DiffSynth-Studio isn't installed, so the plugin's import fails and it registers no nodes at all.

CategoryDiffSynth/inference

Inputs (44)

NameTypeDefaultDescription
pipeDIFFSYNTH_PIPE—
promptSTRING—
seedINT00–4294967295—
num_inference_stepsINT301–200—
heightINT102464–4096—
widthINT102464–4096—
negative_promptoptSTRING—
cfg_scaleoptFLOAT1.00–10000—
embedded_guidanceoptFLOAT3.50–10000—
t5_sequence_lengthoptINT5120–4294967295—
input_imageoptIMAGE—
denoising_strengthoptFLOAT1.00–10000—
sigma_shiftoptFLOAT0.00–10000—
kontext_imagesoptIMAGE—
controlnet_inputsopt*—
ipadapter_imagesoptIMAGE—
ipadapter_scaleoptFLOAT1.00–10000—
eligen_entity_promptsoptSTRING—
eligen_entity_masksoptIMAGE—
eligen_enable_on_negativeoptBOOLEANfalse—
eligen_enable_inpaintoptBOOLEANfalse—
infinityou_id_imageoptIMAGE—
infinityou_guidanceoptFLOAT1.00–10000—
flex_inpaint_imageoptIMAGE—
flex_inpaint_maskoptIMAGE—
flex_control_imageoptIMAGE—
flex_control_strengthoptFLOAT0.50–10000—
flex_control_stopoptFLOAT0.50–10000—
value_controller_inputsopt*—
step1x_reference_imageoptIMAGE—
nexus_gen_reference_imageoptIMAGE—
lora_encoder_inputsoptSTRING—
lora_encoder_scaleoptFLOAT1.00–10000—
flux_fill_imageoptIMAGE—
flux_fill_maskoptIMAGE—
flux_redux_imageoptIMAGE—
insert_anything_source_imageoptIMAGE—
insert_anything_source_maskoptIMAGE—
insert_anything_ref_imageoptIMAGE—
insert_anything_ref_maskoptIMAGE—
tea_cache_l1_threshoptFLOAT0.00–10000—
tiledoptBOOLEANfalse—
tile_sizeoptINT1280–4294967295—
tile_strideoptINT640–4294967295—

Outputs (1)

NameTypeDescription
imageIMAGE—