KSampler (MultiGPU)
A KSampler that finally shows you which GPU did what
- model
- positive
- negative
- latent_image
- latent
- status
Here's the honest framing for KSampler (MultiGPU): it's not a sampler that does multi-GPU. It's the stock ComfyUI sampler wearing a diagnostic coat. What it actually does is call ComfyUI's own common_ksampler - the exact same sampling path the core KSampler uses - and then wrap it in enough instrumentation to tell you what your GPUs did during those steps.
That's worth having, because with this pack, the sharding already happened upstream: the loader split the UNet's blocks across cards and injected a custom forward. What's invisible is whether the second card ever got touched. This node makes that visible.
How it works
It takes the standard KSampler input set - model, seed, steps, cfg (default 8), sampler_name (all 44 of ComfyUI's samplers), scheduler (all 9), positive, negative, latent_image, denoise - and hands them to common_ksampler. Because it's the same engine, your euler/karras/whatever behaves exactly as it does in core ComfyUI. There's no sampler-name magic here.
Around that call, it does three things. Before sampling it snapshots per-GPU VRAM and resets each card's peak-memory counter. After sampling it reads the shard map the loader stamped on the model, and reports:
- the shard layout and per-device block counts,
- the VRAM delta per GPU across the run (did card 1 actually allocate anything?),
- peak VRAM per GPU,
- and a warning for any GPU that saw zero runtime executions - the classic "one card sat idle" symptom.
Inputs and outputs that matter
If you've used a stock KSampler, you know every input already - same defaults, same range limits. Two gotchas worth naming:
cfgdefaults to 8.0, which is right for SD/SDXL but wrong for Flux (use 1.0); since this sampler inherits the SD default, remember to drop it.denoisedefaults to 1.0; lower it when you're sampling from a partially denoised latent (img2img).
Outputs are latent (wire into a VAE decode) and status - a STRING with the whole per-GPU report. That string is the payload: connect it to a display/text node (or feed it into GPU Status Display's status input) and it lands in comfyui.log for post-mortem reading.
The trap
Feed this sampler a model that wasn't loaded by the MultiGPU loader and it still works - it just reports "Running on single GPU (no sharding active)." That's fine. The bigger gotcha: if ComfyUI's sampler API isn't importable (basically never, inside a real ComfyUI), it silently returns a dummy latent with a warning. If you ever get garbage output and a ⚠️ status, that's what happened.
Installing it
Part of Comfy-MultiGPU-Loader. ComfyUI Manager search "Comfy-MultiGPU-Loader", or:
cd ComfyUI/custom_nodes
git clone https://github.com/AngelCookiesLab/Comfy-MultiGPU-Loader
pip install -r requirements.txt
Restart, find it under MultiGPU/Sampling. Keep the sunset status in mind - GPL-3.0, as-is, no active support - and use the debug variant below when you're actually diagnosing.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.000–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 | — | |
| denoise | FLOAT | 1.000–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| status | STRING | — |