Video Crop + Rotate + Pad β Clip π
Black bands, a hard edge, and the clip comes back widescreen
- frames
- mask
- audio
- frame_count
- fps
- width
- height
- duration
- stitcher
This is the node that goes immediately before a video outpaint. It applies one rotate β crop β pad transform to every frame of a clip and hands the video model a canvas with bands it's meant to paint - plus a stitcher so the frames you didn't ask it to touch come back bit-for-bit.
Two jobs, really: cut something off (a border, a watermark corner, a tilt), or grow something on. The outpaint case is the one with strict rules - the LTX outpaint IC-LoRA keys on a pure black fill with a hard edge (feather 0) at sizes rounded to 32, and getting that wrong burns a ten-minute render to teach you nothing. So fill and feather sit on the node face here instead of in an editor.
Inputs you'll actually set
video picks a file from ComfyUI's input folder or you upload one, or set source_mode to local path and put an absolute path in local_path to read a file in place instead of copying it - worth it for a 4 GB clip.
Then the window. start_seconds and end_seconds trim; end_seconds 0 means "to the end of the video". The on-node timeline is the friendlier way in: drag the IN/OUT handles and the playhead rides the handle, so the frame you're looking at is the first or last frame the run keeps. every_nth keeps one frame in N and divides the reported fps to match, so the clip keeps real-time speed; max_frames caps the count. frame_index / frame_time are preview position only - scrubbing them never changes the output.
Then the transform, same trio as the pack's image nodes: rotation_degrees (β180 to 180, clockwise, applied first), the crop block (crop_aspect_ratio, crop_x, crop_y, crop_width, crop_height), and the pad block (pad_left/pad_top/pad_right/pad_bottom). fill_color lands in the rotated-in corners and the padding, feather softens the mask into kept pixels, and canvas_multiple plus resolution_steps round the output to a multiple. For an outpaint: black fill, feather 0, rounded to 32.
The resize trio is optional and off by default - resize_to_megapixels, megapixels, resize_method (lanczos is the sharp default). frame_snap (free, 8n+1 for LTX - 49, 97, 121 - or 4n+1 for Wan) drops trailing frames so the count is one the model keeps, and stitch_blend / stitch_grow shape how the paste ramps in afterwards.
Outputs
Nine of them. frames is the transformed BHWC batch - that's what goes to the video model. mask is the per-frame generated-area mask: padding plus rotation corners, feathered. audio covers the same trimmed window. frame_count, fps, width, height and duration instrument the clip; wire frame_count into the video latent's length so you never ask the sampler for more frames than you're stitching back. stitcher goes straight into Stitch Inpaint π, which pastes the source frames over the generated ones and blends only across the padded region - no intermediate Crop For Inpaint node.
That's why you'd use this rather than a generic resize node: a masked setup owns one thing no instruction-editing model offers - pixels outside the blend region come back identical to the source. On video that's the difference between extending a shot's canvas and re-rendering the shot.
Installing it
ComfyUI Manager β search AusBoss, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ausboss/ComfyUI-AusBoss.git
Restart, then hard-refresh with Ctrl+Shift+R after updates. The pack declares no pip dependencies - it uses the Pillow, NumPy, Torch and PyAV that ComfyUI already ships - so there's nothing to install for this node. ComfyUI 0.27.1 minimum.
Where people get burned
Feather is not blend. Feather shapes the mask the model sees; stitch_blend is the ramp in output pixels where generated pixels fade over the source. A black-band outpaint wants feather 0 and a blend of a few dozen pixels. Softening the feather "to be safe" is the classic mistake, and it's exactly the grey fuzzy band the IC-LoRA can't work with.
Frame counts. LTX wants a count divisible by 8 plus 1, and off-grid values fail rather than round. Turn frame_snap on - with it off, the node hands back more source frames than the model returns.
Local path mode is deliberately restricted. As of 2.0.1 it reaches only ComfyUI's input, output and temp folders. Start ComfyUI with AUSBOSS_TRANSFORM_LOCAL_PREVIEW=1 if you genuinely need the rest of the disk - and understand that you're opening that up on a server whose /prompt route has no auth by default, so don't do it on a box anyone else can reach.
Swapping the clip keeps your canvas. Fill, feather, the resize budget, snap and the frame limit survive a source change; only rotation, crop and the trim window reset. A fresh Clip node starts black with feather 0 for the same reason - an outpaint shouldn't be quietly ruined by a source swap.
Long clips are processed a few frames at a time to keep memory sane, and the progress bar and cancel work throughout.
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| video | COMBO | Choose a video in ComfyUI's input folder or use the upload button. | |
| source_mode | COMBO | input folder | Local path mode reads a file in place instead of copying it into the input folder. |
| local_path | STRING | Absolute video path used only in local path mode. By default only ComfyUI's input, output and temp folders are readable; start ComfyUI with AUSBOSS_TRANSFORM_LOCAL_PREVIEW=1 to allow any path. | |
| start_seconds | FLOAT | 0.000β86400 | Skip everything before this time. |
| end_seconds | FLOAT | 0.000β86400 | Stop at this time; 0 runs to the end of the video. |
| seek_mode | COMBO | frame index | Playhead position only: frame_index or frame_time picks the frame the node and editor show. The output covers the whole trim window. |
| frame_index | INT | 00β100000000 | Zero-based playhead frame shown on the node and in the editor; does not affect the output. |
| frame_time | FLOAT | 0.0000β86400 | Playhead position in seconds for time mode; does not affect the output. |
| rotation_degrees | FLOAT | 0.0-180β180 | Clockwise rotation applied before crop and padding. |
| crop_aspect_ratio | COMBO | free | Locks crop handles to a ratio; free allows any rectangle. |
| crop_x | INT | 00β65536 | Left edge of the crop in pixels, measured on the rotated image. |
| crop_y | INT | 00β65536 | Top edge of the crop in pixels, measured on the rotated image. |
| crop_width | INT | 00β65536 | 0 keeps the full available width. |
| crop_height | INT | 00β65536 | 0 keeps the full available height. |
| pad_left | INT | 00β32768 | Fill-color pixels added on the left; padding lands in the output mask. |
| pad_top | INT | 00β32768 | Fill-color pixels added on top; padding lands in the output mask. |
| pad_right | INT | 00β32768 | Fill-color pixels added on the right; padding lands in the output mask. |
| pad_bottom | INT | 00β32768 | Fill-color pixels added on the bottom; padding lands in the output mask. |
| feather | INT | 00β4096 | Feathers the mask into kept pixels and fades the image edge into the fill color. |
| canvas_multiple | INT | 11β4096 | Rounds output up by adding the minimum extra pixels to right and bottom. |
| fill_color | STRING | #000000 | Color for rotation voids and padding; accepts #RGB/#RRGGBB hex, R, G, B (0-255 or 0..1 floats), one grayscale number, or a CSS color name. Unparseable values fall back to mid-gray. |
| resize_to_megapixels | BOOLEAN | false | Resize the output to the megapixel budget below, aspect preserved. |
| megapixels | FLOAT | 1.000.01β16 | Output pixel budget in megapixels (x 1024x1024, matching the core Scale Image to Total Pixels node). |
| resize_method | COMBO | lanczos | Sampling filter for the resize; lanczos is the sharp default. |
| resolution_steps | INT | 11β256 | Rounds each resized dimension to a multiple of this - 8 or 64 keeps VAE-friendly sizes. |
| every_nthopt | INT | 11β512 | Keep one frame in this many; 2 halves the frame count and the fps output divides to match, so the clip still plays at real speed. |
| max_framesopt | INT | 00β100000 | Stop after this many kept frames; 0 processes the whole trim window. Video models want 8n+1 counts: 49, 97, 121. |
| frame_snapopt | COMBO | free | Drop trailing frames so the count is one a video model keeps: 8n+1 for LTX (49, 97, 121), 4n+1 for Wan. Free keeps every frame in the window. |
| stitch_blendopt | INT | 320β512 | Ramp of the stitcher's paste, in pixels, into the kept frames: where generated pixels fade over the source. Separate from feather, which shapes the mask itself. |
| stitch_growopt | INT | 0-256β256 | Moves the paste boundary before the ramp: positive lets the generation replace a strip of the source next to the seam, negative keeps more of the source. |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| frames | IMAGE | Every frame of the trim window, transformed, as a BHWC batch. |
| mask | MASK | BHW generated-area mask per frame: rotation corners and padding, feathered. |
| audio | AUDIO | Audio for the same window; silent when the video has no audio track. |
| frame_count | INT | Number of frames returned. |
| fps | FLOAT | Frames per second of the returned batch: the source rate divided by every_nth. |
| width | INT | Frame width after the transform and any resize. |
| height | INT | Frame height after the transform and any resize. |
| duration | FLOAT | Duration in seconds of the returned frames. |
| stitcher | AUSBOSS_STITCHER | For Stitch Inpaint: pastes the source frames back over a generated clip of this size, blending only across the padded and rotated-in area. |