"매 step 은 noise → image 의 길 위 의 한 발자국". 매 diffusion model 에서 num_inference_steps 는 매 reverse-diffusion ODE 의 discretization count — 매 적으면 빠르지만 muddy, 매 많으면 sharp 지만 expensive 하고 어느 임계점 이상 은 의미 X. 매 2026 의 modern sampler (DPM++ 2M Karras, FLUX 의 Euler) + Lightning/Turbo distillation 으로 매 sweet-spot 이 12–30 steps 로 안정.
매 핵심
매 정의
Sampling step: 매 reverse diffusion 의 한 iteration. matrix t = T → 0 의 discretization.
Sampler / scheduler: 매 step 사이 noise 의 schedule + 알고리즘 (Euler, DPM, UniPC, LMS, DDIM, DPM++ SDE).
CFG (guidance scale): 매 step 마다 conditional vs unconditional 의 weighting.
Sigma schedule: 매 noise level 의 t-vs-sigma curve (linear, karras, exponential).
매 sampler family (2026 state)
Euler / Euler a: 매 simple, fast, good baseline (15–25).
DPM++ 2M Karras: 매 SDXL community default (20–30). 매 quality leader 의 하나.
DPM++ 3M SDE: 매 detail 강함 (28–40).
UniPC: 매 빠른 convergence (10–20).
DDIM: 매 deterministic, ControlNet 호환.
LCM / Turbo / Lightning: 매 distilled 1–8 steps.
FLUX 의 Euler / fm_euler: 매 flow-matching 형식. 매 25–30 steps default.
매 step 수 의 trade-off
매 5–10: muddy, oversmooth (distilled 모델 의 경우 ok).
매 15–20: 매 production sweet spot (대부분 SDXL / FLUX dev).
fromdiffusersimportStableDiffusionXLPipeline,EulerDiscreteSchedulerpipe=StableDiffusionXLPipeline.from_pretrained("stabilityai/sdxl-turbo",torch_dtype=torch.float16,variant="fp16").to("cuda")pipe.scheduler=EulerDiscreteScheduler.from_config(pipe.scheduler.config,timestep_spacing="trailing")img=pipe(prompt="a wizard casting a fireball",num_inference_steps=4,guidance_scale=0.0).images[0]
Pattern 3 — FLUX (flow-matching)
fromdiffusersimportFluxPipelinepipe=FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev",torch_dtype=torch.bfloat16).to("cuda")img=pipe(prompt="forest stream at golden hour",num_inference_steps=28,guidance_scale=3.5,max_sequence_length=512).images[0]
# ControlNet 의 conditioning step 시작/종료 비율img=pipe(prompt=p,image=control_img,num_inference_steps=25,controlnet_conditioning_scale=0.9,control_guidance_start=0.0,# 첫 step 부터control_guidance_end=0.7# 70% 지점 에서 중단 → free 마지막 30%).images[0]