Nodes/XB_ToolBox/XB-BOX - 自定义高级采样器(原版优化)
ComfyUI Node

XB-BOX - 自定义高级采样器(原版优化)

ComfyUI's most flexible sampler, gift-wrapped with a cleanup dropdown

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - 自定义高级采样器(原版优化)
  • noise
  • guider
  • sampler
  • sigmas
  • latent_image
  • LATENT
  • LATENT
cleanup不做任何清理

If XB_SamplerCustom is the friendly version, this is the one that assumes you know what you're doing. XB_SamplerCustomAdvanced is a pass-through wrapper around ComfyUI's stock SamplerCustomAdvanced - the sampler where noise, guidance, and schedule are all separate objects you wire in yourself - with the pack's cleanup dropdown added before execution. Same relationship as the ROCm-prefixed alias it shadows (XB_ROCmSamplerCustomAdvanced): same node, legacy name kept for old workflows.

The wrapper is deliberately brainless. The pack's source calls the official node "verbatim, zero parameter changes," then just runs the four-level memory cleanup in front. So everything you know about SamplerCustomAdvanced transfers: no model, no cfg widget, no seed on the node itself. Instead:

  • noise - your RandomNoise node. Your seed lives there.
  • guider - BasicGuider (or CFGGuider / BasicGuiderPlus for fancier guidance). This is where conditioning enters.
  • sampler - a SamplerSelect.
  • sigmas - a BasicScheduler or custom sigma chain.
  • latent_image - the starting latent.
  • cleanup - the pack's four levels: none / cache purge / unload models to RAM / unload everything plus gc.collect().

Outputs are the standard pair: output (final latent → VAE Decode) and denoised_output (latent one step before final denoise, for tail-refinement workflows).

The reason this wrapper exists

It's honest plumbing. The pack's pitch is "one toolbox for beginners and low-VRAM AMD users," and its native territory is 8–16GB cards running Wan/LTX-class video models that OOM the moment you look at them. If your run dies halfway through the schedule, the cleanup dropdown gives you a way to force ComfyUI to free the cache or unload a model right before the sampler fires - no custom boot flags, no editing lowvram settings. It's a sledgehammer compared to ComfyUI's own automatic memory management (which, per the KB, is already doing real offloading work), but sledgehammers have their place.

When NOT to use it

Honestly, most of the time. If you're new and you copied a workflow containing this, swap in a plain SamplerCustom or KSampler until you understand the NOISE/GUIDER/SIGMAS dance - this node shows every moving part, and every one of them can be mis-wired. The flexibility is the point; it's also the footgun. The RandomNoise seed is the classic gotcha: change the seed on the sampler and nothing happens, because the seed lives on the noise node.

Install: Manager → search XB_ToolBox, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes, restart. No extra dependencies for this node - it wraps ComfyUI core only, and registers only when comfy_extras.nodes_custom_sampler imports cleanly, i.e. on current ComfyUI.

CategoryXB_ToolBox/原版优化

Inputs (6)

NameTypeDefaultDescription
noiseNOISE
guiderGUIDER
samplerSAMPLER
sigmasSIGMAS
latent_imageLATENT
cleanupCOMBO不做任何清理4 options: 不做任何清理, 单次缓存清理, 卸载显存模型, 卸载全量模型

Outputs (2)

NameTypeDescription
LATENTLATENT
LATENTLATENT