Process Image Prompt
The depth-map preprocessor that keeps resolutions legal
- img
- scaled_width
- scaled_height
- img
Depth maps are the quiet backbone of architectural-rendering workflows - they tell the model where the walls are, where the floor recedes, how deep the room is. But a depth map straight out of a snapshot is rarely a friendly size for SDXL, and feeding it into conditioning at the wrong resolution is a classic way to get a mushy render. Process Image Prompt exists to fix exactly that: it takes any image (depth maps especially), rescales it so its shorter side is a clean 512 or 1024, crops to a multiple of 64, and hands you the result plus the new dimensions.
It's one of the few nodes in this pack that works on a single image rather than lists, which makes it easy to wrap your head around. One img in, three values out:
scaled_width,scaled_height- the dimensions after scaling. These are INT outputs, and they're the pack's recommended way to set your latent size so the depth map and the generation canvas are exactly aligned. The workflow's stock graphs wire these into the sampler setup, which is why the whole thing composes.img- the resized and cropped image tensor, ready to feed into ControlNet or any image-conditioning node.
The mechanics
scale_img_to defaults to 1024 and offers only 512 and 1024 - a deliberate constraint, not an oversight. The logic: find the shorter side, scale so it equals the target, then round both dimensions up to the nearest multiple of 64 with a center-crop to match. There's a hard ValueError if you somehow pass something that isn't 512 or 1024, and the node defensively resets an empty value back to 1024 (the author left a comment noting ComfyUI has "behaved weirdly" about defaults here).
Because it's an output node, it also shows you the result in its UI: the given width/height, the scaled width/height, and a base64 preview of the processed image. Drop it after the depth output of PseudoUnpackModelSnapshot and you can watch the depth map get normalized before it ever reaches a ControlNet loader.
When to actually use it
- Depth guidance for the scene - the pack's README wants a ControlNet depth model (
lllyasviel/sd-controlnet-depth) installed inmodels/controlnet, and this node is how you prep its input. - Any reference image you intend to condition on - style refs, sketch passes, whatever; the multiple-of-64 rule applies to all of them.
- Not for masks. Masks have their own path through PseudoProcessMaterialPrompts, which handles a whole list at once. This node is for the single, full-frame guidance images.
Nothing to install beyond the pack - git clone https://github.com/Pseudotools/Pseudocomfy into custom_nodes and restart. It's a small node, but in a pipeline where a 1397×761 depth map silently degrades your whole render, "small" is exactly what you want.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| img | IMAGE | — | |
| scale_img_to | COMBO | 1024 | 2 options: 512, 1024 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| scaled_width | INT | — |
| scaled_height | INT | — |
| img | IMAGE | — |