Node KSampler di ComfyUI
KSampler runs the denoising loop: it takes the model, prompts and a latent and produces the finished latent image, controlled by seed, steps, cfg, sampler, scheduler and denoise.
Paket node: ComfyUI core
Kategori: Sampling
Halaman ini belum diterjemahkan, jadi ditampilkan dalam bahasa Inggris.
Apa yang dilakukan KSampler
KSampler is where the image is actually generated. Starting from the input latent (random noise from Empty Latent Image, or an encoded picture for img2img), it asks the model to remove noise for the chosen number of steps, pulling toward the positive prompt and away from the negative one by the cfg amount. The result is a LATENT that VAE Decode turns into an image.
sampler_name selects the numerical method (euler, euler_ancestral, dpmpp_2m, dpmpp_2m_sde, dpmpp_3m_sde, uni_pc, lcm, ...) and scheduler the noise curve (normal, karras, exponential, sgm_uniform, simple, beta). denoise controls how much of the input latent is replaced: 1.0 for text-to-image, 0.3-0.7 for img2img and hires passes. KSampler (Advanced) exposes start and end steps for multi-stage sampling.
Input
Nama | Tipe | Artinya |
|---|---|---|
model | MODEL | The denoising model, after any LoRA or ControlNet patches. |
positive | CONDITIONING | What you want (from CLIP Text Encode, possibly through ControlNet Apply). |
negative | CONDITIONING | What you do not want. |
latent_image | LATENT | The starting latent: empty noise or an encoded image. |
seed | INT | Noise seed. Same seed and settings reproduce the same image. control_after_generate sets fixed, increment, decrement or randomize. |
steps | INT | Number of denoising steps. 20-30 for most SD models, 4-8 for Lightning, Turbo and LCM models. |
cfg | FLOAT | Classifier-free guidance scale. 5-8 for SD 1.5 and SDXL, 1.0 for Flux and distilled models. |
sampler_name | COMBO | The sampling algorithm. |
scheduler | COMBO | The noise schedule. |
denoise | FLOAT | Fraction of the noise to remove. 1.0 = start from scratch; lower keeps more of the input image. |
Output
Nama | Tipe | Artinya |
|---|---|---|
LATENT | LATENT | The sampled latent for VAE Decode or a second sampler. |
AD

Lewati penyiapan: workflow ComfyUI sudah terpasang di cloud
BitVector menjalankan workflow ComfyUI siap pakai di GPU miliknya sendiri. Tanpa instalasi, tanpa node hilang, tanpa kotak merah. Buka di ponsel atau laptop dan hasilkan dalam semenit.
Cara menggunakan KSampler
- Connect MODEL, both CONDITIONINGs and a LATENT.
- Set steps 25, cfg 7, dpmpp_2m with karras for SDXL; euler with simple, cfg 1 for Flux.
- Set denoise to 1.0 for a fresh image.
- Connect LATENT to VAE Decode and then Save Image.
- Queue, then fix the seed when you want to iterate on the prompt.
Pengaturan dan tips
- dpmpp_2m + karras is the all-round choice; euler_ancestral adds variety but never converges; dpmpp_2m_sde gives extra detail at the cost of determinism across GPUs.
- Lightning, Hyper and Turbo checkpoints need their own settings: 4-8 steps, cfg 1-2, sgm_uniform or simple.
- For a hires pass, feed the first latent through Upscale Latent By and a second KSampler with denoise 0.4-0.55.
- Hold Ctrl+Shift+V to paste a node with its connections; useful when duplicating samplers.
- A fixed seed with the same settings is reproducible on the same GPU; different cards can differ slightly.
Pemecahan masalah KSampler
Noise, static or a blurry blob instead of an image
Mengapa terjadi
The settings do not fit the model: cfg 7 on a distilled model, 4 steps on a normal model, a Flux model without Flux Guidance, or denoise far below 1 on an empty latent.
Cara memperbaikinya
Match the model page: normal SD = 20-30 steps, cfg 5-8; Lightning/Turbo = 4-8 steps, cfg 1-2; Flux = cfg 1, guidance 3.5, 20+ steps. Use denoise 1.0 when the latent is empty.
Deep-fried, oversaturated, high-contrast output
Mengapa terjadi
cfg is too high for the model or the LoRA stack, or an ancestral sampler with many steps.
Cara memperbaikinya
Lower cfg to 4-6, reduce LoRA strengths, or switch from euler_ancestral to dpmpp_2m.
torch.OutOfMemoryError: CUDA out of memory during sampling
Mengapa terjadi
The latent is too large for the card at this batch size, or another model (ControlNet, upscaler) sits in VRAM at the same time.
Cara memperbaikinya
Lower the resolution or batch_size, add --lowvram, use fp8 weights, or split the hires pass into a second queue so the first model is unloaded.
Error: mat1 and mat2 shapes cannot be multiplied
Mengapa terjadi
The conditioning comes from a text encoder of a different family than the model (SD 1.5 CLIP into an SDXL model, or vice versa).
Cara memperbaikinya
Wire the CLIP from the same checkpoint that provides the MODEL.
Images change every run although the seed is fixed
Mengapa terjadi
control_after_generate is set to randomize, or an SDE / ancestral sampler is in use with a non-deterministic backend.
Cara memperbaikinya
Set control_after_generate to fixed and prefer dpmpp_2m or euler for exact repeatability.
The same image repeats across prompts (seed stuck)
Mengapa terjadi
control_after_generate is fixed and the noise dominates at low cfg or low steps.
Cara memperbaikinya
Set it to randomize or increment and raise cfg slightly.
AD

