Building a Production Image Workflow
- Assemble a full production workflow combining FLUX with ControlNet, LoRA, FaceDetailer, and upscaling.
- Organize nodes into color-coded groups with descriptive labels for reuse and maintainability.
- Save the completed workflow as a JSON template for future projects.
From Scattered Techniques to a Single Template
Each lesson in this track taught one technique in isolation. In real production work, you combine them: a FLUX checkpoint for quality, ControlNet for composition control, a LoRA for style, FaceDetailer for face repair, and a 4x upscale for the final export. Wired together correctly, this runs as a single-click workflow that takes you from a prompt and reference image to a production-ready 2048×2048 output.
This lesson builds that full pipeline. By the end you will have a reusable template that can be adapted for any image production task by swapping the checkpoint, LoRA, ControlNet type, and prompts — without rebuilding the node graph from scratch.
Planning the Node Graph
Before adding nodes, map out what the workflow needs to do:
- Load: FLUX checkpoint, ControlNet model, LoRA, upscale model, reference images (structure + face)
- Condition: positive and negative text prompts, ControlNet conditioning, IPAdapter or PuLID identity
- Sample: KSampler at base resolution (1024×1024)
- Decode: VAE Decode to pixel image
- Restore: FaceDetailer to fix any distorted faces
- Upscale: 4x-UltraSharp model upscale
- Detail pass: optional low-denoise KSampler pass at 4x resolution
- Save: Save Image with filename prefix
This eight-stage structure becomes your group structure — one group per stage, each group color-coded.
Assembling the Node Graph Step by Step
Stage 1 — Loaders (purple group):
- Load Checkpoint: select your FLUX checkpoint
- Load ControlNet Model: select depth or canny ControlNet for FLUX
- Load LoRA: connect MODEL and CLIP from Load Checkpoint; select your style LoRA at weight 0.6
- Load Upscale Model: select 4x-UltraSharp
Stage 2 — Conditioning (orange group):
- Two CLIP Text Encode nodes (positive and negative) connected to Load LoRA CLIP output
- Load Image (structure reference) → Depth or Canny preprocessor → Apply ControlNet → modified positive conditioning
- If using PuLID: Load Image (face reference) → Apply PuLID → modified MODEL output replaces Load LoRA MODEL
Stage 3 — Base generation (teal group):
- Empty Latent Image: 1024×1024, batch size 1
- KSampler: model from LoRA (or PuLID), positive from Apply ControlNet, negative from CLIP Text Encode; steps 25, CFG 1.0, euler, simple, denoise 1.0
Stage 4 — First decode (blue group):
- VAE Decode: connects KSampler LATENT and Load Checkpoint VAE
- Preview Image: lets you check the base result before committing to the rest of the pipeline
Stage 5 — Face restoration (red group):
- UltraBBoxDetector: set to face_yolov8m.pt
- FaceDetailer: image from VAE Decode; model/clip/vae from Load Checkpoint; conditioning from CLIP Text Encode nodes; guide_size 512, denoise 0.45
Stage 6 — Upscale (green group):
- Upscale Image With Model: connects FaceDetailer IMAGE and Load Upscale Model upscale_model
Stage 7 — Detail pass (yellow group, optional):
- VAE Encode: encodes the 4x image back to latent space for the detail pass
- KSampler (detail): same model/conditioning as Stage 3; denoise 0.35; same steps
- VAE Decode: decodes the detail-pass latent to final image
Stage 8 — Output (gray group):
- Save Image: set filename_prefix to describe the project
Organizing with Groups and Colors
Select the nodes for each stage by box-selecting them, then right-click and choose "Group Nodes." Name each group (double-click the group title). Use consistent colors: purple for loaders, orange for conditioning, teal for sampling, blue for decoding, red for restoration, green for upscaling, yellow for optional detail, gray for output.
Add Note nodes (right-click → Add Node → Note) next to any group that has non-obvious settings. Document your LoRA choice, the ControlNet model name, and the reference image used. This documentation makes the workflow usable six months later when you don't remember what it was built for.
Saving and Sharing the Workflow
Export the workflow as a JSON file: click the Save button (or use Ctrl+S) and save with a descriptive name. The JSON file stores every node, every connection, and every parameter value. Anyone with the same custom nodes and model files can load it and run it immediately.
For sharing on OpenArt or CivitAI: workflows with complex custom nodes work best when shared with a clear list of required nodes and models in the description. Others need to install the same Manager packages and download the same model files.
Keep a workflows/ folder in your ComfyUI directory organized by project type: character_consistency.json, product_photography.json, concept_art.json. These templates become your production toolkit — start any new project by loading the closest template and swapping only what needs to change.
- A production workflow has eight stages: load, condition, sample, decode, restore, upscale, optional detail pass, and save — each stage maps to one color-coded group in the node canvas.
- FaceDetailer runs before upscaling because fixing faces at base resolution is faster and more consistent than running face detection on a 4x-enlarged image.
- An optional low-denoise detail pass (denoise 0.35) after the 4x upscale adds diffusion-generated fine-grain detail that the upscale model cannot produce on its own.
- Group nodes by stage and label each group — this transforms a tangle of wires into a self-documenting workflow you can load months later and immediately understand.
- Save the completed workflow as a JSON template and maintain a folder of named templates — starting a new project from a working template and swapping checkpoints and prompts is faster than rebuilding from scratch every time.