ROCm SamplerCustomAdvanced
SamplerCustomAdvanced, but it knows you're on AMD
- noise
- guider
- sampler
- sigmas
- latent_image
- output
- denoised_output
If you run LTX Video or any modern video workflow in ComfyUI, you've met SamplerCustomAdvanced: the node that takes five pluggable pieces - noise, guider, sampler, sigmas, and a latent - and does the actual denoising. This is the ROCm Ninodes pack's version, a drop-in replacement that keeps the exact same five inputs and two outputs but adds AMD-aware backend tuning and memory handling. On a big LTX job (128-channel latents, memory-hungry flow-matching), that's the difference between a run that finishes and a run that OOMs halfway through.
What's actually different
The interface is identical to stock, which is the whole design goal. You wire in your noise (RandomNoise), guider (CFGGuider or BasicGuider), sampler (KSamplerSelect), sigmas (BasicScheduler), and latent_image - for LTX workflows that's often an LTXVConcatAVLatent - and you get the same two LATENT outputs (output and denoised_output).
What it adds under the hood:
- Architecture + model detection - it identifies your AMD GPU family and whether the model is a flow-matching video model, then applies backend settings that match (the pack has learned the hard way that a global
allow_tf32=Falseand fp16-accumulation flags that help one architecture crash another - those got pulled after causing illegal-memory-access errors on gfx1151). - Emergency memory cleanup - for high-memory models (memory factor > 5x, which is LTX 128ch territory), it defrags VRAM before sampling and cleans up after.
- A better callback - per-step timing and ETA in the console, with previews skipped automatically for multi-frame (5D) latents so long video runs don't choke on preview I/O.
The two advanced toggles in the node's properties panel are the escape hatches: compatibility_mode forces pure stock behavior (use it when you suspect the optimizations, not the model, are the problem), and flash_attention (auto / disable_flash / force_flash) overrides PyTorch's SDP attention backends per-node. disable_flash is the known fix when a ROCm model hits illegal-memory-access - it falls back to math/efficient SDP.
Why you'd bother switching
On an NVIDIA card: don't, really. It's a stock replica with extra logging. On AMD - especially a Strix Halo APU with LTX Video or LTX 2.3 - the value is real: the pack's changelog is essentially a chronicle of ROCm-specific crashes (access violations, illegal memory access, previewer failures) that this node exists to dodge. Swap it in, keep every connection the same, and the console suddenly tells you what GPU and model type it detected.
Install
It's the flagship of the ROCm Ninodes pack: ComfyUI Manager → search "ROCm Ninodes," or
cd ComfyUI/custom_nodes
git clone https://github.com/iGavroche/rocm-ninodes.git
Restart, and it's under ROCm Ninodes → Sampling. Dependencies are the pack's usual light set (numpy, Pillow, psutil, gguf, safetensors). It uses the V3 ComfyNode API (define_schema), which current ComfyUI picks up automatically - if a future ComfyUI major bumps that API, this is one of the nodes that'll need a pack update, so keep it current.
The honest troubleshooting
If a video run dies with an illegal-memory-access error, try flash_attention = disable_flash before anything else - that's the documented fix. If output looks wrong but ran fine, flip compatibility_mode to isolate whether the ROCm backend tuning is the culprit. And if you see previews vanishing on Windows, that's a known ZLUDA-era issue the changelog fixes by logging the failure instead of silently swallowing it - update the pack. This is a "it just works until AMD doesn't" kind of node, and when AMD doesn't, the toggles are there to tell you which half of that sentence is true.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| noise | NOISE | — | |
| guider | GUIDER | — | |
| sampler | SAMPLER | — | |
| sigmas | SIGMAS | — | |
| latent_image | LATENT | — | |
| compatibility_modeopt | BOOLEAN | false | Skip all ROCm optimizations, force pure stock behavior |
| flash_attentionopt | COMBO | auto | Override flash attention behavior. 'auto' = use ComfyUI defaults, 'disable_flash' = use math/efficient SDP (fixes illegal memory access on some ROCm models), 'force_flash' = prefer flash SDP with math/efficient fallback |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output | LATENT | — |
| denoised_output | LATENT | — |