Jalankan workflow ini dari ponsel Anda
Setiap workflow di halaman ini sudah terpasang di BitVector lengkap dengan model dan node kustomnya. Pilih satu, ketik prompt, selesai. Nol penyiapan, tidak ada yang perlu diunduh.
Pertanyaan tentang KSampler
What is the difference between KSampler and KSampler (Advanced)?
Advanced adds add_noise, start_at_step, end_at_step and return_with_leftover_noise, which lets you split sampling across two models, for example SDXL base then refiner.
Which sampler is fastest?
euler and dpmpp_2m take one model call per step; the _2s and _3m variants take more. LCM and Lightning models are fast because they need few steps, not because of the sampler.
What does denoise do with an empty latent?
Anything below 1.0 leaves part of the original noise in the output and produces fog. Keep 1.0 for text-to-image.
Node terkait
KSampler (Advanced)
ComfyUI core
KSampler (Advanced) is KSampler with step-range control: add_noise, start_at_step, end_at_step and return_with_leftover_noise, used for base + refiner chains and two-model sampling.
Empty Latent Image
ComfyUI core
Empty Latent Image creates the blank latent canvas (width, height, batch_size) that text-to-image sampling starts from; dimensions must be multiples of 8 and match the model family.
VAE Decode
ComfyUI core
VAE Decode converts the sampled LATENT into a pixel IMAGE with the VAE; VAE Decode (Tiled) does the same in tiles for very large images.
CLIP Text Encode (Prompt)
ComfyUI core
CLIP Text Encode turns a text prompt into CONDITIONING using the model text encoder. One node holds the positive prompt, a second one the negative prompt.
Upscale Latent and Upscale Latent By
ComfyUI core
Upscale Latent resizes a latent to a new size (or by a factor) so a second KSampler can add detail at higher resolution: the classic hires fix.
AD

Lelah memperbaiki node? Biarkan cloud yang mengerjakan
BitVector menjaga ratusan workflow ComfyUI tetap terpasang, terbaru, dan teruji di GPU cloud yang cepat. Tanpa Python, tanpa error CUDA, tanpa batas VRAM. Bisa dari browser apa pun.
Node ComfyUI lainnya
ComfyUI Manager
ComfyUI-Manager
ComfyUI Manager is the extension that installs, updates and fixes custom node packs and models from inside the interface, resolves missing nodes in imported workflows and snapshots your setup.
Load Checkpoint
ComfyUI core
Load Checkpoint (CheckpointLoaderSimple) opens a .safetensors or .ckpt model file and hands out the three parts every workflow needs: the diffusion MODEL, the CLIP text encoder and the VAE.
Save Image
ComfyUI core
Save Image writes the IMAGE tensor to ComfyUI/output as a PNG, with the whole workflow embedded in the file metadata so the picture can be dragged back into ComfyUI to restore the graph.
Load Image
ComfyUI core
Load Image reads a picture from the ComfyUI input folder (or an upload) and outputs an IMAGE tensor plus a MASK taken from the alpha channel, the starting point for img2img, inpainting, ControlNet and IP-Adapter graphs.
Load LoRA
ComfyUI core
Load LoRA (LoraLoader) applies a LoRA file to the MODEL and CLIP with separate strengths, so a style, character or concept can be added to any checkpoint without merging.
Load Diffusion Model
ComfyUI core
Load Diffusion Model (UNETLoader) loads a bare denoising network such as Flux, SD3.5, Wan or HunyuanVideo from models/diffusion_models, with a weight_dtype option for fp8 to save VRAM.

Model
Trends
.ai
© ModelTrends.ai
|
Dibuat di Jepang
|
© 2026