ROCMOptimizedKSamplerAdvanced
KSampler Advanced with a ROCm-friendly personality
- model
- positive
- negative
- latent_image
- LATENT
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.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| add_noise | COMBO | 2 options: enable, disable | |
| noise_seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.00–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent_image | LATENT | — | |
| start_at_step | INT | 00–10000 | — |
| end_at_step | INT | 100000–10000 | — |
| return_with_leftover_noise | COMBO | 2 options: disable, enable | |
| optimize_for_videoopt | BOOLEAN | false | Disable previews/progress for multi-frame latents |
| precision_modeopt | COMBO | auto | ROCm precision hint (no-op on CUDA/CPU) |
| compatibility_modeopt | BOOLEAN | false | Force pure stock behavior |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |