Diffusion Model Loader KJ
节点功能:用于加载diffusion model,它提供了比标准 ComfyUI 模型加载器更多的优化选项和精度控制功能。Diffusion Model Loader
节点中英文对比
Diffusion Model Loader KJ
model_name
weight_dtype
compute_dtype
patch_cublaslinear
sage_attention
enable_fp16_accumulation
Diffusion Model Loader KJ
model_name
weight_dtype
compute_dtype
patch_cublaslinear
sage_attention
enable_fp16_accumulation
Diffusion Model Loader KJ - 参数说明
输出参数
MODEL
加载完成并应用补丁的 Diffusion 模型结构。
控件参数
model_name
要加载的模型权重名称,从 models/diffusion_models 文件夹中选择。
weight_dtype
指定模型权重加载时使用的精度格式。
compute_dtype
指定模型推理过程的计算精度类型,默认为 default。
patch_cublaslinear
是否启用 torch.nn.Linear 的替代实现 CublasLinear,仅首次加载模型时生效。注意:启用后需清除模型缓存后重新加载才生效。
sage_attention
替换 Attention 实现为 SageAttention,提供多个低精度后端选项。
disabled:关闭该功能,使用默认注意力机制。
auto:自动选择适合的后端(推荐)。
sageattn_qk_int8_pv_fp16_cuda:CUDA后端,混合精度。
sageattn_qk_int8_pv_fp16_triton:Triton后端(适用于 AMD/NVIDIA)。
sageattn_qk_int8_pv_fp8_cuda:更高压缩比的混合精度模式。
建议在显存紧张或批量推理场景下开启。
enable_fp16_accumulation
启用 FP16 累积计算(需 PyTorch 2.7.0 nightly 及以上)
暂无节点说明