Nodes/Shima/Shima Latent Maker
ComfyUI Node

Shima Latent Maker

Empty latents, real seed control, and a model-type brain

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Latent Maker
  • shima.commonparams
  • panelinputs.bndl
  • latent
  • s33d
  • width
  • height
  • latentmaker.bndl
s33d0
s33d_modefixed
model_typesdxl
aspect_ratio4:3 Standard
orientationlandscape
width1024
height1024
scale1.00
batch_size1
use_commonparamstrue
allow_external_linkingfalse
show_used_valuesfalse

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_mode maps 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.

CategoryShima/Latent

Inputs (14)

NameTypeDefaultDescription
s33dINT00–18446744073709550000
s33d_modeCOMBOfixedControl seed behavior (applied to base seed)
model_typeCOMBOsdxlSelect Model Type — determines latent channels and base resolution
aspect_ratioCOMBO4:3 Standard6 options: 1:1 Square, 4:3 Standard, 16:9 Widescreen, 21:9 Ultrawide, 3:2 Photo, Custom
orientationCOMBOlandscape3 options: landscape, portrait, auto
widthINT102464–8192Manual width (used if Aspect Ratio is Custom)
heightINT102464–8192Manual height (used if Aspect Ratio is Custom)
scaleFLOAT1.000.1–4Upscale factor applied to dimensions
batch_sizeINT11–64Number of latents to generate in batch
shima.commonparamsoptDICTConfiguration bundle from Shima.Commons (overrides seed/dimensions if enabled)
use_commonparamsoptBOOLEANtrueIf True, use settings from Shima.Commons bundle (Seed, Width, Height)
allow_external_linkingoptBOOLEANfalseIf ON, this node broadcasts/receives OUTSIDE the Island (ignores group regex)
show_used_valuesoptBOOLEANfalseShow actual values being used (debug)
panelinputs.bndloptBNDLOverrides panel settings using an external PanelBNDLer node

Outputs (5)

NameTypeDescription
latentLATENTEmpty latent image at calculated dimensions
s33dINTThe seed used.
widthINTThe width used.
heightINTThe height used.
latentmaker.bndlBNDLThe bundled dictionary containing the latent.