Nodes/SparkDiffusion for ComfyUI/SparkDiffusion Doctor
ComfyUI Node

SparkDiffusion Doctor

The sanity check you run before you blame the model

By hiroki-abe-58·Created 24 days ago·Updated 24 days ago· 4
SparkDiffusion Doctor
  • runtime
  • report
◄torch_compile_smoke_testtrue►

If you know this author's other work, the Doctor node won't surprise you. hiroki-abe-58 is the person behind ComfyUI-Win-Blackwell, the RTX 50-series Windows setup - and the reason that project got traction was a single observation: on Blackwell, things break silently. The install succeeds, ComfyUI starts, inference runs, and you're just leaving 30–40% of the card on the table because a dependency quietly swapped your PyTorch build. His answer there was verify_env.py. This node is the same instinct, pointed at SparkDiffusion.

SparkDiffusion is a genuinely fussy stack - a separate Python, a specific CUDA PyTorch, Triton ≥ 3.4, row-wise FP8 GEMMs, fused kernels, a repo checkout, and a pile of model files, none of which live where ComfyUI normally looks. When a run fails you're staring at an error from a subprocess in an environment you didn't set up in this session. Doctor turns that into a list.

What it checks

The node takes the runtime handle you built on the Runtime node and, optionally, a torch_compile_smoke_test toggle (default true). It spawns the runtime interpreter with a probe - for wsl2 that means going in through wsl.exe into the distro - and prints a [PASS] / [WARN] / [FAIL] / [INFO] report, returning it as a plain STRING on the report output. It's an output node, so the report also shows in the graph UI.

What comes back, in order: the host OS and Python; whether ffmpeg/ffprobe are on PATH (only used for output validation, there's a PyAV fallback); the resolved backend and whether the configured WSL distro actually exists; whether sparkdiffusion_repo contains the upstream inference entry point; then the runtime side - its Python, PyTorch version, CUDA runtime and availability. If CUDA is there you get the GPU name, compute capability (sm_120 on Blackwell), and total VRAM with a warning under 24 GiB because 14B profiles want more.

Then the parts that actually matter for speed:

  • FP8 W8A8 (row-wise) - PASS if torch._scaled_mm supports row-wise scaling, WARN if only tensor-wise does (Windows PyTorch builds; fp8_compat=auto will emulate it), WARN with a "use bf16" suggestion if neither.
  • Triton - version, flagged if it's below 3.4 on an sm_120 card, since that's the version that fixes native FP8 MMA lowering for RTX 50-series.
  • Fused kernels - whether sparkdiffusion.ops.fused_kernel imports.
  • torch.compile - a smoke test, when you leave the toggle on.
  • flash-attn - reported as INFO only. It's optional; upstream falls back to PyTorch kernels.

The report ends with the SparkDiffusion commit SHA, which is how you confirm the checkout is the one the pack was validated against.

How to read it

INFO lines are context. WARN lines are the ones to act on - the FP8 row-wise warning on a Windows backend means you're about to take the experimental emulation path, and you should probably switch to backend=wsl2 or set quantization=bf16. FAIL lines are why nothing will run: no runtime interpreter, no repo, no Triton, no CUDA. The standalone script is the same code, if you prefer a terminal:

python scripts/doctor.py

But the README's own framing is right: run the node first, because it's running in exactly the configuration your generation nodes will use.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/hiroki-abe-58/ComfyUI-SparkDiffusion

or Manager → search SparkDiffusion → restart. No packages install into ComfyUI's Python. The one real prerequisite for this node is a configured SparkDiffusion runtime - Doctor has nothing to say until sparkdiffusion_repo and python point at a real environment, and it will FAIL on "Runtime config" if they don't.

Where people get burned

Turning the smoke test off and then wondering why the first generation takes three minutes - compiling to Inductor is slow and you just paid it twice. Or running Doctor without setting model_root: the checks still pass on GPU and kernels, but your first real generation dies with "missing model files," which lists each missing file and its Hugging Face repo. Doctor is a pre-flight check, not a substitute for having the weights.

CategorySparkDiffusion

Inputs (2)

NameTypeDefaultDescription
runtimeSPARKDIFFUSION_RUNTIME—
torch_compile_smoke_testoptBOOLEANtrue—

Outputs (1)

NameTypeDescription
reportSTRING—