ComfyUI Node
Load Image π
Loads a picture and sets its size in the same node. Pick a file, upload one, or step through the input folder with the arrows. Size can stay off, or bring the picture to a megapixel count, a longest side, a scale, a box it must fit inside, or a box it fills by cropping. It can also cut a piece or a shape out of the picture without resizing, keeping the side you choose. The node shows the picture going in and coming out, with both sizes, before you run.
Load Image π
- image
- mask
- width
- height
- filename
- original_width
- original_height
βimageβΎβΊ
βsizeoffβΊ
βmegapixels1.00βΊ
βlongest_side1024βΊ
βscale1.00βΊ
βwidth1024βΊ
βheight1024βΊ
βmultiple8βΊ
βmethodlanczosβΊ
βenlargetrueβΊ
βcrop_fromcenterβΊ
βratio1:1βΊ
Categoryπ AusBoss/Image
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | The picture to load. Pick one from ComfyUI's input folder or upload a new one. | |
| size | COMBO | off | How the picture is resized. off keeps it as it is. megapixels, longest side and scale keep its shape. fit inside shrinks or grows it to sit in a box. crop to fill covers the box and cuts off what sticks out. crop cuts a piece out without resizing. crop to ratio cuts the largest piece of a shape. |
| megapixels | FLOAT | 1.000.01β64 | For megapixels: the picture's total size. 1.0 is about 1024 x 1024. |
| longest_side | INT | 102416β16384 | For longest side: the length of the longer edge, in pixels. The other edge follows. |
| scale | FLOAT | 1.000.05β8 | For scale: 0.5 is half the size, 2 is double. |
| width | INT | 102416β16384 | For fit inside, crop to fill and crop: the box's width in pixels. |
| height | INT | 102416β16384 | For fit inside, crop to fill and crop: the box's height in pixels. |
| multiple | INT | 81β256 | Rounds the new width and height to a multiple of this. Most models want 8 or 16. 1 leaves the numbers as they are. Not used while size is off. |
| method | COMBO | lanczos | How pixels are resampled. lanczos is the sharpest for photos; nearest keeps pixel art crisp. |
| enlarge | BOOLEAN | true | On: a small picture is made bigger to reach the size you asked for. Off: a picture is only ever made smaller, and a small one comes out at its own size. |
| crop_from | COMBO | center | For the three crop choices: the part of the picture that is kept. top keeps the top and cuts from the bottom. |
| ratio | COMBO | 1:1 | For crop to ratio: the shape to cut, width to height. width : height uses the numbers in the width and height boxes. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The picture, at its new size. |
| mask | MASK | White where the picture is see-through, black where it is solid. All black for a picture with no transparency. Same size as the picture. |
| width | INT | Width of the picture that comes out, in pixels. |
| height | INT | Height of the picture that comes out, in pixels. |
| filename | STRING | The file's name without its folder or its ending, ready for a save node's prefix. |
| original_width | INT | Width of the file before any resize. |
| original_height | INT | Height of the file before any resize. |