Nodes/Comfyroll Studio/βš™οΈ CR Select Resize Method
ComfyUI Node Runs on cloud

βš™οΈ CR Select Resize Method

A two-option dropdown for Fit vs Crop

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,287
βš™οΈ CR Select Resize Method
    • method
    • show_help
    β—„methodβ–Ύβ–Ί

    About as small as a node gets: a two-option dropdown - Fit or Crop - that outputs whichever one you picked. It exists so you can turn a resize decision into an upstream widget instead of a buried setting on whatever resize node consumes it.

    What it's actually for

    Plenty of image-resizing nodes across the ecosystem (including several elsewhere in Comfyroll) take a "how do you want to handle a mismatched aspect ratio" parameter: Fit scales the image to stay entirely within the target box, possibly leaving empty space; Crop scales it to fill the box completely, cropping whatever overflows. This node doesn't do either of those things itself - it's purely a selector that hands the chosen mode to whatever downstream node actually performs the resize. Useful if you want that choice controllable from one place, or exposed as an input on a workflow you're packaging for someone else to run via the API.

    How it works

    Pick method - Fit or Crop - and it comes straight back out on the output pin. That's the entire node.

    The inputs and outputs that matter

    • method - the two-choice dropdown. The whole input.

    Output: method, typed as a wildcard (*) rather than a specific type, so it can be wired into any node's input expecting one of these two literal string values - plus the standard show_help link.

    How to install it

    Comfyroll Studio (Suzie1 and RockOfFire), no models or heavy dependencies.

    • ComfyUI Manager - search "Comfyroll Studio," install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, then restart.

    Common issues & troubleshooting

    The downstream node doesn't accept the output. Because this outputs a wildcard type, ComfyUI will let you connect it almost anywhere, but the receiving node still needs to actually understand the literal strings Fit or Crop - plugging it into a node that expects some other resize-mode vocabulary (like stretch/pad, or numeric scale factors) won't do anything useful even though the wire connects without an error.

    Wondering why you'd use this instead of just picking the mode directly on the resize node. You wouldn't, for a single resize step - this only earns its place when you want that choice pulled out as a shared input across multiple resize nodes, or exposed as a parameter on a workflow other people (or the API) will run without editing the graph.

    Comfyroll nodes missing entirely. If nothing from the pack loads, check your startup log for Comfyroll Studio: Failed to load Graphics nodes and a trailing NameError: name 'CR_HalftoneGrid' is not defined - a symptom of an earlier import error, commonly a Pillow version conflict from another custom node taking the whole pack down. Force-reinstall Pillow (pip install --upgrade --force-reinstall pillow) or reinstall the folder cleanly, then restart.

    Category🧩 Comfyroll Studio/πŸ› οΈ Utils/βš™οΈ Other

    Inputs (1)

    NameTypeDefaultDescription
    methodCOMBO2 options: Fit, Crop

    Outputs (2)

    NameTypeDescription
    method*β€”
    show_helpSTRINGβ€”