generated

RgthreeSDXLEmptyLatentImage

RgthreeSDXLEmptyLatentImage creates an empty latent from one of nine SDXL resolution presets and reports the matching pixel width and height.

Rgthree SDXL Empty Latent Image

LATENT
CLIP_WIDTH
CLIP_HEIGHT
dimensions
1024 x 1024 (square)
clip_scale
2.0
batch_size
1
rgthree comfy

Description

RgthreeSDXLEmptyLatentImage produces an empty latent image pre-sized to one of nine SDXL-friendly resolution presets. Instead of typing arbitrary width and height values, you pick a named preset such as 1024 x 1024 (square) or 832 x 1216 (portrait), and the node creates a matching empty latent for sampling.

Alongside the latent, the node exposes the chosen pixel width and height as two integer outputs, so other nodes that need the same dimensions (upscalers, image size helpers, save nodes, and so on) can stay in sync with the latent without duplicating the numbers by hand. A clip_scale value is also carried by the node for use with rgthree's SDXL prompt and conditioning workflow.

All presets are near one megapixel and use multiples of 64, which keeps them within SDXL's trained resolution range and avoids awkward latent sizes.

Inputs

dimensions

The resolution preset for the latent. This is a required combo box with the following options:

  • 1536 x 640 (landscape)
  • 1344 x 768 (landscape)
  • 1216 x 832 (landscape)
  • 1152 x 896 (landscape)
  • 1024 x 1024 (square) (default)
  • 896 x 1152 (portrait)
  • 832 x 1216 (portrait)
  • 768 x 1344 (portrait)
  • 640 x 1536 (portrait)

The landscape options progress from the widest (2.4:1) to the nearly square 1152 x 896, and the portrait options mirror them. The exact strings are the ones the node reports on its width and height outputs.

clip_scale

A float value with a default of 2, a minimum of 1, a maximum of 10, and a step of 0.5. This is the CLIP scaling factor intended for rgthree's SDXL prompt and conditioning nodes, which read the value to adjust how strongly CLIP conditioning is applied. Changing it does not change the empty latent tensor itself; it only affects downstream nodes that consume the scale.

batch_size

An integer with a default of 1, a minimum of 1, and a maximum of 64. This is the number of empty latent samples created in the batch. Each sample has the same dimensions, so generating multiple images at once from the same prompt simply means raising this value.

Outputs

LATENT

An empty latent batch containing batch_size samples at one eighth of the chosen pixel resolution (for example, 1024 x 1024 becomes a 128 x 128 latent). Connect this to a sampler's latent input.

INT (width)

The pixel width of the chosen preset, for example 1024 when the square preset is selected. This matches the latent's intended output size, not its latent-space size.

INT (height)

The pixel height of the chosen preset, for example 1024 when the square preset is selected.

Usage Notes

  • Feed the two INT outputs into any node that needs the final image dimensions, such as an upscale or crop step, so the pixel sizes stay consistent with the latent you are sampling.
  • Keep the preset fixed for a session if you are comparing seeds or prompts, since changing the aspect ratio changes the composition even when the seed is identical.
  • clip_scale is only meaningful when the latent is used together with rgthree's SDXL prompt and conditioning nodes. If you are not using those nodes, leaving it at the default is harmless.
  • Batch sizes above 1 render multiple images per sampling pass, which is usually faster than queuing the same workflow repeatedly, at the cost of more VRAM per pass.

Comments

Sign in with GitHub to join the discussion.

Loading comments…