Nodes/DemonAlone-nodes-ComfyUI/ResizeMethodControl
ComfyUI Node

ResizeMethodControl

A remote dropdown for ImageResizeNode's resize strategy

By DemonAlone·Created 7 months ago·Updated 22 days ago· 3
ResizeMethodControl
    • method
    method

    Same idea as its sibling ResizeInterpolationControlNode, aimed at a different setting on the same resize node: this one is a four-way dropdown - stretch, keep proportion, fill / crop, or pad - for how DemonAlone's ImageResizeNode should handle a mismatched aspect ratio, pulled out into its own remote-control node so it can be set from one place instead of buried on the resize node itself.

    What the four options actually do

    • stretch - forces the image to your exact target width and height, aspect ratio be damned. If your source and target ratios don't match, faces and objects get visibly squashed or stretched. It's the option most likely to surprise a beginner the first time they hit it.
    • keep proportion - scales the image to fit entirely inside the target box without distorting it, which means the actual output dimensions can come out smaller than your target on one axis. No cropping, no stretching, just a faithful scale.
    • fill / crop - scales the image to completely fill the target box, aspect ratio preserved, and crops whatever overflows. Reach for this when you need an exact output size - a fixed canvas for a batch of thumbnails, say - and don't mind losing the edges.
    • pad - scales to fit inside the box like keep proportion, then fills the leftover space to hit the exact target dimensions instead of leaving it short. The pad color and any further tuning live on ImageResizeNode itself, not on this control node - this node only decides the strategy.

    The inputs and outputs that matter

    • method - the entire input, a four-way dropdown.

    Output: method, typed as that same four-value combo rather than a plain string, matching whichever downstream node's method input expects those exact literal choices - in this pack, ImageResizeNode.

    How to install it

    ComfyUI Manager: search "DemonAlone-nodes-ComfyUI", install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/DemonAlone/DemonAlone-nodes-ComfyUI, then restart. No models, no heavy dependencies - same as the rest of this pack's utility nodes.

    Common issues & troubleshooting

    Output came out distorted. If things look squashed after wiring this in, check whether method is set to stretch - it's the only one of the four that doesn't preserve aspect ratio, and it's easy to leave selected out of habit if you were just testing.

    Type mismatch on connection. The output is locked to these four literal strings, not a generic string type. Plugging it into a resize node from a different pack that uses different vocabulary for the same idea (like a two-option Fit/Crop control from elsewhere in the ecosystem) won't connect, even though the underlying concept overlaps.

    It doesn't resize anything by itself. No image passes through this node at all - it only outputs a choice. The actual resize, and the actual output dimensions, happen on ImageResizeNode (or whatever consumes this) downstream.

    Skip it for a single resize step. Exactly like its interpolation sibling, this only pays for itself when the method choice needs to be shared, reused, or exposed as a parameter. For one plain resize in a workflow, just set method directly on the resize node.

    Categoryutils

    Inputs (1)

    NameTypeDefaultDescription
    methodCOMBO4 options: stretch, keep proportion, fill / crop, pad

    Outputs (1)

    NameTypeDescription
    methodstretch,keep proportion,fill / crop,pad