The audit compared every node against ComfyUI core and the major packs; this lands its outcomes in one branch. On-node visual editing (the old Codex-pack interaction, rebuilt): - New Load Image + Pad: image loader with whole-edge pad dragging on the node canvas, align-to-multiple rounding, and a megapixel target that rescales the source before padding so the mask seam stays binary. - Pad Image gains the same handle canvas, fed by an execution-time snapshot of its input; wireframe with diagnostic empty states before the first run. Widgets, outputs, and saved workflows unchanged. - Image Crop + Rotate + Pad's compact panel is now a live stage - crop, pad, and rotate handles on the node, one shared implementation with the full-screen editor so the two surfaces cannot drift. Feature gaps closed against the ecosystem: - Crop For Inpaint: target_megapixels, selectable rescale_algorithm (recorded in the stitcher for the paste-back), and extend_* inputs that grow the frame itself for outpainting. - Save Video: format choice - mp4 h264, mp4 h265, webm vp9 with Opus (resampled to 48 kHz); CRF drives all three. - Load Video: every_nth thinning (fps output divides to match) and a max_frames cap that ends the decode early. - LoRA Loader: saved stack templates behind a bar button, and a console warning when a LoRA's base-model family disagrees with the checkpoint. - LM Studio Chat: history in/out for multi-turn chains and a json_schema widget for structured replies. - Drop Shadow: multiply blend and a shadow_mask output. Align Image: offset outputs for un-aligning after sampling. Color Match: first_frame reference mode as a one-node video flicker fix. Removed (backed up in git history): Select Frame Range and the Video Bundle family - core ImageFromBatch and the core VIDEO wire now cover both jobs. Dead NODE_ID module variables cleaned out of every node file. 455 Python tests, 216 JS tests, validate_nodes.py green on 19 node files.
2.2 KiB
2.2 KiB
Load Image + Pad
Loads an image and builds an outpaint canvas around it in one node. The canvas drawn on the node is the control: drag any edge of the dashed final rect to grow that side's padding — the whole edge is the handle, and corners grab the nearer edge. The second output is a mask covering exactly the padding, ready for an inpainter.
The on-node canvas
- Each padded side shows its "+N px" count on the band; when the band is too thin to read, the label hops inside the image onto a pill.
- The badge in the corner is the truth: the final output size after the
canvas-multiple and megapixel math, exactly what the
width/heightoutputs will say. - Clicks on empty canvas space fall through, so the node still drags.
- The hidden
pad_left/top/right/bottomwidgets hold the real values — the canvas is their remote control, so undo, save/load, and the API format all see plain INT widgets.
Guarantees
- The original pixels land bit-identical at their position (resized only when a megapixel target is set — and then resized before padding, so the mask seam stays one crisp pixel wide).
- The mask is
1.0over every padded pixel and0.0over the source, ramped only where feather says so.
Controls
- image: Choose or upload from ComfyUI's input folder.
- mode / fill_color / backdrop_blur: The same four fills as
Pad Image 🆎 —
color,edge,edge pixel,pillarbox blur. - feather: Ramps the mask inward across the image edge on each padded
side (ramp width capped by the image size), so the sampler blends the
seam.
0keeps the seam hard. The padding itself always stays solid. - canvas_multiple: The final canvas rounds up to this multiple; the remainder joins the right and bottom padding.
- target_megapixels:
0= off. Rescales the source so the padded canvas lands on this many megapixels, then re-rounds to the multiple — the way to outpaint a small or huge image at a sampler-friendly size.
Outputs
- image: The padded canvas.
- mask: The outpaint mask (white = padding, feathered per
feather). - width / height: The final canvas size — the badge's numbers as INTs, for wiring into latent nodes.