ROCm KSampler
The KSampler you already know, with an AMD autodetect bolted on
- model
- positive
- negative
- latent_image
- LATENT
ROCm KSampler is the stock ComfyUI KSampler wearing an AMD-flavored jacket: same inputs, same sampling math, plus an auto-detection layer that pokes at your GPU and your model before it starts and adjusts a few torch backend knobs accordingly. If you're on an AMD/ROCm box it's a straight upgrade in observability - you get per-step timing and ETA in the terminal - and if you're on NVIDIA it's the stock sampler with extra logging, which is harmless.
It's filed under ROCm Ninodes/Sampling and plugs into your workflow exactly where a normal KSampler goes: MODEL in, positive/negative conditioning in, a LATENT from Empty Latent Image (or an encode), LATENT out to VAE Decode.
How it works
The sampling call itself is comfy.sample.sample - identical numerics to stock, which matters because some "optimized" samplers change your results. What the pack adds happens around it. It detects your GPU architecture (gfx1151/RDNA, gfx1100, gfx1030, CDNA, or CPU) and your model's sampling type, then, unless you've flipped compatibility mode, applies ROCm backend settings - things like enabling fp16 accumulation on AMD where it's safe and leaving TF32 alone after earlier versions found it was wrecking performance on LTX. It watches for flow-matching models (Flux, LTX, WAN, z-image), logs when one shows up, and for pixel-space models like z-image-turbo it reminds you that no VAE decode is needed downstream. High-memory models (ideogram4's memory factor is over 11×) trigger an emergency cleanup before and after sampling.
The callback is where you feel it: a progress bar, a live preview every 5 steps on still images, and a running ETA line in the terminal. optimize_for_video switches that to a quieter mode for multi-frame latents - previews off, since decoding a preview of every video frame is pure overhead.
The inputs that actually matter
The defaults are tuned for a gfx1151 Strix Halo box, and the README suggests cfg 7–8 and samplers euler, heun, or dpmpp_2m on AMD. Beyond that, the usual suspects:
- steps - 20–30 for most things, fewer for distilled models.
- denoise - set this below 1.0 for img2img-style re-rolls of an existing latent.
- precision_mode (auto/fp32/bf16) - "auto" is right; it's explicitly a no-op on CUDA/CPU.
- compatibility_mode - forces pure stock behavior if you suspect the tuning is causing problems.
- optimize_for_video - flip on for video latents.
The single LATENT output wires straight into your VAE Decode.
Installing it
Part of ROCm Ninodes - via ComfyUI Manager (search rocm-ninodes) or:
cd ComfyUI/custom_nodes
git clone https://github.com/iGavroche/rocm-ninodes.git
then restart. On a v1.x install, run uv run python tools/upgrade_to_v2.py once. Dependencies are numpy, Pillow, psutil, gguf, safetensors - the real requirement is a ROCm PyTorch build.
The honest version
The performance upside here is real but situational: this pack's changelog is basically a graveyard of LTX-on-AMD bugs (illegal memory access, banding, Windows crashes), and this node inherits all those fixes. If you run video on an AMD box, the auto-detection and cleanup genuinely help. If you're on NVIDIA, don't expect magic - you're paying for logging and a few no-op toggles. Either way, output quality is unchanged from stock, which is the correct kind of "optimization."
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The model to sample from | |
| seed | INT | 00–18446744073709550000 | Random seed for generation |
| steps | INT | 201–10000 | Number of sampling steps |
| cfg | FLOAT | 8.00–100 | Classifier-free guidance scale |
| sampler_name | COMBO | Sampling algorithm to use | |
| scheduler | COMBO | Scheduler for noise timesteps | |
| positive | CONDITIONING | Positive conditioning | |
| negative | CONDITIONING | Negative conditioning | |
| latent_image | LATENT | Latent image to sample from | |
| denoise | FLOAT | 1.000–1 | Denoising strength |
| 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 | — |