π€ Diffusers Prepare Latents
A seeded starting point most ComfyUI-J workflows never touch
- pipeline
- latents
- latents
Worth saying upfront: this is the node you'll least often need in this pack, and knowing why helps more than knowing what it does. The Diffusers Generator node - the one doing most of the actual work in a typical ComfyUI-J workflow - manages its own seed, width, and height internally and doesn't take a LATENT input at all. This node is for a different, more manual path than the one most people end up using.
What it is and how it works
This is the Diffusers-flavored equivalent of ComfyUI's own Empty Latent Image node: it builds the seeded noise tensor that a sampling process starts from, at a given resolution and batch size. Optionally, instead of generating fresh noise, you can hand it an existing latent to reuse - useful if you're chaining latents between passes rather than starting from scratch each time.
Because it outputs a plain LATENT rather than anything Diffusers-specific, it's the one node in this pack that could plausibly interoperate with something outside the ComfyUI-J family, or with a more advanced ComfyUI-J graph than the four-node example the README leads with - one built around manually assembling the sampling loop rather than letting the Generator handle it end-to-end.
The inputs and outputs that matter
pipeline(required) - theDIFFUSERS_PIPELINEthis latent is being prepared for. Latent shape and scaling depend on the pipeline's architecture (SD1.5 versus SDXL), so this has to match whatever's actually consuming the output downstream.batch_size(default1, up to16),height/width(default512, up to8192) - the shape of the noise tensor.latents(optional, default empty) - supply an existing latent here instead of generating fresh noise, if you're continuing from a prior pass rather than starting cold.seed(optional) - for reproducibility when generating fresh noise. Same seed, same pipeline, same resolution gets you the same starting point.
Output is latents (LATENT) - a seeded (or reused) starting tensor, ready for whatever manual sampling step picks it up next.
Installing it
Part of the ComfyUI-J pack. ComfyUI Manager: search ComfyUI-J, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Jannchie/ComfyUI-J
cd ComfyUI-J
pip install -r requirements.txt
Where people get burned
The most common confusion is simply not knowing where this plugs in. If you've built a workflow around the Diffusers Generator node - which is the documented, four-node happy path the README shows off - there's no obvious slot for this node's LATENT output anywhere in that graph, because the Generator doesn't accept one. If you dropped this node expecting it to feed the Generator directly, that's the mismatch: it doesn't, at least not through any input visible on that node.
The other thing worth knowing before you reach for the seed input: it's a genuinely separate seed from whatever seed you might set elsewhere in your graph (the Generator has its own seed field entirely independent of this one). If you're trying to reproduce a specific result, make sure you're tracking the seed on the node that's actually doing the work you care about, not assuming there's a single global seed governing the whole pipeline the way some other tools present it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | DIFFUSERS_PIPELINE | β | |
| batch_size | INT | 11β16 | β |
| height | INT | 5120β8192 | β |
| width | INT | 5120β8192 | β |
| latentsopt | LATENT | β | |
| seedopt | INT | 0β999999999 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latents | LATENT | β |