ComfyUI Node
Optimal Empty Latent (Advanced)
Choose optimal WxH for a given aspect ratio & MP target. Supports exact resolution input when optimized resolution is disabled.
Optimal Empty Latent (Advanced)
- Latent
- Width
- Height
- Block Size
- Details
◄dimensions1:1►
◄latent_alignmentSDXL (1024px)►
◄optimizationtrue►
◄invertfalse►
◄batch_size1►
◄block_size64►
◄spacial_downscale_ratio8►
◄target_mp1.000►
◄search_range12►
◄channels4►
CategoryFens_Simple_Nodes/Latent
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| dimensions | STRING | 1:1 | Formats: W:H (e.g. 16:9), WxH (e.g. 1280x720), or decimal (e.g. 1.777). Use WxH when 'Optimization' is FALSE. |
| latent_alignment | COMBO | SDXL (1024px) | Optimization preset for model type. Select 'Custom' to set your own parameters. |
| optimization | BOOLEAN | true | TRUE: Automatically calculates best resolution for your aspect ratio. FALSE: Use your own resolution (WxH format). |
| invert | BOOLEAN | false | Swap width and height (invert aspect ratio, e.g. 16:9 > 9:16). |
| batch_size | INT | 11–4096 | Number of latent images in batch (VRAM usage increases with batch size). |
| block_size | INT | 648–64 | Pixel dimension alignment constraint. (Only used when 'Custom' is selected.) |
| spacial_downscale_ratio | INT | 88–64 | The VAE's total downsampling factor. (Only used when 'Custom' is selected.) |
| target_mp | FLOAT | 1.0000.05–32 | Target megapixels. (Only used when 'Custom' is selected.) |
| search_range | INT | 121–100 | Search range for optimization. Higher values search more possibilities. (Only used when 'Custom' is selected.) |
| channels | INT | 41–128 | Latent channel count (e.g. 4 for SD1/SDXL, 16 for FLUX/Cosmos-Predict2-family). (Only used when 'Custom' is selected.) |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| Latent | LATENT | Latent tensor |
| Width | INT | Width |
| Height | INT | Height |
| Block Size | INT | Block size used for the calculation. |
| Details | STRING | Details about the calculation |