XB-BOX - 自定义高级采样器(原版优化)
The same old advanced sampler, now with a panic button for your VRAM
- noise
- guider
- sampler
- sigmas
- latent_image
- output
- denoised_output
The "Advanced" in this name is doing the heavy lifting, and the "ROCm" is doing almost nothing. Like its sibling XB_ROCmSamplerCustom, this is a wrapper around ComfyUI's official SamplerCustomAdvanced - the low-level sampler for people who want to control noise, guidance, and scheduling as separate objects - with one extra cleanup dropdown bolted on front. The ROCm prefix is a legacy name that survives so old AMD-era workflows keep connecting; there's nothing GPU-vendor-specific in the code.
The key difference from the non-advanced version: you don't hand it model and cfg and a seed. Instead you bring your own NOISE, your own GUIDER, your own SAMPLER, and your own SIGMAS. That's the "advanced" contract - the pieces of sampling that KSampler hides inside one node are all explicit here. This is the node you reach for when you're building a custom pipeline: a RandomNoise for noise, a BasicGuider (plus BasicGuiderPlus/CFGGuider variants) for guidance, SamplerSelect for the sampler, and BasicScheduler for sigmas.
What to feed it
- noise (NOISE) - usually a
RandomNoisenode with your seed. This is where your seed lives, not on the sampler. - guider (GUIDER) -
BasicGuiderwired from your conditioning. If you're doing the CFG-inverted flow-matching thing, the guider is where you set guidance to 1 (i.e., off). - sampler (SAMPLER) and sigmas (SIGMAS) - same as the plain custom sampler: pick a
SamplerSelectand aBasicScheduler. - latent_image - starting latent.
- cleanup - the four-level ladder shared across the pack: nothing / cache-only / unload models to RAM / unload everything and
gc.collect().
Outputs are output and denoised_output, both LATENT. output goes to your VAE Decode. denoised_output is the state one step before the final denoise - useful for the "sample most of the way, then swap in a fresh schedule for the tail" workflow that power users love and beginners usually skip.
When is this actually worth it?
Two honest use cases. First, you're on a low-VRAM card (the pack is aimed hard at AMD/ROCm and 8–16GB GPU owners) and you're running video models that push the memory envelope - the cleanup dropdown lets you force ComfyUI to unload a model before this stage runs, which is a crude but effective way to keep a heavy workflow from OOMing mid-schedule. Second, you're deliberately building a custom sampler chain where you want noise, guidance, and scheduling as separate swappable objects.
For a beginner? Don't reach for this first. The plain SamplerCustom (or a KSampler) will do what you want with a fraction of the wiring. This node earns its keep when you already understand why you want each stage separated - at which point the extra dropdown is a freebie.
Install is the same as every node in this pack: ComfyUI Manager → search XB_ToolBox → install → restart, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes. No extra dependencies for this specific node - it's a pure wrapper around ComfyUI core. One trap: it registers only when comfy_extras.nodes_custom_sampler exists, which is true on all current ComfyUI builds. If it's missing from your node list, update ComfyUI before you blame the pack.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| noise | NOISE | — | |
| guider | GUIDER | — | |
| sampler | SAMPLER | — | |
| sigmas | SIGMAS | — | |
| latent_image | LATENT | — | |
| cleanup | COMBO | 不做任何清理 | 4 options: 不做任何清理, 单次缓存清理, 卸载显存模型, 卸载全量模型 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output | LATENT | — |
| denoised_output | LATENT | — |