Nodes/RocM Ninodes/ROCMOptimizedKSamplerAdvanced
ComfyUI Node

ROCMOptimizedKSamplerAdvanced

KSampler Advanced with a ROCm-friendly personality

By iGavroche·Created 11 months ago·Updated 4 days ago· 43
ROCMOptimizedKSamplerAdvanced
  • model
  • positive
  • negative
  • latent_image
  • LATENT
add_noise
noise_seed0
steps20
cfg8.0
sampler_name
scheduler
start_at_step0
end_at_step10000
return_with_leftover_noise
optimize_for_videofalse
precision_modeauto
compatibility_modefalse

This one is exactly what it says on the tin: ComfyUI's KSampler Advanced, copied stock-correct, re-homed under the ROCm Ninodes category with three small ROCm-aware toggles bolted on. The pack is upfront about it - "1:1 with ComfyUI KSampler (Advanced)." So the real question is why you'd ever use a re-skinned copy of a node you already have. The answer is consistency: if you're building workflows on AMD, having every sampler in the graph come from one pack means one place to flip a precision or video optimization, and one author tracking the ROCm quirks you'd otherwise chase across changelogs.

The inputs that matter

It's the standard KSampler Advanced surface: model, add_noise, noise_seed, steps, cfg, sampler_name (44 samplers), scheduler (9), positive/negative conditioning, latent_image, and the step-range controls that make it "advanced" - start_at_step / end_at_step (for partial denoising, img2img strength, and inpainting pass ranges) and return_with_leftover_noise. Output is a single LATENT that feeds your VAE decode.

The three optional toggles are the ROCm flavor:

  • optimize_for_video (off) - disables previews/progress for multi-frame latents. Turn it on for video; the per-step preview on a 5D latent is pure overhead.
  • precision_mode (auto/fp32/bf16) - a hint, explicitly a no-op on CUDA/CPU. Only does something under ROCm.
  • compatibility_mode (off) - forces pure stock behavior if the ROCm tuning ever misbehaves.

For beginners: these are all leave-it-alone defaults. start_at_step/end_at_step is where the real power is - set start_at_step above 0 to start from an already-denoised latent (img2img), or cap end_at_step to stop early and feed the partial result into a second sampler.

When to reach for it

Honestly, reach for it when you're already in the ROCm Ninodes world and want your whole sampling stack from one pack - paired with ROCm VAE Decode and the pack's loaders, you get a workflow where every node speaks the same AMD-tuned language. On NVIDIA, there's no reason to swap: it's a clone of stock with dead toggles. On AMD it's also not faster in any dramatic way - the source shows it runs the same comfy.sample.sample call - but it auto-detects your architecture, logs what it sees, and gives you the precision/video controls in one place. Think of it as the tidy version, not the turbo version.

Install

Part of ROCm Ninodes - Manager → "ROCm Ninodes," or

cd ComfyUI/custom_nodes
git clone https://github.com/iGavroche/rocm-ninodes.git

Restart, under ROCm Ninodes → Sampling. Light deps (numpy, Pillow, psutil, gguf, safetensors), no model files. The only real prerequisite is a working ROCm PyTorch install, and the README's recommended launch flag set for mature drivers (TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1). If you hit weird sampling errors after updating, remember the pack's v1→v2 migration script (uv run python tools/upgrade_to_v2.py) exists to clear stale files from the old layout - a surprising number of "the node broke" reports end at that step.

CategoryROCm Ninodes/Sampling

Inputs (16)

NameTypeDefaultDescription
modelMODEL
add_noiseCOMBO2 options: enable, disable
noise_seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.00–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
start_at_stepINT00–10000
end_at_stepINT100000–10000
return_with_leftover_noiseCOMBO2 options: disable, enable
optimize_for_videooptBOOLEANfalseDisable previews/progress for multi-frame latents
precision_modeoptCOMBOautoROCm precision hint (no-op on CUDA/CPU)
compatibility_modeoptBOOLEANfalseForce pure stock behavior

Outputs (1)

NameTypeDescription
LATENTLATENT