Nodes/24oiduts-ComfyUI/Studio42 PatchLift Loader
ComfyUI Node

Studio42 PatchLift Loader

Lift a rectangular (or circular) patch out of an image, with coordinates to match

By GeekyGhost·Created 12 months ago·Updated 10 months ago· 0
Studio42 PatchLift Loader
  • selection_color
  • image
  • preview_image
  • patch_image
  • patch_x
  • patch_y
  • patch_width
  • patch_height
image
patch_x256
patch_y256
patch_width256
patch_height256
patch_shaperectangle
grid_size32
grid_opacity0.3
selection_thickness3
show_coordinatestrue
corner_radius20
maintain_aspectfalse
preview_scale1.00

Studio42 PatchLift Loader is the "crop a piece out of an image, precisely" node - and it pairs with the pack's PatchDrop so that whatever you lift out can be dropped back somewhere else with matching coordinates. You specify a patch by position and size, choose its shape (rectangle, circle, rounded rectangle), and the node hands you the extracted patch, a preview, and the exact coordinates so nothing drifts.

If you've ever wanted to take a face, a logo, or an object out of one image and place it into another - and have the placement land exactly - this is the "lift" half of the lift-and-drop pair. It's essentially a guided crop with coordinate plumbing built in.

What you set

  • image - pick a file from the input dropdown.
  • patch_x / patch_y - top-left position of the patch (or center, per shape handling), 0–4096.
  • patch_width / patch_height - 16–1024 each.
  • patch_shape - rectangle, circle, or rounded_rectangle. Non-rectangular shapes get a chroma-green backing so the shape is preserved rather than square-cropped.
  • maintain_aspect - lock width/height together.
  • corner_radius - for the rounded-rectangle shape, 5–100.

Then the visual-selection extras, which are the part that makes this feel like an editor:

  • grid_size (8–128) and grid_opacity - a draggable-feeling grid overlay.
  • selection_color and selection_thickness - how the selection outline is drawn.
  • show_coordinates - on-screen coordinate display.
  • preview_scale (0.25–2) - zoom the preview for fine placement.

What comes out

Seven outputs: image (the loaded source), preview_image (with the selection overlay), patch_image (the extracted patch, shaped), and patch_x, patch_y, patch_width, patch_height as INTs. The last four are the whole point: wire them straight into a PatchDrop and the patch lands where it came from.

The workflow it's built for

Lift a patch → run effects on just that patch (blur, recolor, inpaint) → drop it back with the coordinates. The pack's own examples lean on this pattern, and it beats re-finding the region by hand every time. Combine with the Background Remover for a foreground, or keep it simple and patch a logo onto a blank area.

Installing it

Same pack, 24oiduts-ComfyUI:

  • ComfyUI Manager: search 24oiduts, install, restart.
  • Manual:
    cd ComfyUI/custom_nodes/
    git clone https://github.com/GeekyGhost/24oiduts-ComfyUI
    pip install -r 24oiduts-ComfyUI/requirements.txt
    then restart.

Pure Pillow/numpy - no model, no download. The GitHub README is a stale Studio42 template ("not recommended for use", no license); the code is fine.

Troubleshooting

  • Patch out of bounds - the loader clamps, but keep x/y + size inside the image or the shape crops unexpectedly.
  • Circle patch has green edges - that's the chroma backing by design; composite it with a mask (or use the patch mask in PatchDrop) rather than straight pasting.
  • Empty file dropdown - check the input folder the node scans; upload the file there.

It's a small node with a precise job - and it's the one that makes the whole lift/drop pair make sense.

CategoryStudio42/Image Loading

Inputs (14)

NameTypeDefaultDescription
imageCOMBO1 options: example.png
patch_xINT2560–4096
patch_yINT2560–4096
patch_widthINT25616–1024
patch_heightINT25616–1024
patch_shapeCOMBOrectangle3 options: rectangle, circle, rounded_rectangle
grid_sizeoptINT328–128
grid_opacityoptFLOAT0.30–1
selection_coloroptCOLOR
selection_thicknessoptINT31–10
show_coordinatesoptBOOLEANtrue
corner_radiusoptINT205–100
maintain_aspectoptBOOLEANfalse
preview_scaleoptFLOAT1.000.25–2

Outputs (7)

NameTypeDescription
imageIMAGE
preview_imageIMAGE
patch_imageIMAGE
patch_xINT
patch_yINT
patch_widthINT
patch_heightINT