Shima Latent Maker
Empty latents, real seed control, and a model-type brain
- shima.commonparams
- panelinputs.bndl
- latent
- s33d
- width
- height
- latentmaker.bndl
Shima Latent Maker is the pack's answer to Empty Latent Image plus a seed node plus a resolution helper, fused into one. It creates blank latent tensors at the right dimensions and channel count for your model, handles aspect ratios and orientation for you, and carries its own seed control - which the author's own description calls out: "Create empty latents with integrated seed control, aspect ratio presets, and model-type awareness."
Why does that matter? Because the wrong latent shape is a classic silent failure. Feed SD1.5 a 1024×1024 latent and you get mush; feed Flux a 4-channel latent instead of 16 and you get garbage or an error. This node reads model_type and picks both the base resolution and the channel count (SD1.5/SDXL use 4-channel latents, SD3/Flux/Chroma/Lumina2 use 16-channel) so the thing you hand the sampler actually matches the checkpoint.
The inputs that matter
- model_type - the boss input. 14 choices: sdxl, sd1.5, sd2.x, sd3, flux, pony, illustrious, auraflow, hunyuan, lumina2, chroma, hidream, plus two z-image variants. It drives channels and base resolution.
- s33d / s33d_mode - seed plus behavior (fixed, increment, decrement, randomize). The
s33d_modemaps to the same control-after-generate idea ComfyUI uses, just applied to the base seed. - aspect_ratio - presets from 1:1 to 21:9 plus Custom; orientation - landscape, portrait, or auto; width/height - only used when aspect is Custom.
- scale - a multiplier on the final dimensions, so you can take a 1024 base and push it to 1.5× without hand-computing pixels.
- batch_size - how many latents, up to 64.
Useful outputs beyond latent: it also emits s33d (the seed actually used), width, height (handy for filename or comparison nodes), and a latentmaker.bndl bundle for the panel system. The use_commonparams toggle lets a Shima.Commons bundle override seed and dimensions, and panelinputs.bndl accepts overrides from an external panel node.
Where it fits
This is a front-end node for the pack's pipeline: Model Citizen → Master Prompt → Latent Maker → sampler. If you're using Shima at all, this is the one to reach for instead of the core Empty Latent, because it keeps seed, dimensions, and model type in one place and out of sync. Standalone, it's genuinely convenient - aspect presets plus seed mode in one node beats three core nodes wired together.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf
then restart, or ComfyUI Manager → search "Shima". No models needed for the node itself.
Watch out for
The seed gotcha is the same one that bites everyone in ComfyUI: if s33d_mode is randomize, the seed shown is the one used next, not the one that just ran - the control fires after generation. Set it to fixed when you nail an image you want to keep. Also, don't trust scale to do anything clever; it's a straight dimension multiplier, and crazy scale values produce latents too big to sample. And be careful with model_type: lying to this node (saying sdxl when you're on Flux) produces latents the sampler will choke on, so keep it honest. Compared to the core Empty Latent node, this one just has more opinions - which is the point, and they're mostly the right opinions.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| s33d | INT | 00–18446744073709550000 | — |
| s33d_mode | COMBO | fixed | Control seed behavior (applied to base seed) |
| model_type | COMBO | sdxl | Select Model Type — determines latent channels and base resolution |
| aspect_ratio | COMBO | 4:3 Standard | 6 options: 1:1 Square, 4:3 Standard, 16:9 Widescreen, 21:9 Ultrawide, 3:2 Photo, Custom |
| orientation | COMBO | landscape | 3 options: landscape, portrait, auto |
| width | INT | 102464–8192 | Manual width (used if Aspect Ratio is Custom) |
| height | INT | 102464–8192 | Manual height (used if Aspect Ratio is Custom) |
| scale | FLOAT | 1.000.1–4 | Upscale factor applied to dimensions |
| batch_size | INT | 11–64 | Number of latents to generate in batch |
| shima.commonparamsopt | DICT | Configuration bundle from Shima.Commons (overrides seed/dimensions if enabled) | |
| use_commonparamsopt | BOOLEAN | true | If True, use settings from Shima.Commons bundle (Seed, Width, Height) |
| allow_external_linkingopt | BOOLEAN | false | If ON, this node broadcasts/receives OUTSIDE the Island (ignores group regex) |
| show_used_valuesopt | BOOLEAN | false | Show actual values being used (debug) |
| panelinputs.bndlopt | BNDL | Overrides panel settings using an external PanelBNDLer node |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | Empty latent image at calculated dimensions |
| s33d | INT | The seed used. |
| width | INT | The width used. |
| height | INT | The height used. |
| latentmaker.bndl | BNDL | The bundled dictionary containing the latent. |