Nodes/ComfyUI-SmartGridCutter/Smart Grid Cutter (URL) βœ‚οΈπŸ”—
ComfyUI Node

Smart Grid Cutter (URL) βœ‚οΈπŸ”—

Same grid cutter, but you hand it a URL instead of a tensor

By veoregΒ·Created 4 months agoΒ·Updated 4 months agoΒ· 0
Smart Grid Cutter (URL) βœ‚οΈπŸ”—
    • frame_0
    • frame_1
    • frame_2
    • frame_3
    • frame_4
    • frame_5
    • frame_6
    • frame_7
    • frame_8
    • cols
    • rows
    • total_frames
    • grid_info
    β—„image_urlβ–Ί
    β—„modeβ–Ύβ–Ί
    β—„custom_cols3β–Ί
    β—„custom_rows3β–Ί
    β—„divider_threshold0.15β–Ί
    β—„padding2β–Ί
    β—„align_to16β–Ί

    Smart Grid Cutter (URL) is the same node as Smart Grid Cutter - identical detection, identical cutting, identical outputs - except instead of an IMAGE tensor it takes a URL string, downloads the picture itself, and splits it. The point of the variant isn't the cutting, it's the plumbing: this is the version you wire into automation, the n8n / API workflows the author built it for.

    A quick naming clarification, because it trips people up: the "URL" in the name means it takes a URL as its input, not that it calls an external API. There's no key, no cloud service, nothing leaving your machine except the download request. The node is the thing that fetches the image, then the cutting happens locally exactly like the regular node.

    How it works

    cut_from_url does a plain urllib GET with a 30-second timeout, reads the bytes, opens them with PIL, converts to RGB, and hands the result to the exact same cut_grid routine the non-URL node uses. All the detection, aspect-ratio fallback, padding, and 16px alignment behave identically.

    The trade-offs fall out of that mechanism. Because it's a plain unauthenticated GET, the URL has to be publicly reachable (or at least reachable from whatever machine runs ComfyUI). No auth headers, no session cookies - if the image sits behind a login, this node can't reach it. And because it uses urllib, it'll follow plain HTTP and HTTPS but don't expect it to handle exotic setups gracefully. The 30-second timeout is a real ceiling: a slow, large image that stalls past it fails the node.

    The inputs

    • image_url - the only thing that differs from the base node. Paste the direct URL to the image file.
    • mode - same auto / 3x3 / 4x2 / 3x2 / 2x2 / custom choices as the main node, and auto is still the sensible default for grids you don't know in advance.
    • The rest match the base node: padding for trimming divider artifacts, align_to for video-friendly dimensions, custom_cols / custom_rows for custom mode.

    One small omission to know about: this variant doesn't expose min_divider_width, and when it delegates to the main cutter it hardcodes that value at 2. For the normal case - clean storyboards and contact sheets - it's a non-issue.

    Outputs are the same nine frame_0 through frame_8 IMAGE slots plus cols, rows, total_frames, and grid_info. Same black-placeholder gotcha as the base node: a grid with fewer than nine cells pads the rest with tiny black 16Γ—16 images, so read total_frames before you batch-save.

    Install

    It ships in the same pack as the base node, so install once:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/veoreg/ComfyUI-SmartGridCutter.git
    

    Or search "SmartGridCutter" in ComfyUI Manager. Restart, and both nodes appear under image/transform. No models, no dependencies beyond what ComfyUI already ships.

    Honest take: for interactive use you're almost always better off with the plain node and a Load Image. Reach for this one when the image arrives by URL - an API callback, a queue, a shared storage link - because that's the one job it does that the base node can't.

    Categoryimage/transform

    Inputs (7)

    NameTypeDefaultDescription
    image_urlSTRINGβ€”
    modeCOMBO6 options: auto, 3x3, 4x2, 3x2, 2x2, custom
    custom_colsoptINT31–10β€”
    custom_rowsoptINT31–10β€”
    divider_thresholdoptFLOAT0.150.01–0.5β€”
    paddingoptINT20–20β€”
    align_tooptINT161–64β€”

    Outputs (13)

    NameTypeDescription
    frame_0IMAGEβ€”
    frame_1IMAGEβ€”
    frame_2IMAGEβ€”
    frame_3IMAGEβ€”
    frame_4IMAGEβ€”
    frame_5IMAGEβ€”
    frame_6IMAGEβ€”
    frame_7IMAGEβ€”
    frame_8IMAGEβ€”
    colsINTβ€”
    rowsINTβ€”
    total_framesINTβ€”
    grid_infoSTRINGβ€”