LLS Simple Empty Latent
One latent node for txt2img and img2img both — it knows which one you mean
- model
- image
- vae
- latent
- width
- height
- latent_info
ComfyUI's stock setup makes you pick a lane up front: Empty Latent for txt2img, VAE Encode for img2img. LLS Simple Empty Latent refuses to choose, and that's the whole pitch. Leave image unconnected and it hands you an empty latent for txt2img. Connect an image (plus a VAE) and it encodes it into latent space for img2img, applying the resize mode of your choice on the way in.
It also inherits the family-awareness that runs through this pack. Set size_preset to Family Default and it looks up the right resolution for your model - SD1.5 gets 512, SDXL and FLUX get 1024 - instead of you hardcoding a square that's wrong for half your checkpoints. Connect a model input and it infers the family automatically; otherwise pick model_family yourself.
The outputs you'll actually use
latent- the thing every sampler wants. Wire this into LLS Simple KSampler or any KSampler.width/height- the actual dimensions used, after the family default or resize. Handy if you want to log or match a canvas.latent_info- a JSON string describing what was created (family, resolution, resize mode). Feed it to LLS Save Image and it lands in your PNG metadata.
The inputs that matter
size_preset-Family Default, a named size, orCustom.image+vae- connect both for img2img. Connectimagewithout avaeand the node will error, which is the correct behavior, just don't be surprised.resize_mode-keep_aspect(default),crop_center,stretch, ornone, used when the input image doesn't match the target size.batch_size- how many latents to mint for txt2img.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Gin3601/LLS-node
# restart ComfyUI
Or ComfyUI Manager → search "LLS-node". No model downloads; it calls ComfyUI's native VAE encode / empty-latent code.
Gotchas
The img2img path requires a VAE, full stop. And Family Default only knows what it knows - if your checkpoint is a merge that defies classification, set model_family manually or the latent size will be wrong in a way you won't notice until the image comes out squashed. It's also the natural companion to LLS Generation Config, which can supply the width/height if you'd rather drive sizes from one dropdown. For a pure repair workflow, the LLS docs note you don't start from this node at all - you start from image + mask + VAE in the repair chain instead.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| size_preset | COMBO | Family Default | 13 options: Family Default, Custom, 512x512, 768x768, 512x768, 768x512, +7 |
| width | INT | 51264–8192 | — |
| height | INT | 51264–8192 | — |
| batch_size | INT | 11–64 | — |
| model_family | COMBO | Auto | 9 options: Auto, SD1.5, SD15, SDXL, SDXL_TURBO, FLUX_SCHNELL, +3 |
| resize_mode | COMBO | keep_aspect | 4 options: keep_aspect, crop_center, stretch, none |
| modelopt | MODEL | — | |
| imageopt | IMAGE | — | |
| vaeopt | VAE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| width | INT | — |
| height | INT | — |
| latent_info | STRING | — |