APNext PGSD3LatentGenerator
An empty latent source sized for SD3 pipelines
- LATENT
PGSD3LatentGenerator (APNext PGSD3LatentGenerator) is the plumbing node, not the star. It hands your sampler a blank canvas to denoise - an empty latent tensor at the width and height you set. The pack's README describes it as latent generation tuned for Stable Diffusion 3 pipelines, which is the whole reason it exists as its own node rather than you just using the stock empty-latent one.
Here's the context that makes that make sense: SD3 and its descendants don't use the same latent shape as SD 1.5 or SDXL. The older models work in a 4-channel latent space; SD3 uses a wider one, which is why ComfyUI ships a separate empty-latent node for it in the first place. Feed a sampler the wrong-shaped empty latent and you get errors or garbage. This node is dagthomas's version of that SD3-shaped source, bundled into the pack so an APNext workflow has everything it needs in one place.
How it works
There's nothing to it, which is the point. Three inputs:
widthandheight(default 1024, step 8) - the output resolution. Keep them multiples of 8 (the step enforces it); SD3-class models like the ~1MP range, so 1024×1024, 1216×832, and similar are the sweet spot.batch_size(default 1) - how many latents to generate at once, i.e. how many images per queue.
One output: LATENT. Wire it into your KSampler's latent_image input. That's the entire node.
When you'd actually use it
If you're building one of the pack's APNext example workflows for an SD3 pipeline, use this - it's what those graphs expect. If you're building your own graph, ComfyUI's built-in empty-latent nodes do the same job and you can reach for whichever matches your model. There's no magic here beyond producing a correctly-shaped blank latent; it's a convenience node so a dagthomas workflow is self-contained.
Installing it
ComfyUI Manager: search comfyui_dagthomas, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
No API key, no downloads - this is pure tensor allocation. It works even if none of the pack's LLM nodes can reach a provider.
Common issues
Shape mismatch at the sampler. If you wire this into a pipeline built for a different model family (SDXL, say) you can get a latent-shape error, because this one is sized for SD3-class models. Match your empty-latent source to your checkpoint - SD3 latent for SD3, SDXL latent for SDXL.
Weird dimensions, weird output. Off-ratio or very small sizes give bad compositions. Stay near the model's trained resolution (~1 megapixel for SD3-class) and keep width/height multiples of 8.
Big batch_size OOMs. Each image in the batch costs VRAM through the whole sampler. If you run out of memory, drop the batch size.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 10240–16384 | — |
| height | INT | 10240–16384 | — |
| batch_size | INT | 11–4096 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |