Files
ausboss-ComfyUI-AusBoss/js/docs/AUSBOSS_NODES_ImageResize.md
T
ausboss 3f715a4af8 Ship the crush-list build-out: 7 new node files, replace button, video and LoRA polish
- New nodes: Image Resize plus the Utility group (Text, Integer, Float,
  Show Text, Math Expression, Select Every Nth, Split Batch, Merge
  Batches, Free Memory) - the dependency-free gaps that let shared
  workflows drop heavy packs.
- Replace with AusBoss nodes (prototype): preview-then-confirm graph
  rewrite swapping known third-party nodes for pack equivalents, with a
  tested translation map, per-node opt-out, and refuse-with-reason for
  nodes the pack cannot stand in for.
- Load Video: single-frame FRAME picker, an honest "what will load"
  label from the probed source rate, drop-a-video-to-restore. Save
  Video: format-aware widgets and a file_path output. Stitch Inpaint
  gained a blend_mask output, Select Frame negative from-the-end
  indexing, Image Size a batch count - all appended, saved workflows
  load unchanged.
- LoRA Loader: drag-to-reorder rows, hover thumbnails on rows, file
  size and date in the info card.
- Appearance: flagship scheme deepened to slate-teal; the retired
  bright-teal pair upgrades automatically via LEGACY_SCHEME_PAIRS.
  Optional queue-completion chime, off by default.
- Image Resize invariant: pixels are only invented on an explicit
  width+height pad request - scale-derived modes resolve divisible_by
  snaps with a sub-half-step resize, never bars.
- Docs refreshed for six stale pages, stale text and metadata fixed
  across the pack, the panel-height rule codified in AGENTS.md and the
  brand skill, and ausboss_node_tour.json added - a model-free example
  exercising 17 node types in one graph.

Validated: scripts/validate_nodes.py (24 files), 300 JS tests, all
Python suites under the ComfyUI embedded interpreter.
2026-08-27 13:30:35 -05:00

2.8 KiB
Raw Blame History

Image Resize

One resize node for the jobs that usually pull in a whole pack: hit an exact width+height, scale until the longest or shortest edge lands on a number, meet a megapixel budget, or multiply by a scale factor. An optional mask rides through the identical geometry, and the output width/height come back as INTs ready to wire onward.

Target modes

Each mode reads only its own widget(s); the others are ignored.

  • width+height: The two size widgets. 0 keeps that source dimension, and with only one set the other follows the source aspect.
  • longest_edge / shortest_edge: Scales until that edge equals edge_length exactly; the other edge keeps the aspect. 0 keeps the source size.
  • megapixels: Scales (aspect preserved) until width × height is about megapixels million pixels. 0 keeps the source size.
  • scale_factor: Multiplies both dimensions — 0.5 halves, 2.0 doubles. 0 keeps the source size.

Keep proportion

Decides what happens when the target aspect differs from the source:

  • stretch: Distorts straight to the target.
  • fit: Shrinks the target box to the source aspect — the output can be smaller than requested, but there are never bars and nothing is cropped.
  • cover_crop: Fills the target completely and center-crops the overflow.
  • pad: Fits inside the target and fills the rest with fill_color (hex, R, G, B, one grayscale number, or a CSS name). The new bars are 1.0 in the mask output — the same generated-area contract as the pack's other pad nodes, so it feeds an inpainter directly.

Notes

  • divisible_by snaps each output dimension to the nearest multiple (never below one step) — 16 for WAN, 8 for most latent spaces. It wins over exact proportion, so a dimension can shift by up to half a step. It applies even when everything else says "keep the source".
  • Pixels are only ever invented on explicit request. In every target mode except width+height the box is derived from the source's own aspect, so there is nothing to letterbox against: the proportion modes all resolve a divisible_by snap with an invisible sub-half-step resize, and the mask output stays black. Bars — and white in the mask — can only appear when you set a width+height box that disagrees with the source and choose pad.
  • interpolation: lanczos (PIL, in float — the sharpest all-rounder), bicubic, bilinear, nearest (pixel art, hard masks), area (best for strong downscales). A resize that changes nothing passes the tensor through bit-identical.
  • The mask output is the input mask through the same transform, plus the pad bars; all zeros when no mask is wired. IMAGE is BHWC, MASK is BHW, and batches flow through frame by frame.