CRM Preprocessor For Poser
Getting your reference image ready for 3D without wrecking it
- reference_image
- reference_mask
- processed
Before CRM can imagine the other five sides of your object, it needs to see the object in exactly the format it was trained on. Feed it a raw photo with a busy background and you'll get six views full of hallucinated scenery. CRM Preprocessor For Poser exists to prevent that: it takes your image plus a background mask and normalizes it into the gray-background, square, centered reference that the pose and CCM samplers expect. It's the node that decides whether your mesh looks like the object or like the object's worst fan-fiction.
What it does, step by step
The source is refreshingly readable. It takes your reference_image and reference_mask, combines them into an RGBA image (alpha channel = your mask, so the background goes transparent), then:
- Scales the subject by
foreground_ratio- the content shrinks but the canvas stays the same size, with transparent padding around it. - Expands to square - pads to 1:1 on the shorter axis.
- Composites onto a flat gray background (
#7F7F7F) and converts to RGB.
That middle-gray backdrop is the key detail. The CRM / ImageDream models were trained on orthographic renders against gray backgrounds, so the gray is load-bearing: it tells the diffusion "this is the void, object lives in the middle." If you skip the preprocessor entirely the whole pipeline quietly degrades.
Inputs that matter
reference_image- yourIMAGE, straight from whatever did the background removal.reference_mask- aMASKmarking the subject. In the pack's demo workflows this comes from ComfyUI_essentials' RemBG node (u2net by default) - so yes, background removal is assumed to have already happened. The mask quality is your mesh quality: fine hair and translucent edges survive only as well as the mask does.foreground_ratio-FLOAT, default1, range 0.5–1.0. How much of the frame the subject occupies. 1.0 keeps it full-size; dialing down to ~0.8 shrinks it into the frame, which can help when the subject's edges are clipped or you want margin around it. Step 0.1, so it's a coarse knob on purpose.
Output: a single processed IMAGE that feeds CRM PoserConfig's processed_image input, and that's it - one wire, and the pipeline picks it up from there.
Practical notes
- Square up the image first. The node pads to square but it's cheaper to feed something near-square. If you feed a wildly portrait image, you'll get huge gray side-bars and a tiny subject.
- Gray is intentional. It looks dead, it's supposed to. Do not "fix" it by feeding the RGB image back - that's the format the models want.
- The mask is the real input. Skip the mask (or feed a blank one) and the whole subject turns transparent-ish and you get garbage. If your background removal is weak, fix that stage, not this node.
Installation
Standard pack install: ComfyUI Manager (search "ComfyUI-Flowty-CRM") or clone into custom_nodes and pip install -r requirements.txt. No model downloads for this node itself - it's pure image math - but the demo workflow wants ComfyUI_essentials for the RemBG step, and the diffusion checkpoints still need to be in models/checkpoints. Run the whole graph on one device, and use the low-vram/ split workflows if you're under 16GB VRAM.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| reference_image | IMAGE | — | |
| reference_mask | MASK | — | |
| foreground_ratio | FLOAT | 1.00.5–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| processed | IMAGE | — |