Five complete ComfyUI builds, each based on an official template or example with its documented settings: an SDXL render where the refiner takes over at step 20 of 25, a posed character with a LoRA and a two-pass ControlNet, a reference-image edit with the Apache 2.0 Qwen-Image-Edit-2511, a finishing upscale with SeedVR2 or Ultimate SD Upscale, and a Python script that batch-renders a prompt list through the local API.
Checked against ComfyUI's documentation, official templates and example workflows on October 1, 2026, when v0.38.0 was the latest ComfyUI release. Settings quoted below come from those examples. This page gives complete builds; our advanced ComfyUI techniques explainer covers what each technique does. This update replaces the January 2026 version, whose refiner settings, LoRA strength charts and model recommendations were not sourced.
Before you start
- Update ComfyUI. Every build starts from an official template or example. Templates check for missing model files and link to them (templates guide).
- Enable ComfyUI-Manager for the one custom node used here, Ultimate SD Upscale. See our ComfyUI-Manager guide if it is missing.
- Check disk space and licenses. File sizes below come from each file's Hugging Face page, and licenses from each model card.
| Build | Models | Model license | Custom nodes |
|---|---|---|---|
| 1. SDXL base plus refiner | SDXL 1.0 base and refiner | CreativeML Open RAIL++-M | None |
| 2. Posed character | SD1.5 checkpoints, OpenPose ControlNet 1.1, your LoRA | CreativeML OpenRAIL-M; ControlNet 1.1 OpenRAIL; community models vary | None, or a preprocessor pack to extract poses |
| 3. Reference edit | Qwen-Image-Edit-2511 | Apache 2.0 | None |
| 4. Finish and upscale | SeedVR2, or your checkpoint | Apache 2.0 (SeedVR2) | Ultimate SD Upscale (option B only) |
| 5. Batch through the API | Any tested workflow | Same as the workflow | None |
Build 1: SDXL base plus refiner
Goal: a 1024-pixel SDXL image where the refiner model finishes the last steps. Load it by dragging the refiner example image from ComfyUI's SDXL examples page onto the canvas; the workflow is embedded in the image.
sd_xl_base_1.0.safetensors(6.94 GB) andsd_xl_refiner_1.0.safetensors(6.08 GB) inmodels/checkpoints, both under CreativeML Open RAIL++-M (base, refiner).
- Base stage: Load Checkpoint (base), positive and negative CLIP Text Encode, and Empty Latent Image at 1024 by 1024.
- Base sampler: KSamplerAdvanced with add_noise enabled, 25 steps, start_at_step 0, end_at_step 20 and return_with_leftover_noise enabled.
- Refiner stage: Load Checkpoint (refiner) with its own positive and negative CLIP Text Encode nodes, because the refiner uses its own text encoder.
- Refiner sampler: KSamplerAdvanced with add_noise disabled, the same 25 steps, start_at_step 20, end_at_step 10000 (run to the end) and return_with_leftover_noise disabled, fed with the base sampler's latent.
- Output: VAE Decode with the refiner's VAE, then Save Image.
Both samplers in the official example use cfg 8, the euler sampler and the normal scheduler. The examples page recommends 1024 by 1024 or another size with the same pixel count, such as 896 by 1152 or 1536 by 640.
Why it works: the base sampler stops at step 20 and passes on a latent that still holds noise, and the refiner finishes the same schedule instead of starting a new one. That is why the refiner has no denoise setting to tune. To change the split, move both handoff numbers together. If you use an SDXL fine-tune instead of the base model, check its model card before adding the refiner, and compare with and without it at a fixed seed.
Build 2: A posed character with a LoRA and a two-pass ControlNet
Goal: your character in a chosen pose, refined at a higher resolution. Start from Comfy's pose ControlNet two-pass example, built on SD1.5 models, and add your character LoRA.
control_v11p_sd15_openpose_fp16.safetensors(0.72 GB) inmodels/controlnet.vae-ft-mse-840000-ema-pruned.safetensors(0.33 GB, MIT) inmodels/vae.- Two SD1.5 checkpoints in
models/checkpoints. The example uses community checkpoints from Civitai, so check each one's license. - Your SD1.5 character LoRA in
models/loras. Our LoRA training guide covers training one.
- Load the example by dragging its image into ComfyUI and let it prompt for the models.
- Upload your pose as an OpenPose skeleton image, or extract one from a photo with the DWPose or OpenPose preprocessor in comfyui_controlnet_aux.
- Add Load LoRA after the first Load Checkpoint and route its MODEL and CLIP outputs onward, so the text encoders and first sampler use the LoRA. Keep
strength_modelandstrength_clipbetween 0 and 1, the range Comfy's Load LoRA docs call typical, and put the trigger word in the prompt. - First pass: the example applies the ControlNet at strength 1.0 for the whole schedule (start 0, end 1) and samples 20 steps at cfg 7 with dpmpp_2m and the karras scheduler.
- Second pass: the latent is upscaled to 1536 by 1536, and a second checkpoint samples 10 steps at denoise 0.5. The tutorial gives 0.4 to 0.6 as the typical range, low enough to keep the pose from the first pass.
- Protect the face. The second checkpoint does not see your LoRA, so if the refine pass changes the face, add a Load LoRA there too or lower the denoise.
For SDXL characters the graph is the same with SDXL parts: an SDXL checkpoint and LoRA, and an SDXL pose ControlNet, such as a union model set to openpose with the Set Union ControlNet Type node. Every model in the chain must be from the same family.
Build 3: A reference edit with Qwen-Image-Edit-2511
Goal: change one thing in an image using a second image as the reference, such as a material, a garment or a product. Qwen-Image-Edit-2511 is Apache 2.0 licensed, and Comfy's guide notes better character and multi-person consistency than the 2509 release.
qwen_image_edit_2511_fp8mixed.safetensors(20.5 GB), which the template's loader selects, inmodels/diffusion_models. The BF16 file is 40.9 GB.qwen_2.5_vl_7b_fp8_scaled.safetensors(9.4 GB) inmodels/text_encoders.qwen_image_vae.safetensors(0.25 GB) inmodels/vae.- Optional:
Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors(0.85 GB) inmodels/lorasfor 4-step sampling.
- Open the template: search "Qwen-Image-Edit-2511" in Templates. Its example is a material replacement.
- Load the image to edit as image 1 and the reference, such as a texture, garment or product photo, as image 2.
- Write the instruction by image number. The template's example asks it to change the leather of the sofa in image 1 to the fur material in image 2.
- Choose the sampling path. The template's note lists 40 steps at CFG 4.0 as Qwen's reference and 20 steps at CFG 4.0 as Comfy's, and the Lightning LoRA is built for 4 steps.
- Run and compare the result with the original, checking faces, text and anything you did not ask to change.
A lighter option is FLUX.2 [klein] 4B, also Apache 2.0, whose image-edit templates take two reference images; Comfy lists 8.4 GB of VRAM for the distilled model (Klein guide). Our Qwen image edit guide covers prompts in more depth.
Build 4: Finish and upscale
Fix artifacts before this step; Comfy's upscaling guide warns against relying on upscaling to repair them. Then pick one of two paths.
Option A: SeedVR2, a faithful one-step upscale
- Open the "SeedVR2 3B Int8: Upscale Image" template.
- Put
seedvr2_3b_int8_convrot.safetensors(3.46 GB) inmodels/diffusion_modelsandseedvr2_ema_vae_fp16.safetensors(0.50 GB) inmodels/vae. The 7B INT8 file (8.33 GB) is the higher-quality option. Both sizes are Apache 2.0. - Comfy's tip: downscale the image to 0.35 megapixels with ImageScaleToTotalPixels first.
- Select your image in Load Image and run.
If the output is all black, the SeedVR2 guide suggests, in order: run without FlashAttention, switch to the FP16 or FP8 file, check that both files downloaded completely, and turn off the live preview.
Option B: Ultimate SD Upscale, adding detail with your checkpoint
- Install ComfyUI_UltimateSDUpscale (GPL-3.0) from ComfyUI-Manager. Its example workflows appear under Templates, in the Extensions section.
- Download an upscale model, such as 4x-ESRGAN from OpenModelDB as in Comfy's upscale tutorial, into
models/upscale_models. - Connect Load Image to the UltimateSDUpscale node, together with your checkpoint's model and VAE, your prompts and a Load Upscale Model node, then to Save Image.
- The node defaults to
upscale_by2,denoise0.2 and 512 by 512 tiles with 32 pixels of padding. Set the tile size near the size your checkpoint works at, such as 1024 by 1024 for SDXL, and enable a seam-fix mode if tile edges show.
Build 5: Batch-render a prompt list through the API
- Finish and test a workflow in the UI.
- Export it with File, then Export Workflow (API), to
workflow_api.json(API format). - Find the IDs of your positive prompt node and your sampler in that file and set them at the top of the script.
- Put one prompt per line in
prompts.txt. - Run the script on the machine where ComfyUI is running.
"""Batch-render prompts through a local ComfyUI server (standard library only)."""
import json
import time
import urllib.parse
import urllib.request
from pathlib import Path
SERVER = "http://127.0.0.1:8188"
PROMPT_NODE = "6" # positive CLIP Text Encode in your API export
SAMPLER_NODE = "3" # KSampler in your API export
def call(path, payload=None):
data = json.dumps(payload).encode("utf-8") if payload is not None else None
req = urllib.request.Request(SERVER + path, data=data, headers={"Content-Type": "application/json"})
with urllib.request.urlopen(req) as resp:
return resp.read()
workflow = json.loads(Path("workflow_api.json").read_text(encoding="utf-8"))
prompts = [line.strip() for line in Path("prompts.txt").read_text(encoding="utf-8").splitlines() if line.strip()]
out_dir = Path("batch_out")
out_dir.mkdir(exist_ok=True)
for n, text in enumerate(prompts, start=1):
workflow[PROMPT_NODE]["inputs"]["text"] = text
workflow[SAMPLER_NODE]["inputs"]["seed"] = n # same line, same seed, same image
prompt_id = json.loads(call("/prompt", {"prompt": workflow}))["prompt_id"]
while True: # a prompt appears in /history once its run has finished
history = json.loads(call(f"/history/{prompt_id}"))
if prompt_id in history:
break
time.sleep(2)
for node_output in history[prompt_id]["outputs"].values():
for image in node_output.get("images", []):
query = urllib.parse.urlencode({"filename": image["filename"], "subfolder": image["subfolder"], "type": image["type"]})
(out_dir / f"{n:03d}_{image['filename']}").write_bytes(call(f"/view?{query}"))
print(f"{n}/{len(prompts)} done: {text}")The routes and the /view parameters follow ComfyUI's API examples. A failed run still lands in the history, marked as an error with only the outputs that finished, so the script moves on; the server console shows why it failed. Keep the server on its default 127.0.0.1 address: these routes have no login, and ComfyUI's security policy leaves securing an exposed server to you.
Taking a build to video
A finished still can become the first frame of a clip with the Wan 2.2 14B image-to-video template, or drive a character from a performance video with Wan Animate. Our Wan 2.2 Animate tutorial covers models, VRAM and licenses.
Adapting a build without breaking it
- Change one thing at a time at a fixed seed, and keep the outputs you compared.
- Save each working version. Built-in save nodes embed the workflow in PNG images and in animated WebP, MP4 and WebM files, so dragging a result back in restores its graph (workflow metadata). The embedded graph does not include models or custom nodes.
- Collapse finished stages into subgraphs so they are not rewired by accident.
- Keep a restore point. Comfy Desktop snapshots record the ComfyUI version, custom nodes and Python packages, so you can roll back a bad update.
Advanced ComfyUI Workflows FAQ
What makes a ComfyUI workflow advanced?
Usually more than one stage: a second model or pass, a control input such as a pose, a reference image, a finishing upscale, or automation through the API. Each stage should earn its place, so add one at a time and compare results at a fixed seed.
What are the correct SDXL refiner settings in ComfyUI?
ComfyUI's official example uses two KSamplerAdvanced nodes on one 25-step schedule. The base sampler runs steps 0 to 20 with add_noise and return_with_leftover_noise enabled; the refiner continues from step 20 to the end with both disabled. Both use cfg 8, the euler sampler and the normal scheduler at 1024 by 1024. The refiner does not use a separate denoise value.
How do I keep a character consistent in a ComfyUI workflow?
Train a character LoRA on the same model family as your checkpoint, load it with Load LoRA before the text encoders and sampler, use its trigger word, and control pose separately with ControlNet. If a second pass uses another checkpoint, apply the LoRA there too, and compare faces at a fixed seed.
Which upscaler should I use in ComfyUI?
For a faithful enlargement, SeedVR2 is a native, Apache 2.0 option in 3B and 7B sizes. To add detail with your own checkpoint, use a two-pass workflow or the Ultimate SD Upscale custom node, which re-diffuses the image in tiles at a low denoise (0.2 by default). Fix artifacts before upscaling either way.
How do I batch-render prompts in ComfyUI?
Export the workflow with File, Export Workflow (API), then send one request per prompt to the local /prompt endpoint, changing the prompt text and seed each time. Wait for each run in /history and download the images from /view. The script in this guide does exactly that with Python's standard library.
Can I sell images made with these workflows?
It depends on each model's license. SDXL 1.0 uses CreativeML Open RAIL++-M, Qwen-Image-Edit-2511 and SeedVR2 are Apache 2.0, and community checkpoints and LoRAs carry their own terms. The Ultimate SD Upscale node's GPL-3.0 license covers its code. Read each license before client work.
Related Reads
Want the full AI Influencers playbook?
The complete pipeline for building virtual brands at scale — identity engineering, ComfyUI production, IP governance, and the distribution flywheel.