Prompting, Samplers & Schedulers

Intermediate 4 min read 6 sections
GitHub
On this page

Different model families understand prompts, CFG scale, and samplers very differently. Matching your settings to the architecture matters far more than hunting for magic quality buzzwords.

#Natural language vs tag prompting

Model family Prompt style that works best Negative prompt usage
Flux.2 / Flux.2 Klein / Flux.1 / Qwen-Image 2.1 / Z-Image / Krea 2 / SD 3.5 / Wan 2.2 Clear natural-language sentences describing subject, composition, lighting, materials, and camera Unused on distilled / guidance-free models (cfg = 1.0); light cleanup on CFG-based variants
SDXL Descriptive phrases or comma-separated visual clauses Short cleanup tags (blurry, deformed, watermark)
Illustrious / Pony / Anima Structured Danbooru/booru tags (1girl, solo, blue_jacket, golden_hour) + checkpoint quality tags Important for anime checkpoints; follow model card recommendations

For Anima artist style discovery, you can also browse and copy visual style tags in Anima Style Explorer.

#Prompt syntax: weighting, wildcards, embeddings, and comments

ComfyUI's frontend and CLIP Text Encode (Prompt) support several built-in syntax features with no extensions needed:

  • Token weighting:
    • Increase weight with (golden_hour:1.25). Keep most weights between 0.8 and 1.35; pushing above 1.5 easily fries contrast or distorts faces.
    • Decrease weight with (fog:0.7).
    • Shorthand parentheses without a colon apply 1.1x ((glow) = (glow:1.1), ((glow)) = (glow:1.21)).
    • Escape literal parentheses in tags with backslashes: hatsune_miku_\(cosplay\).
  • Weight shortcut: select text inside a prompt widget and press Ctrl + ArrowUp or Ctrl + ArrowDown to adjust its weight in 0.05 steps.
  • Inline dynamic prompts (wildcards): wrap random options in braces like {red|blue|emerald} coat (nested choices {warm {gold|amber}|cool blue} and empty options {|light fog} work too). Escape literal braces or pipes with \{, \}, and \|.
  • Comments: use // single-line comment or /* block comment */ inside prompt boxes to temporarily disable phrases or leave notes. ComfyUI strips C-style comments automatically when queuing.
  • Embeddings (Textual Inversion): reference files in ComfyUI/models/embeddings/ directly in your prompt with embedding:filename (without the file extension).

#CFG scale by model family

CFG (Classifier-Free Guidance) controls how strongly sampling pushes away from the negative/unconditional prediction toward your prompt.

Model family Recommended CFG Notes
Distilled / guidance-free (Flux.2 Klein Distilled, Qwen-Image 2.1 Base & Turbo, Flux.1 Schnell, Z-Image Turbo, Lightning / LCM) 1.0 Do not raise CFG; use 4 - 8 steps for distilled/Turbo models (~25 steps for Qwen-Image 2.1 Base)
Embedded guidance (Flux.1 Dev) Sampler cfg = 1.0 Set guidance (2.5 - 4.0) in a FluxGuidance node
CFG split models (Flux.2 Klein Base, Anima, SD 3.5, Qwen-Image 1) 3.5 - 5.5 Supports negative prompts; pushing past 7 creates harsh contrast
Classic checkpoints (SDXL, Illustrious, Pony) 4.5 - 7.5 Balanced anatomy, color, and prompt adherence

#Samplers and schedulers

ComfyUI ships built-in deterministic and stochastic solvers inside KSampler:

Sampler (sampler_name) Best paired scheduler(s) Behavior
euler simple, normal, beta, sgm_uniform Clean, reliable default across nearly every architecture (Flux.2, Qwen, Z-Image, Anima, SDXL)
euler_ancestral normal, karras Injects fresh noise each step; good creative variation on anime/SDXL, never converges identically
dpmpp_2m karras, sgm_uniform, beta Fast, sharp convergence in 20 - 30 steps on SDXL and SD 1.5
dpmpp_2m_sde karras, exponential Richer surface texture in 25 - 35 steps; slightly slower per step
res_multistep / er_sde simple, beta High-precision solvers suited to modern flow-matching models
uni_pc / sa_solver simple, normal, karras Fast convergence in 12 - 20 steps

Built-in scheduler choices include simple, sgm_uniform, karras, beta, normal, exponential, ddim_uniform, linear_quadratic, and kl_optimal (plus architecture nodes such as Flux2Scheduler for Flux.2 sigma schedules).

#Native resolutions and aspect ratios

Every model family is trained around a target pixel area. Generating far below or far above native resolution causes duplicated heads, extra limbs, or soft textures.

Architecture Target pixel area Common aspect presets
SD 1.5 ~512 x 512 (0.26 MP) 512x512, 512x768, 768x512
SDXL / Illustrious / Anima ~1024 x 1024 (1.0 MP) 1024x1024, 896x1152, 832x1216, 1152x896, 1216x832, 1344x768
Flux.2 / Flux.1 / Qwen-Image 2.1 / Z-Image / Krea 2 / SD 3.5 ~1024 x 1024 to 1328 x 1328 (1.0-1.7 MP) 1024x1024, 1024x1536, 1328x1328, 1664x928

Keep width and height divisible by 16 (or 64 for broad VAE/patch compatibility), and upscale high-resolution targets in a second pass instead of sampling at 2K+ from scratch.

#Managing seeds

  • control_after_generate: fixed: repeats the exact image whenever upstream settings stay identical. Use this while tuning CFG, scheduler, or small prompt changes.
  • control_after_generate: randomize: picks a fresh random seed after every run for exploration.
  • control_after_generate: increment: steps seed + 1 sequentially, useful when comparing reproducible batches.

Next: edit existing images and upscale cleanly in Img2Img, Inpainting & Upscaling.