Nodes/Remove Background (SET)/Load RemBG model by file
ComfyUI Node

Load RemBG model by file

Load RemBG model by file — for the weights you already have

By set-soft·Created about a year ago·Updated 9 months ago· 18
Load RemBG model by file
  • vae
  • positive
  • model
model
device
dtypeAUTO

The auto-download loaders in this pack are great until you already own the model. That's the gap Load RemBG model by file fills: it scans your local ComfyUI/models/rembg folder and loads whatever checkpoint you point it at, no internet required, no assumption that it's one of the pack's known models. The README names the exact audience - "models that you already downloaded, or perhaps you trained." If you've got a fine-tuned checkpoint, an experimental weight from a paper, or you just migrated a folder of BiRefNet/rembg-era files, this is your loader.

One nice touch: it doesn't just look in models/rembg. The pack also honors rembg and birefnet keys in extra_model_paths.yaml, and it finds models in ~/.transparent-background/ (or wherever TRANSPARENT_BACKGROUND_FILE_PATH points), so a lot of the ecosystem's existing model folders show up here automatically. The node uses the safetensors metadata to detect the architecture - a "LoadModel" that sniffs the weights and builds the right network for them, including whether it's a BEN-style checkpoint with a model_state_dict wrapper.

Inputs

  • model (FILENAME) - pick from the scanned list. Press R in the widget to refresh it after dropping new files in.
  • device - AUTO uses ComfyUI's default target (your GPU).
  • dtype - AUTO matches the weights on disk; forcing float16 is the standard VRAM saving move.
  • vae (optional) - only needed for DiffDIS models, which want the SD Turbo VAE connected.
  • positive (optional) - experimental, DiffDIS only. Leave it unconnected.

Output

A single model (SET_REMBG) output, ready for any processing node. Unlike the auto-downloaders it doesn't emit train_w/train_h or norm_params, because the pack can't know them for arbitrary files - the inference size gets picked from the architecture defaults, so for unusual checkpoints you may want to set width/height explicitly in the advanced processing nodes.

Install

Same pack, same steps:

cd ComfyUI/custom_nodes
git clone https://github.com/set-soft/ComfyUI-RemoveBackground_SET
pip install -r ComfyUI-RemoveBackground_SET/requirements.txt

ComfyUI 0.3.48+, seconohe >= 1.0.6 (fresh pip install git+https://github.com/set-soft/seconohe.git if it errors on import). No downloads happen here - that's the point.

Practical notes: if a file appears in the list but fails to load, the first thing to check is that it's a supported architecture - this loader recognizes the same families as the pack (BiRefNet, MVANet/BEN, U-2-Net, IS-Net, InSPyReNet, MODNet, PDFNet, DiffDIS, and more) via weight-sniffing, so a random ONNX export won't work. And a quiet pitfall worth remembering from the wider background-removal scene: some downloaded checkpoints carry licence restrictions - the loader doesn't check, you do. It's the most flexible node in the RemBG_SET/Load category, and for anyone with a stash of existing weights, it's the one that makes this pack feel like home.

CategoryRemBG_SET/Load

Inputs (5)

NameTypeDefaultDescription
modelCOMBOThe name of the model, the node scans `ComfyUI/models/rembg`
deviceCOMBODevice where the model will be run
dtypeoptCOMBOAUTOData type used for inference. `AUTO` means the same as the model on disk.Using a smaller size will save resources, but might degradate the results.
vaeoptVAESD Turbo VAE for DiffDIS
positiveoptCONDITIONINGExperimental for DiffDIS

Outputs (1)

NameTypeDescription
modelSET_REMBGThe remove background model ready to be used in a processing node