补充 Image Solid 256x256 预设,并修复 Load Image / Load Video / Load Video to Image 的预览显示、交互与旧工作流兼容问题。
2.5 KiB
2.5 KiB
Image Solid - Generate solid-color canvas
Node Purpose: Image Solid creates solid-color images with optional alpha scaling, inversion, and mask opacity. Supports preset sizes or custom width/height, optional divisibility constraints, and size inference from a reference image.
Inputs
| Name | Port | Type | Default | Range | Description |
|---|---|---|---|---|---|
get_image_size |
optional | IMAGE | - | - | Reference image for size inference when generating per-frame canvases. |
preset_size |
- | COMBO | custom |
presets | Target size preset; when not custom, overrides width/height. |
width |
- | INT | 1024 | 1–8192 | Target width when preset_size=custom. |
height |
- | INT | 1024 | 1–8192 | Target height when preset_size=custom. |
color |
- | STRING | 1.0 |
Gray/HEX/RGB/name/single-letter | Base color; supports 0..1 gray, R,G,B, HEX, named colors, and single-letter color aliases. |
alpha |
- | FLOAT | 1.0 | 0.0–1.0 | Global alpha applied to color channels. |
invert |
- | BOOLEAN | False | - | Invert color channels before applying alpha. |
mask_opacity |
- | FLOAT | 1.0 | 0.0–1.0 | Mask intensity for output mask. |
divisible_by |
- | INT | 8 | 1–1024 | Enforce size to be multiples of this value. |
Outputs
| Name | Type | Description |
|---|---|---|
image |
IMAGE | Solid-color image batch. |
mask |
MASK | Corresponding mask batch at mask_opacity. |
Features
- Flexible sizing: use
preset_sizeor customwidth/height; optionally infer size fromget_image_sizeper frame. - Preset addition: now includes a
256×256square preset for quick thumbnails or small-canvas testing. - Color parsing: supports gray (
0..1), HEX (#RRGGBB),R,G,B, named colors, and single-letter aliases. - Single-letter aliases include entries such as
r/b/c/m/y/k/w; note thatgmaps tolimerather thangreen. - Alpha/invert: applies
alphascaling;invert=Trueflips channels before alpha. - Divisibility: rounds up dimensions to be divisible by
divisible_by.
Typical Usage
- Create a background canvas with a specific color and mask intensity.
- Generate per-frame solid canvases matching a reference batch via
get_image_size. - Prepare model-sized inputs quickly using presets and
divisible_by.
Notes & Tips
- Mask is full ones scaled by
mask_opacityand matches the image size. - Color values are applied in channels-last layout and clamped to
[0,1].