Nodes/ComfyUI-AusBoss/Load Image πŸ†Ž
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.

By ausbossΒ·Created 4 months agoΒ·Updated about 5 hours agoΒ· 163
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)

    NameTypeDefaultDescription
    imageCOMBOThe picture to load. Pick one from ComfyUI's input folder or upload a new one.
    sizeCOMBOoffHow 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.
    megapixelsFLOAT1.000.01–64For megapixels: the picture's total size. 1.0 is about 1024 x 1024.
    longest_sideINT102416–16384For longest side: the length of the longer edge, in pixels. The other edge follows.
    scaleFLOAT1.000.05–8For scale: 0.5 is half the size, 2 is double.
    widthINT102416–16384For fit inside, crop to fill and crop: the box's width in pixels.
    heightINT102416–16384For fit inside, crop to fill and crop: the box's height in pixels.
    multipleINT81–256Rounds 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.
    methodCOMBOlanczosHow pixels are resampled. lanczos is the sharpest for photos; nearest keeps pixel art crisp.
    enlargeBOOLEANtrueOn: 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_fromCOMBOcenterFor the three crop choices: the part of the picture that is kept. top keeps the top and cuts from the bottom.
    ratioCOMBO1:1For crop to ratio: the shape to cut, width to height. width : height uses the numbers in the width and height boxes.

    Outputs (7)

    NameTypeDescription
    imageIMAGEThe picture, at its new size.
    maskMASKWhite where the picture is see-through, black where it is solid. All black for a picture with no transparency. Same size as the picture.
    widthINTWidth of the picture that comes out, in pixels.
    heightINTHeight of the picture that comes out, in pixels.
    filenameSTRINGThe file's name without its folder or its ending, ready for a save node's prefix.
    original_widthINTWidth of the file before any resize.
    original_heightINTHeight of the file before any resize.