Nodes/ComfyUI_SamplingUtils/Load Diffusion Model (Async)
ComfyUI Node

Load Diffusion Model (Async)

Load Diffusion Model (Async) — the name oversells it, the loader is fine

By silveroxides·Created 11 months ago·Updated 3 months ago· 20
Load Diffusion Model (Async)
    • model
    unet_name
    weight_dtype
    disable_dynamic_vramfalse

    Let's get the elephant in the room named first: "Async" is a lie. Despite the display name "Load Diffusion Model (Async)," this node loads the model synchronously, exactly like ComfyUI's built-in UNETLoader - the queue waits, you watch the progress bar, the end. Don't go looking for background loading or non-blocking model swaps, because they aren't here. What this node does offer is a memory-aware loading path and the fp8 weight-dtype options, which is a real (if modest) reason to use it.

    How it works

    Pick a diffusion model from unet_name (populated from your models/diffusion_models folder), choose a weight_dtype, and out comes a MODEL. The loading goes through the pack's load_diffusion_model helper, which is where the interesting behavior lives:

    • If you have plenty of system RAM (the source thresholds at ≥32 GB total and ≥8 GB free) and the unifiedefficientloader package is installed, it streams the safetensors through UnifiedSafetensorsLoader in low-memory mode - a memory-friendly path that avoids loading the whole file at once.
    • Otherwise it logs "Total and free system RAM is low, falling back to ComfyUI default model loading" and uses ComfyUI's own load_torch_file path.

    So the honest description is: a UNET loader that picks a smarter loading strategy on high-RAM machines. On a typical 16 GB box it just falls back to normal loading and behaves like the stock node.

    The inputs

    • unet_name - the model picker (tooltip: "Select a UNET model to load.").
    • weight_dtype - default, or the three fp8 options: fp8_e4m3fn, fp8_e4m3fn_fast (fp8 plus fast optimizations), and fp8_e5m2. The fp8 formats are the standard memory-saving quantization for diffusion models - if you're VRAM-constrained, fp8_e4m3fn is the usual first stop.
    • disable_dynamic_vram (default false) - per the tooltip, disabling dynamic VRAM optimizations "can reduce VRAM usage at the cost of potentially higher CPU usage and slower performance. Recommended to keep enabled unless you are experiencing VRAM-related issues."

    Where it actually helps

    The one real edge this has over the built-in loader: on big-RAM machines it's the "load a 20+ GB model without spiking RAM like crazy" option, and the fp8 choices are first-class inputs instead of a hidden widget. If you're on a modest machine or never touch fp8, the stock UNETLoader is equivalent and you gain nothing here except the slightly weird name.

    Install

    ComfyUI Manager → search ComfyUI_SamplingUtils, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/silveroxides/ComfyUI_SamplingUtils
    

    then restart ComfyUI. This is the node where dependencies actually matter: requirements.txt includes unifiedefficientloader>=0.5.0 (plus kornia, scipy, pilgram, opencv-python) - and the README's dependency list omits unifiedefficientloader, so if you installed the pack the old-fashioned way you may not have it, and the "smart" loading path silently falls back to ComfyUI's default. If you want the low-RAM path, make sure unifiedefficientloader actually got installed. The pack's README declares itself DEPRECATED in favor of ComfyUI-UtilsCollection; model-loader nodes are core-enough that the successor likely has an equivalent.

    Categoryadvanced/model

    Inputs (3)

    NameTypeDefaultDescription
    unet_nameCOMBOSelect a UNET model to load.
    weight_dtypeCOMBO4 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2
    disable_dynamic_vramBOOLEANfalseIf true, disables dynamic VRAM optimizations when loading the UNET. This can reduce VRAM usage at the cost of potentially higher CPU usage and slower performance. Recommended to keep enabled unless you are experiencing VRAM-related issues with certain models.

    Outputs (1)

    NameTypeDescription
    modelMODEL