Nodes/BSAI-ComfyUI-Prism/BSAI Prism Turbo Optimizer (torch.compile)
ComfyUI Node

BSAI Prism Turbo Optimizer (torch.compile)

A ComfyUI node in BSAI/Prism/Turbo with 10 inputs and 2 outputs.

By xm6018924·Created 24 days ago·Updated 11 days ago· 2
BSAI Prism Turbo Optimizer (torch.compile)
  • prism_model
  • prism_model
  • status
◄enable_torch_compilefalse►
◄compile_modedefault►
◄compile_dynamicfalse►
◄enable_cache_dittrue►
◄cache_dit_fn1►
◄cache_dit_bn1►
◄cache_dit_rdt0.24►
◄cache_dit_mc3►
◄quantize_modenone►
CategoryBSAI/Prism/Turbo

Inputs (10)

NameTypeDefaultDescription
prism_modelBSAI_PRISM_MODEL—
enable_torch_compileBOOLEANfalsetorch.compile on the transformer forward. Note: the custom BSA Triton kernels may fail to compile on PyTorch 2.13 + sm_120. Off by default; rely on Cache-DiT + CFG Rescale instead.
compile_modeCOMBOdefaultdefault = no CUDA graphs (compatible with cudaMallocAsync); reduce-overhead = CUDA graphs, fastest but conflicts with --cuda-malloc; max-autotune = most aggressive optimization.
compile_dynamicBOOLEANfalsedynamic=True supports variable shapes (slower but more flexible); False compiles for a fixed shape (fastest). Choose False when the resolution is fixed.
enable_cache_ditBOOLEANtrueCache-DiT block-level caching (validated 7.4x speedup by SGLang). Skips block recomputation when the input changes little.
cache_dit_fnINT10–10Always compute the first N blocks (cache disabled). Default 1.
cache_dit_bnINT10–10Always compute the last N blocks. Default 1.
cache_dit_rdtFLOAT0.240.05–1Residual difference threshold. Smaller = stricter (more recompute, better quality); larger = more aggressive (more skips, faster). Default 0.24.
cache_dit_mcINT31–10Maximum consecutive cached steps; after that a recompute is forced. Default 3.
quantize_modeCOMBOnonefloat8_dynamic = W8A8 fp8, halves VRAM; int4_weight_only = W4A16, 4-bit weights use 1/4 VRAM, activations uncompressed, best quality; int4_float8_dynamic = W4A8, 4-bit weights + fp8 activations, maximum Blackwell speedup.

Outputs (2)

NameTypeDescription
prism_modelBSAI_PRISM_MODEL—
statusSTRING—