IAMCCS Storyboard Auto Crop Grid PRO
The storyboard slicer that respects your target panel aspect ratio
- image
- IDEO_LINX
- images
- count
- panel_width
- panel_height
- crop_manifest_json
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.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| columns | INT | 21–12 | — |
| rows | INT | 31–12 | — |
| panel_order | COMBO | row_major | 2 options: column_major, row_major |
| fit_mode | COMBO | crop_to_target_aspect | 3 options: crop_to_target_aspect, resize_to_target, preserve_cell_size |
| output_width | INT | 00–8192 | — |
| output_height | INT | 00–8192 | — |
| crop_margin_px | INT | 00–512 | — |
| IDEO_LINXopt | IDEO_LINX | — | |
| prompt_jsonopt | STRING | — | |
| target_panel_widthopt | INT | 00–16384 | — |
| target_panel_heightopt | INT | 00–16384 | — |
| canvas_widthopt | INT | 00–32768 | — |
| canvas_heightopt | INT | 00–32768 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| count | INT | — |
| panel_width | INT | — |
| panel_height | INT | — |
| crop_manifest_json | STRING | — |