Image Preprocessor
Clean the reference before you spin it
- remove_bg_fn
- image
- IMAGE
This is the node that actually does the background removal in MV-Adapter's image-to-multiview workflow. The BiRefNet node loads a remover and hands over a function; this node calls that function on your reference image, strips the background, and resizes the result to the exact dimensions the sampler wants. Out comes a clean, square-ish subject on nothing, ready to be turned into six consistent views.
Think of the pairing as "load the tool" (BiRefNet) then "use the tool" (Image Preprocessor). Neither does the whole job alone.
Why the reference has to be clean
MV-Adapter's image-to-multiview mode takes one photo and generates that same object seen from front, side, back, and the angles in between. It's inferring geometry from a single view - a hard problem - and anything that isn't the subject is noise that pollutes the result. A cluttered background gets read as part of the object, the generated back-view invents furniture, and the whole thing wobbles. Removing the background first is not optional polish; it's what makes the consistency work. This is the same product-photography instinct the wider ecosystem settled on years ago: extract the subject cleanly, then do something with it.
The inputs that matter
Four required inputs, and only two are real decisions:
remove_bg_fn(FUNCTION) - comes from the BiRefNet node. This is the wiring that makes the pair a pair; without it the node has no remover to call.image(IMAGE) - your reference photo, the single view you want turned into a full set.widthandheight(INT, both default 768) - the output size. Match these to thewidthandheightyou set on the Diffusers MV Sampler. SDXL's native tile is 768–1024, and 768 is the sensible default the whole pack is tuned around; going off-size just invites stretched geometry.
The single output is IMAGE - the background-free, resized subject. It wires into the reference_image slot on the Diffusers MV Sampler, which is the input that switches the sampler from pure text-to-multiview into image-guided mode.
Installing it
It ships with the pack. ComfyUI Manager, search ComfyUI-MVAdapter, install, restart - or:
cd ComfyUI/custom_nodes
git clone https://github.com/huanngzh/ComfyUI-MVAdapter
pip install -r requirements.txt
and restart. First run downloads the background-removal weights (via the BiRefNet node) plus the SDXL and adapter models, so budget a few minutes and a connection the first time.
Where people get burned
The biggest one is just forgetting the node exists. People try to feed a raw photo straight into the sampler's reference slot, get muddy multi-view output, and blame the adapter. The reference has to be preprocessed first - that's the node's entire reason to be.
Second, mismatched sizes. If width/height here don't match the sampler, you'll get squished results or a subject that doesn't fill the frame. Keep them locked together.
Third, remember this only removes and resizes - it doesn't fix a bad source photo. A blurry, dark, or heavily occluded reference gives the adapter little to work with, and no amount of clean-background prep recovers detail that was never in the shot. Feed it a sharp, well-lit, roughly front-on view of the object and the multi-view step has a fighting chance.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| remove_bg_fn | FUNCTION | — | |
| image | IMAGE | — | |
| height | INT | 7681–2048 | — |
| width | INT | 7681–2048 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |