Nodes/ComfyUI-easygoing-nodes/Model Merge Z-Image
ComfyUI Node

Model Merge Z-Image

Merge Z-Image models the way people actually use them

By easygoing0114·Created 12 months ago·Updated 5 days ago· 5
Model Merge Z-Image
  • model1
  • model2
  • MODEL
cap_embedder.1.00
cap_pad_token1.00
context_refiner.0.1.00
context_refiner.1.1.00
layers.0.1.00
layers.1.1.00
layers.2.1.00
layers.3.1.00
layers.4.1.00
layers.5.1.00
layers.6.1.00
layers.7.1.00
layers.8.1.00
layers.9.1.00
layers.10.1.00
layers.11.1.00
layers.12.1.00
layers.13.1.00
layers.14.1.00
layers.15.1.00
layers.16.1.00
layers.17.1.00
layers.18.1.00
layers.19.1.00
layers.20.1.00
layers.21.1.00
layers.22.1.00
layers.23.1.00
layers.24.1.00
layers.25.1.00
layers.26.1.00
layers.27.1.00
layers.28.1.00
layers.29.1.00
noise_refiner.0.1.00
noise_refiner.1.1.00
final_layer.1.00
t_embedder.1.00
x_embedder.1.00
x_pad_token1.00

Z-Image is the 6B Alibaba model that became the community's SDXL successor - Turbo for speed, Base for seed diversity and negatives, both Apache 2.0 and uncensored. The obvious next question once you have two flavors of the same architecture is "can I have some of both?" Model Merge Z-Image is the per-block answer: 40 ratio sliders covering every structural part of Z-Image's S3-DiT, so you can take Turbo's speed-preferring weights and Base's prompt handling and blend them where it counts.

This is the same block-wise merge pattern as the pack's HiDream node, aimed at a very different architecture. Z-Image is a single-stream diffusion transformer with Qwen-3-4B as its text encoder - the "Z-Image + Qwen VL" stack people actually run - and its weight layout is: caption embedder and padding tokens, two context-refiner blocks, 30 main transformer layers.N, two noise-refiner blocks, the final layer, and the time/x embedders.

How it works

Clone model1, pull model2's key patches, and blend each weight by longest-prefix match against your sliders: 0.0 = all model1, 1.0 = all model2, middle = interpolated. Everything happens through add_patches on a clone, so your two originals stay untouched and the output is a fresh, runnable MODEL. Ratio sliders all default to 1.0 (full donor), range 0.0–1.0.

The inputs that matter

  • model1 / model2 - the two Z-Image models. Turbo + Base is the classic pairing.
  • layers.0layers.29 - the 30 core transformer blocks. Early blocks carry prompt understanding, later blocks carry output detail; blending only the early ones is a common way to graft one model's semantic behavior onto another's rendering.
  • context_refiner.0 / context_refiner.1 and noise_refiner.0 / noise_refiner.1 - the small pre/post refinement stacks. Underrated: these gate how the caption enters and the output leaves, and a small nudge here can shift the overall "feel" more than a middle layer can.
  • cap_embedder, t_embedder, x_embedder - the embedding inputs. Scaling/blending these is drastic; usually leave near their defaults.

Output is a single MODEL socket for your sampler.

Install

Search Easygoing in the ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/easygoing0114/ComfyUI-easygoing-nodes.git

Restart ComfyUI. No pip extras; needs a current ComfyUI with the V3 node API for the pack to register.

What to expect

The good news: Z-Image is only 6B, so holding two models plus a merge in memory is genuinely manageable on a 12GB card - merging here is far friendlier than with 17–32B models. The practical advice: decide which model is the "base" and which is the "donor" deliberately, then move one or two slider groups at a time and sample against both parents. Per-block merging is more controllable than a global ratio but it's also more knobs to lie to you; the discipline of changing one region per test run is what makes it a tool instead of a slot machine. If you find a good blend, wire it through the pack's save-with-original nodes to keep it as a file.

Categoryadvanced/model_merging/model_specific

Inputs (42)

NameTypeDefaultDescription
model1MODEL
model2MODEL
cap_embedder.FLOAT1.000–1
cap_pad_tokenFLOAT1.000–1
context_refiner.0.FLOAT1.000–1
context_refiner.1.FLOAT1.000–1
layers.0.FLOAT1.000–1
layers.1.FLOAT1.000–1
layers.2.FLOAT1.000–1
layers.3.FLOAT1.000–1
layers.4.FLOAT1.000–1
layers.5.FLOAT1.000–1
layers.6.FLOAT1.000–1
layers.7.FLOAT1.000–1
layers.8.FLOAT1.000–1
layers.9.FLOAT1.000–1
layers.10.FLOAT1.000–1
layers.11.FLOAT1.000–1
layers.12.FLOAT1.000–1
layers.13.FLOAT1.000–1
layers.14.FLOAT1.000–1
layers.15.FLOAT1.000–1
layers.16.FLOAT1.000–1
layers.17.FLOAT1.000–1
layers.18.FLOAT1.000–1
layers.19.FLOAT1.000–1
layers.20.FLOAT1.000–1
layers.21.FLOAT1.000–1
layers.22.FLOAT1.000–1
layers.23.FLOAT1.000–1
layers.24.FLOAT1.000–1
layers.25.FLOAT1.000–1
layers.26.FLOAT1.000–1
layers.27.FLOAT1.000–1
layers.28.FLOAT1.000–1
layers.29.FLOAT1.000–1
noise_refiner.0.FLOAT1.000–1
noise_refiner.1.FLOAT1.000–1
final_layer.FLOAT1.000–1
t_embedder.FLOAT1.000–1
x_embedder.FLOAT1.000–1
x_pad_tokenFLOAT1.000–1

Outputs (1)

NameTypeDescription
MODELMODEL