ComfyUI Node
Smart Latent
A ComfyUI node in itsjustregi / SDXL Adherence with 17 inputs and 5 outputs.
Smart Latent
- vae
- image
- latent
- dims_json
- width
- height
- bbox_json
◄mode▾►
◄width1024►
◄height1024►
◄resolutionUse width/height►
◄snap_modepad_up►
◄pad_kindreflect►
◄pad_value128►
◄batch1►
◄tile_size320►
◄tile_overlap32►
◄force_bchwtrue►
◄use_tiledtrue►
◄seed0►
◄max_pixels1048576►
◄max_long_side0►
Categoryitsjustregi / SDXL Adherence
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | VAE model used to create or encode latents. | |
| mode | COMBO | Create an empty latent or encode an input image. | |
| width | INT | 102464–4096 | Requested width; may downscale by 64s to respect max_pixels. |
| height | INT | 102464–4096 | Requested height; may downscale by 64s to respect max_pixels. |
| resolutionopt | COMBO | Use width/height | Quick presets; selecting one overrides width/height (empty mode). |
| snap_modeopt | COMBO | pad_up | Snap policy for non-64 dims: pad, downscale, resize, or crop. |
| pad_kindopt | COMBO | reflect | Padding type for pad_up/downscale (reflect avoids seams). 'edge' behaves like 'replicate'. |
| pad_valueopt | INT | 1280–255 | Pad value (constant mode only). |
| batchopt | INT | 11–16 | Batch size for empty latent or image batch. |
| imageopt | IMAGE | Image tensor when mode = encode_image. | |
| tile_sizeopt | INT | 320192–512 | Tile size for VAE.encode_tiled if available. |
| tile_overlapopt | INT | 320–256 | Tile overlap for tiled VAE encode/decode. |
| force_bchwopt | BOOLEAN | true | Ensure image is [B,C,H,W] before encoding. |
| use_tiledopt | BOOLEAN | true | Use tiled VAE encode/decode when available. |
| seedopt | INT | 0 | Reserved for future use. |
| max_pixelsopt | INT | 104857665536–16777216 | Upper bound on W*H; uniformly downscale to fit if exceeded. |
| max_long_sideopt | INT | 00–8192 | Optional VRAM guard: if >0, downscale input image so max(H,W) <= this before snapping. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| dims_json | STRING | — |
| width | INT | — |
| height | INT | — |
| bbox_json | STRING | — |