Nodes/demofusion-comfyui/Demofusion From Single File
ComfyUI Node

Demofusion From Single File

DemoFusion, but on your own checkpoints — the node people actually use

By deroberon·Created 3 years ago·Updated 2 years ago· 88
Demofusion From Single File
    • IMAGE
    ckpt_name
    positive
    negative
    width2048
    height2048
    inference_steps40
    cfg7.5
    seed522

    If you landed here you probably met the pack's other node first - the plain Demofusion node that downloads a full diffusers-format SDXL from Hugging Face on its first run. This one is the fix for that. Same DemoFusion technique, same core, but ckpt_name is now a dropdown of the checkpoints already sitting in your ComfyUI/models/checkpoints folder, loaded via diffusers' from_single_file path in safetensors fp16. The README's "Update: now you can also use local SDXL checkpoints!" was the line that made this pack usable, and it's the variant the community points people to.

    Quick recap of what DemoFusion even is, since you're probably here because you want huge images without training: Ruoyi Du and the PRIS-CV group's 2023 paper, "Democratising High-Resolution Image Generation With No $$$." The trick is to sample at SDXL's native 1024px, then progressively upscale the latents ~2x per stage toward your target, re-injecting the upscaled previous stage via a "skip residual" while denoising, plus a windowed "dilated sampling" pass - overlapping patches at a 64px stride, gaussian-blended together - so the model sees fine detail it was never trained on at that size. All those knobs (cosine blending schedules, sigma, stride) are hardcoded in the node. What you get out is a single IMAGE, the final highest-resolution frame, ready to wire into PreviewImage or SaveImage - which is exactly what the bundled example workflow does.

    One caveat that actually matters: this is SDXL-specific. DemoFusion is an SDXL method and the pipeline is an SDXL pipeline (dual text encoders, SDXL's latent space), so don't try to feed it an SD 1.5 checkpoint and expect anything meaningful. Drop an SDXL .safetensors into models/checkpoints, pick it from the dropdown, and go.

    The inputs that matter: width and height are the show, floored at 2048 (2x SDXL native) up to 4096 in steps of 64. The author validated square 2048 and 3072 outputs; treat other aspect ratios as your own experiment. inference_steps defaults to 40, cfg to 7.5 - both fine starting points.

    Install is the same as any custom node: search "demofusion-comfyui" in ComfyUI Manager, or git clone https://github.com/deroberon/demofusion-comfyui into ComfyUI/custom_nodes and restart. First import auto-installs diffusers~=0.21.4 and matplotlib if missing. That pinned, old diffusers is the thing to watch: it can clash with other custom nodes that need a newer diffusers in the same Python environment.

    Real-world expectations, from people who actually ran it: it uses about 12GB VRAM at 2048x2048 on a 4090 (the README quotes 18GB+, so be generous), and takes around a minute per image at that size. 12GB cards are on the edge and will want lowvram mode, which makes the minute longer. The technique's known weaknesses show up here too - indistinct, "splotchy" background detail at the top end and occasional seams. And it's a walled garden: no conditioning or model ports, just text in and an image out, so your usual KSampler and ControlNet stack doesn't plug into it.

    Is it worth it? If you want to try DemoFusion at all, this is the node to do it with - real checkpoints you already trust, no hub download, coherent structure even at 2048px, which is more than plain hi-res fix reliably gives you. It's slow and VRAM-hungry and a 2023 novelty by now, but for a single self-contained giant-image box it still does something most other nodes won't.

    Categorytests

    Inputs (8)

    NameTypeDefaultDescription
    ckpt_nameCOMBO0 options:
    positiveSTRING
    negativeSTRING
    widthINT20482048–4096
    heightINT20482048–4096
    inference_stepsINT401–100
    cfgFLOAT7.51–20
    seedINT522

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE