AGSoft Empty Latent Krea2
Krea 2's 16-channel latent, without the crash course
- latent
- width_px
- height_px
- width_latent
- height_latent
Krea 2 is one of those newer architectures that doesn't play by SD rules, and the most visible difference is right where you start: its latent has 16 channels, not the 4 that SD/SDXL/Flux use. Drop a stock Empty Latent into a Krea 2 graph and your sampler will choke on a channel mismatch - the error reads like an obscure tensor-shape complaint, and it takes a while to realize the empty latent you've used a thousand times is the problem. AGSoft Empty Latent Krea2 exists so you start on the right foot.
This is the Krea-flavored member of the pack's Empty Latent family, and if you run Krea 2 locally, it's basically a prerequisite.
How it works
The node generates torch.zeros([batch_size, 16, latent_h, latent_w]) - the 16 channels Krea 2's VAE expects. Beyond the channel count, it's the same friendly shape as the other Empty Latents: three size_mode options.
- Preset - Krea-oriented named sizes (Square 1024×1024 default, plus portrait and landscape sets like 768×1344, 1080×1920, 1216×832, 1920×1080).
- Custom - raw
width/height(default 1024). - Megapixels -
megapixels(default 1.0) plus anaspect_ratiodropdown (1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9, 9:21), rounded to thedivisibilityyou choose - the dropdown offers 8/16/32/64/128, defaulting to 64.
Outputs are the family standard: latent, width_px/height_px, and width_latent/height_latent. Those last two are nice for logging, and if you're building Krea 2 workflows you'll appreciate having the numbers as ints rather than doing the mental math.
The input that matters most
Honestly, the divisibility default of 64 covers most Krea 2 use. The one setting worth respecting is batch_size if you're doing multi-image generation - the node builds N identical 16-channel latents in one call, which is exactly what a batch sampler wants. Everything else is pick-a-preset.
Installing it
Standard pack install: ComfyUI Manager → search comfyui-AGSoft → install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
No models, no extra dependencies, pure PyTorch - one of the lightest nodes in a self-contained pack.
Common issues
The classic mistake is the one this node prevents: using the generic Empty Latent (or an old workflow's latent) with Krea 2 and getting a shape error deep in the sampler. If that error ever mentions channel counts, check your latent node before your model. Conversely, don't use this node with non-Krea models - a 16-channel latent is meaningless to an SDXL or Flux checkpoint. Match the node to the model family; the pack's four Empty Latents exist precisely so you never have to guess.
A lighter gotcha: the pack's node is MIT, but Krea 2's model weights run under the Krea-2-Community-License - free under $1M in annual revenue, but it pushes a content-filter obligation onto you and bans stripping safety measures or watermarks. Don't confuse the node's license with the model's; read Krea's terms before shipping anything from it.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| size_mode | COMBO | Choose how to define the image size: - Preset: Use predefined sizes (Square/Portrait/Landscape) - Custom: Manually enter width and height - Megapixels: Specify target resolution in megapixels --- Выберите способ задания размера изображения: - Preset: Использовать предустановленные размеры - Custom: Вручную указать ширину и высоту - Megapixels: Задать разрешение в мегапикселях | |
| preset | COMBO | Square - 1024x1024 (1:1) | Select a predefined resolution and aspect ratio. Выберите предустановленное разрешение и соотношение сторон. |
| width | INT | 10248–4096 | Width in pixels (must be divisible by 8). Ширина в пикселях (должна быть кратна 8). |
| height | INT | 10248–4096 | Height in pixels (must be divisible by 8). Высота в пикселях (должна быть кратна 8). |
| megapixels | FLOAT | 1.00.1–10 | Target resolution in megapixels (e.g., 1.0 = 1,000,000 pixels). Целевое разрешение в мегапикселях (например, 1.0 = 1 000 000 пикселей). |
| aspect_ratio | COMBO | Target aspect ratio for the megapixel-based resolution. Целевое соотношение сторон для разрешения, заданного в мегапикселях. | |
| divisibility | COMBO | 64 | Ensure the final width and height are divisible by this value. Гарантирует, что итоговые ширина и высота кратны этому числу. |
| batch_size | INT | 11–64 | Number of latent images to generate. Количество латентных изображений для генерации. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| width_px | INT | — |
| height_px | INT | — |
| width_latent | INT | — |
| height_latent | INT | — |