Nodes/IAMCCS-nodes/IAMCCS Storyboard Auto Crop Grid PRO
ComfyUI Node

IAMCCS Storyboard Auto Crop Grid PRO

The storyboard slicer that respects your target panel aspect ratio

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
IAMCCS Storyboard Auto Crop Grid PRO
  • image
  • IDEO_LINX
  • images
  • count
  • panel_width
  • panel_height
  • crop_manifest_json
columns2
rows3
panel_orderrow_major
fit_modecrop_to_target_aspect
output_width0
output_height0
crop_margin_px0
prompt_json
target_panel_width0
target_panel_height0
canvas_width0
canvas_height0

IAMCCS_StoryboardAutoCropGridPRO is the base crop grid plus the thing people actually need once they've tried the base version: it understands that your target panels have a specific aspect ratio, and it crops to fit it. The plain node gives you cells; this one gives you 16:9 (or 9:16, or whatever) panels, which matters when those panels are headed into a video canvas.

It's the version to reach for when the storyboard sheet was generated for panels at one aspect but your video pipeline wants another - which, in a 2.39:1 world generating 2×3 sheets, is the common case.

How it works

It does the same grid slicing as the base node, then applies fit_mode to each crop: crop_to_target_aspect (default - center-crops the cell to the target panel aspect, throwing away the excess), resize_to_target (stretches/squishes to the exact target size), or preserve_cell_size (keep the natural cell, no fitting). Target sizes come from target_panel_width / target_panel_height (or output_width / output_height), and canvas_width / canvas_height can define an overall canvas the panels should fit within.

The interesting part is the metadata plumbing: the optional IDEO_LINX input and prompt_json let the node pull target dimensions straight from the Ideogram pipeline's own metadata (the linx's width/height/target_panel_* fields, or a JSON with matching keys), so the crop sizing can be driven by upstream generation settings instead of hand-typed numbers. Explicit widget values win over linx values when both are present.

Inputs and outputs

Required: image, columns, rows, panel_order, fit_mode, output_width, output_height, crop_margin_px. Optional: IDEO_LINX, prompt_json, target_panel_width, target_panel_height, canvas_width, canvas_height.

Outputs: images, count, panel_width, panel_height, crop_manifest_json (now including the fitting info).

Installing

ComfyUI Manager → search "IAMCCS", or

cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git

Restart. No models or pip deps - this is Pillow math over image batches.

Gotchas

crop_to_target_aspect is center-crop by design, and center-crop on an odd storyboard composition will happily chop a character's head. If your panels are busy, prefer preserve_cell_size and do the fit yourself, or leave generous headroom in the sheet. And the widget-vs-linx precedence can surprise you: once IDEO_LINX is connected and carries sizes, the widget values for target/canvas stay at their defaults and the linx wins unless you explicitly set them - so a workflow that "used to" hand-size panels can silently start following the pipeline metadata after an upgrade.

CategoryIAMCCS/Cine/Ideogram

Inputs (14)

NameTypeDefaultDescription
imageIMAGE
columnsINT21–12
rowsINT31–12
panel_orderCOMBOrow_major2 options: column_major, row_major
fit_modeCOMBOcrop_to_target_aspect3 options: crop_to_target_aspect, resize_to_target, preserve_cell_size
output_widthINT00–8192
output_heightINT00–8192
crop_margin_pxINT00–512
IDEO_LINXoptIDEO_LINX
prompt_jsonoptSTRING
target_panel_widthoptINT00–16384
target_panel_heightoptINT00–16384
canvas_widthoptINT00–32768
canvas_heightoptINT00–32768

Outputs (5)

NameTypeDescription
imagesIMAGE
countINT
panel_widthINT
panel_heightINT
crop_manifest_jsonSTRING