Nodes/DGX Nodes/Upscale Model Loader (Unified Memory)
ComfyUI Node

Upscale Model Loader (Unified Memory)

The honest DGX node

By broken-gage·Created 5 months ago·Updated 3 months ago· 1
Upscale Model Loader (Unified Memory)
    • UPSCALE_MODEL
    model_name
    dgx_modetrue
    devicecuda:0
    storage_backendauto

    Let's be straight with each other: an upscaler model is tiny. The whole point of the DGX Nodes pack is loading multi-gigabyte models straight into CUDA on a unified-memory DGX Spark or GB10, and a 4x-UltraSharp or ESRGAN file is a rounding error next to a Flux UNET. So why would you swap your Load Upscale Model for this node? Because you want your whole graph running on one loader family, and because the DGX path keeps even the small models resident instead of letting them get dropped and re-staged between runs. That's the honest pitch. It's still the right node to reach for if you're standardizing a DGX workflow.

    What it does

    Upscale Model Loader (Unified Memory) loads an upscaler from upscale_models/ and outputs an UPSCALE_MODEL - the same type the stock Load Upscale Model produces, wired into UpscaleModel or ImageUpscaleWithModel in the same way. Under the hood it uses spandrel, the same model architecture loader ComfyUI itself uses, so your existing ESRGAN-family and Real-ESRGAN models just work. If you installed spandrel_extra_arches, the node picks those up too - which is how niche architectures keep loading.

    How the DGX path applies

    When dgx_mode is ON and the file is a safetensors, the node reads the weights directly into CUDA and builds the spandrel model from already-resident tensors. If the file is anything else - a classic .pth upscaler, say - it doesn't fail; it automatically falls back to the stock loader. That "never fails, just falls back" behavior is a recurring design choice across this pack, and it's the right one: an upscaler that refuses to load would be an annoying brick, not a feature.

    Inputs

    Short list, nothing exotic:

    • model_name - the file from upscale_models/.
    • dgx_mode - ON (default) for the DGX path, OFF for stock.
    • device - cuda:0.
    • storage_backend - auto (instanttensor first, then fastsafetensors) or a specific backend.

    Installing it

    Same pack, same install, once:

    cd ComfyUI/custom_nodes
    git clone https://github.com/broken-gage/ComfyUI-DGX-Nodes
    pip install -r requirements.txt
    pip install instanttensor fastsafetensors
    

    Or install via ComfyUI Manager by searching DGX Nodes. Restart ComfyUI; nodes appear under DGX Nodes. Requires ComfyUI 0.24.0+.

    Gotchas

    • Don't expect a speed miracle. This node is about consistency, not the 4–5× first-load win the UNET loader gets. If all you need is an upscaler, the stock node is fine and this is a matter of taste.
    • The .pth → stock fallback is worth knowing precisely because it's silent: you might think you're running the DGX path when you're not. If you care, keep your upscalers as safetensors.
    • Same pack-level notes as everywhere: experimental, GPLv3, AI-assisted code with no guaranteed maintenance. Low stakes for an upscaler, but it's worth saying once.
    • And a reminder from the upscaling world: decide whether you want more pixels (ESRGAN-style, what this node loads) or more detail (generative restoration like SeedVR2). They're different jobs, and this loader only handles the first.
    CategoryDGX Nodes

    Inputs (4)

    NameTypeDefaultDescription
    model_nameCOMBOUpscaler model file from ComfyUI's upscale_models directory.
    dgx_modeBOOLEANtrueON: use the DGX unified-memory direct-to-CUDA loading path. OFF: fall back to the stock ComfyUI loading pipeline.
    deviceCOMBOcuda:0CUDA device used for the DGX direct-load path when DGX mode is enabled.
    storage_backendCOMBOautoauto: try instanttensor first (1x memory), then fastsafetensors. instanttensor: experimental CUDA safetensors path; load_now=False for minimal peak memory on unified memory. fastsafetensors: host-mmap + CUDA DMA path; 2x peak physical memory on unified memory systems.

    Outputs (1)

    NameTypeDescription
    UPSCALE_MODELUPSCALE_MODEL