ComfyUI Image Generation
Background with sources (read only when needed): vault/knowledge/image-models-licences.md. Prompts and test results from past projects: vault/workflow/ai-image-generation.md.
1. Environment
- Local ComfyUI (portable) on port 8188, consumer GPU with 8 GB VRAM. Access via a session on that machine.
- Shared instance – mandatory rules: another agent may use ComfyUI in parallel.
- Only append jobs via
POST /promptand poll/history/{prompt_id}. - Never
POST /interrupt, never clear queue or history, never change settings, nodes or other people's files, never install anything without the owner's approval. - Own
filename_prefix:canva_design/<project>/....
- Only append jobs via
2. Licence check first
| Model | Licence | Commercial? |
|---|---|---|
| Z-Image Turbo | Apache 2.0 | yes |
| Qwen-Image 2.1 | Qwen Research License | no, research/tests only |
| Flux 3 Image Klein | FLUX Community License | yes below USD 5 M annual revenue (read the original text before selling) |
Ask before choosing a model: test/fan concept or commercial use? Commercial → no Qwen-Image 2.1.
3. Model choice
- Photos → Z-Image Turbo: most realistic, looks professionally shot, fast (about 20–40 s).
- Stylised lettering (chrome, foil balloon, satin) → Flux 3 Klein, occasionally, not as a default.
- Copy clothing/material from a reference or render exact text → Qwen-Image 2.1, only for non-commercial work. Tends towards blown-out backgrounds and a cool cast.
- Z-Image cannot use image references. Flux 3 Klein copies references almost 1:1 (too close).
4. Settings
| Z-Image Turbo | Qwen-Image 2.1 (int8) | Flux 3 Klein Base (int8) | |
|---|---|---|---|
| Text encoder | qwen_3_4b (type lumina2) | qwen3vl_8b_int8 (type qwen_image) | qwen3vl_4b_int8 (type flux3) |
| VAE | ae | qwen_image_2.1_vae | flux2-vae |
| Steps | 9 | 25–30 | 40–50 |
| CFG | 1 | 1 (template) or ≈ 3 + negative prompt + APG/FreSca against flat/overexposed images | 3.5–4 |
| Sampler | res_multistep / simple (default); if washed out try dpmpp_sde / ddim_uniform | euler / simple | euler / simple |
| Extra | ModelSamplingAuraFlow shift 3 (don't raise) | QwenImage21Cache; references via TextEncodeQwenImage21 | references via ReferenceLatent |
| Resolution | 1088 × 1360 (4:5), up to ≈ 2 MP | up to 2K | ≈ 1–2 MP |
Important: at CFG 1, negative prompts have no effect. Phrase exclusions positively ("uncluttered background", "balanced exposure"). Never run Flux 3 Klein Base with turbo values (few steps, CFG 1).
5. Prompt structure
Ordered like a camera brief, 80–250 words in full sentences:
- Shot and framing ("medium close-up, 85 mm lens, subject fills the lower two thirds")
- Person/subject, clothing, pose
- Location and background, space for the headline ("calm empty sky in the upper 40 % for a headline")
- Light with a concrete source and colour temperature (no generic "golden hour")
- Mood, film/camera look, grain
- "no text, no lettering", unless lettering is intended
Standard additions: "realistic body proportions, normal head size", "balanced exposure, sky with detail, not blown out", warm rather than cool colour temperature.
Lettering in the image (Flux/Qwen): words in quotes, short (1–3 words), state size/style/position, explicitly no text elsewhere. Best rendered alone on a calm background with 4 seeds; pick a correctly spelled one, cut it out and place it in Canva/PNG.
6. Process
- Licence check and model choice (sections 2–3), prompt per section 5.
- Default: one image per motif. Multiple seeds/variants only when someone wants to choose, or for especially important hero motifs. Z-Image seeds look very similar; vary the prompt (camera angle, light) for variety.
- Review the result strictly at full resolution: count hands and fingers, realistic equipment/objects (an ice axe short and sturdy, no hiking-pole hybrid), proportions (head not too small), logos and pseudo-text (balls, clothing, hoardings), no blown highlights, no colour cast, no stray objects (wires, nets at the edge).
- Local defect (hand, object, logo): repair only that area with
scripts/comfy_inpaint.py(Z-Image, VAEEncode + SetLatentNoiseMask + DifferentialDiffusion, crop upscaled 2–3×, denoise 0.7–0.9, blended back softly; the rest stays pixel-identical). Retouch away a disturbing shape first if needed; make the prompt very concrete (size, grip position, age/skin). - Fundamental problem (pose, composition, light): new image with a more precise prompt.
- Save the repaired base as a new file
_v2.
- Local defect (hand, object, logo): repair only that area with
- Upscale for print: correct colour first, then SeedVR2 3B (Apache 2.0) as default, Real-ESRGAN x4plus as a fast fallback (
scripts/upscale_queue.py). For Qwen 2.1 no latent hires pass (creates ghost edges). Target e.g. A3 at 300 dpi = 3508 × 4961 px. - Copy images to
<project>/1_AI-base-images/, never overwrite. - Record model, prompt, seed and settings in the project note.