Nodes/DreamO Comfyui/DreamO Processor Loader
ComfyUI Node

DreamO Processor Loader

The boring node that does the heavy lifting — background removal and face parsing, loaded once

By ToTheBeginning·Created about a year ago·Updated about a year ago· 182
DreamO Processor Loader
    • DREAMO_PROCESSOR

    Every node pack has one node nobody talks about that makes the whole thing run, and in ComfyUI-DreamO it's this one. DreamOProcessorLoader has no inputs and one output (DREAMO_PROCESSOR) - it loads the two image-preprocessing models DreamO needs and hands them to DreamORefEncode. You wire it once, forget it exists, and it just sits there in the graph holding the door.

    Why it exists

    DreamO's reference tasks don't start from a raw photo. The ip task wants the subject cut out of the background; the id task wants a face detected, aligned and cropped. Both of those are real neural networks, and re-instantiating them per image would be wasteful - so the loader brings them up once and keeps them around.

    Concretely, on first run it does two things:

    • Downloads BEN2 (model.safetensors from PramaLLC/BEN2) into ComfyUI/models/dreamo. Auto-download via hf_hub_download - no manual step, though the first run waits on a several-hundred-MB pull. BEN2 is a Swin-Transformer-based background-erase network with MIT weights.
    • Initializes a FaceRestoreHelper from the forked facexlib: a retinaface_resnet50 face detector plus a face parsing model, at face size 512.

    One nice touch in the source: it moves the face detector and parser to the offload device immediately, so the loader doesn't squat on your VRAM between encodes. BEN2 only loads to the GPU when DreamORefEncode actually calls it, then offloads again.

    The trap: it has to be the forked facexlib

    The README warns in bold: you must have the forked facexlib, not the original - otherwise you get face parsing errors. The fork ships from git+https://github.com/ToTheBeginning/facexlib.git, and the pack's requirements.txt installs exactly that. If you already had the original facexlib installed for another pack, that's your first suspect when things break - uninstall it and re-run pip install -r requirements.txt.

    Install

    ComfyUI Manager (search "DreamO") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ToTheBeginning/ComfyUI-DreamO.git
    pip install -r requirements.txt
    

    Restart ComfyUI. The dependencies are the standard ByteDance research stack - diffusers, transformers, sentencepiece, timm, einops, protobuf - plus that facexlib fork. The only model this node needs (BEN2) downloads itself, so there's no manual model file to hunt down. If you've already got FLUX.1-dev, t5xxl, the DreamO LoRAs and flux-turbo from the pack's other nodes, this one is zero extra effort.

    About BEN2, honestly

    Worth knowing for context: BEN2 launched in February 2025 with "new SOTA background remover" fanfare, and it mostly went nowhere as a standalone product - the KB's background-removal essay clocked it at 25 total community mentions, drowned out by BiRefNet and InSPyReNet. But none of that matters here. Inside DreamO it's a perfectly good MIT-licensed cutout model doing exactly the job the ip task needs, and it's the id task's fallback when no face is detected. The hype failure is the pack's win: you get a competent background remover bundled in, no license headaches.

    If you hit trouble: face parsing errors almost always mean the wrong facexlib; OOM at 1024 resolution is usually Flux itself, not this node - but BEN2 does hold a few GB while it runs, so --lowvram/--medvram and fp8 Flux remain the standard remedy.

    Categorydreamo

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    DREAMO_PROCESSORDREAMO_PROCESSOR