Nodes/Shima/Shima Workflow Commons
ComfyUI Node

Shima Workflow Commons

The node that runs the whole Shima workflow

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Workflow Commons
    • shima.commonparams
    • s33d
    • WIDTH
    • HEIGHT
    • PROJECT_NAME
    • SAVE_PATH
    • COLLISION_ID
    • TIMESTAMP
    • CONTROL_AFTER_GENERATE
    s33d0
    s33d_modefixed
    project_nameProject
    base_folderoutput
    collision_id_enabledtrue
    collision_id_mode
    model_type
    aspect_ratio
    orientationlandscape
    width1024
    height1024
    label_raworiginal
    label_lineartlineart
    label_cannycanny
    label_depthdepth
    label_normaldsine
    label_highlighthighlight
    label_shadowshadow
    label_palettepalette
    allow_external_linkingfalse

    Every Shima workflow worth building has one of these at its heart, and the pack's own docs call it the "Brain." Shima Workflow Commons is a single node that holds the shared truth for your whole graph: the seed, the model tier, the resolution, the project name, the save path. It broadcasts all of it as one shima.commonparams bundle that every other Shima node - Latent Maker, Sampler, ControlNet Agent, MultiSaver - can read. Change one widget and the entire workflow follows. It's the context-object pattern (same idea as rgthree's Context or a pipe) done Shima-style.

    How it works

    The node packs everything into a dictionary and pushes it out nine parallel outputs, plus broadcasts via the bundle so Use Everywhere can deliver it around the island. The pieces:

    • Seed control. s33d is the seed and s33d_mode is fixed / increment / decrement / randomize. This is exactly the "control_after_generate" mechanic from every seed widget, and the same trap applies: in randomize mode the seed shown is the one used next, not the one that made the image you're staring at. Internally it's literally named control_after_generate - that's the strongest hint you'll get. The node tracks its previous seed per instance so increment/decrement actually step.
    • Resolution. You pick model_type (SDXL, SD 1.5, SD3, Flux, and friends) plus an aspect_ratio and orientation, and Commons computes a sensible native resolution for that tier - 1024×1024 for SDXL square, 1344×768 for SDXL 16:9, 1600×902 for Flux widescreen, and so on. Pick "Custom" and it uses your explicit width/height instead. Outputs WIDTH and HEIGHT as plain ints.
    • Collision IDs. collision_id_enabled with collision_id_mode of new_each_run or fixed mints a short unique ID (like MIHEQV) per run. That's what lets MultiSaver name files without overwriting, and it's what Carousel Preview uses to group a batch's outputs.
    • Project / save path. project_name and base_folder build the SAVE_PATH; TIMESTAMP is a YYYYMMDD_HHMMSS string for your filenames.
    • Export labels. The label_raw, label_lineart, label_canny, label_depth, etc. fields set the filename suffixes MultiSaver uses for each output type. Rename "canny" to "edges" here and every canny file in the project follows.

    The outputs that matter

    You'll mostly use shima.commonparams (the DICT bundle) - that's what other Shima nodes consume. But the parallel typed outputs are there so you can feed standard ComfyUI nodes directly: s33d, WIDTH, HEIGHT, PROJECT_NAME, SAVE_PATH, COLLISION_ID, TIMESTAMP, CONTROL_AFTER_GENERATE.

    Installing it

    Part of the Shima pack - ComfyUI Manager → search Shima, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/KDB-USJP/shima_wf.git Shima
    

    Restart ComfyUI. First launch auto-installs deps and the companion repos (ComfyUI-Impact-Pack, cg-use-everywhere). No models.

    Common issues

    • "The seed changed on its own." You're in randomize (or inc/dec) mode. Set it to fixed and the value stays - and remember the after-generate timing trap above.
    • "My resolution looks wrong." Commons maps your aspect ratio through a per-tier lookup table. If you picked "16:9 Widescreen" with model_type Flux, you're getting 1600×902, not whatever you typed. Use "Custom" for manual control.
    • "Nothing downstream responds." The consuming nodes need use_commonparams switched on (the green topbar toggle), and the bundle wire actually connected. A Commons broadcasting into the void doesn't change anything by itself.

    This is the node to set up first in any Shima workflow. Get the seed, resolution, and project naming right here, and the rest of the graph stops being a pile of disconnected widgets and starts being one coherent pipeline.

    CategoryShima/Panels

    Inputs (20)

    NameTypeDefaultDescription
    s33dINT00–18446744073709550000Seed (s33d) to avoid auto-control widget.
    s33d_modeCOMBOfixed4 options: fixed, increment, decrement, randomize
    project_nameSTRINGProject
    base_folderSTRINGoutput
    collision_id_enabledBOOLEANtrue
    collision_id_modeCOMBO2 options: new_each_run, fixed
    model_typeCOMBO14 options: sdxl, sd1.5, sd2.x, sd3, flux, pony, +8
    aspect_ratioCOMBO6 options: 1:1 Square, 16:9 Widescreen, 4:3 Standard, 21:9 Ultrawide, 3:2 Photo, Custom
    orientationCOMBOlandscape3 options: landscape, portrait, auto
    widthINT102464–8192
    heightINT102464–8192
    label_rawSTRINGoriginalSuffix for original image (key: raw)
    label_lineartSTRINGlineartSuffix for lineart (key: line)
    label_cannySTRINGcannySuffix for canny edge (key: canny)
    label_depthSTRINGdepthSuffix for depth map (key: depth)
    label_normalSTRINGdsineSuffix for normal map (key: norm)
    label_highlightSTRINGhighlightSuffix for highlights (key: hi)
    label_shadowSTRINGshadowSuffix for shadows (key: shd)
    label_paletteSTRINGpaletteSuffix for color palette (key: pal)
    allow_external_linkingoptBOOLEANfalseIf ON, this node broadcasts/receives OUTSIDE the Island (ignores group regex)

    Outputs (9)

    NameTypeDescription
    shima.commonparamsDICT
    s33dINT
    WIDTHINT
    HEIGHTINT
    PROJECT_NAMESTRING
    SAVE_PATHSTRING
    COLLISION_IDSTRING
    TIMESTAMPSTRING
    CONTROL_AFTER_GENERATESTRING