Nodes/RocM Ninodes/ROCm KSampler
ComfyUI Node

ROCm KSampler

The KSampler you already know, with an AMD autodetect bolted on

By iGavroche·Created 11 months ago·Updated a day ago· 43
ROCm KSampler
  • model
  • positive
  • negative
  • latent_image
  • LATENT
seed0
steps20
cfg8.0
sampler_name
scheduler
denoise1.00
optimize_for_videofalse
precision_modeauto
compatibility_modefalse

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."

CategoryROCm Ninodes/Sampling

Inputs (13)

NameTypeDefaultDescription
modelMODELThe model to sample from
seedINT00–18446744073709550000Random seed for generation
stepsINT201–10000Number of sampling steps
cfgFLOAT8.00–100Classifier-free guidance scale
sampler_nameCOMBOSampling algorithm to use
schedulerCOMBOScheduler for noise timesteps
positiveCONDITIONINGPositive conditioning
negativeCONDITIONINGNegative conditioning
latent_imageLATENTLatent image to sample from
denoiseFLOAT1.000–1Denoising strength
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