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 about a year ago·Updated 6 days ago· 9
Model Merge Z-Image
  • model1
  • model2
  • MODEL
◄cap_embedder0.00►
◄cap_pad_token0.00►
◄context_refiner.00.00►
◄context_refiner.10.00►
◄layers.00.00►
◄layers.10.00►
◄layers.20.00►
◄layers.30.00►
◄layers.40.00►
◄layers.50.00►
◄layers.60.00►
◄layers.70.00►
◄layers.80.00►
◄layers.90.00►
◄layers.100.00►
◄layers.110.00►
◄layers.120.00►
◄layers.130.00►
◄layers.140.00►
◄layers.150.00►
◄layers.160.00►
◄layers.170.00►
◄layers.180.00►
◄layers.190.00►
◄layers.200.00►
◄layers.210.00►
◄layers.220.00►
◄layers.230.00►
◄layers.240.00►
◄layers.250.00►
◄layers.260.00►
◄layers.270.00►
◄layers.280.00►
◄layers.290.00►
◄noise_refiner.00.00►
◄noise_refiner.10.00►
◄final_layer0.00►
◄t_embedder0.00►
◄x_embedder0.00►
◄x_pad_token0.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.0–layers.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_embedderFLOAT0.000–1—
cap_pad_tokenFLOAT0.000–1—
context_refiner.0FLOAT0.000–1—
context_refiner.1FLOAT0.000–1—
layers.0FLOAT0.000–1—
layers.1FLOAT0.000–1—
layers.2FLOAT0.000–1—
layers.3FLOAT0.000–1—
layers.4FLOAT0.000–1—
layers.5FLOAT0.000–1—
layers.6FLOAT0.000–1—
layers.7FLOAT0.000–1—
layers.8FLOAT0.000–1—
layers.9FLOAT0.000–1—
layers.10FLOAT0.000–1—
layers.11FLOAT0.000–1—
layers.12FLOAT0.000–1—
layers.13FLOAT0.000–1—
layers.14FLOAT0.000–1—
layers.15FLOAT0.000–1—
layers.16FLOAT0.000–1—
layers.17FLOAT0.000–1—
layers.18FLOAT0.000–1—
layers.19FLOAT0.000–1—
layers.20FLOAT0.000–1—
layers.21FLOAT0.000–1—
layers.22FLOAT0.000–1—
layers.23FLOAT0.000–1—
layers.24FLOAT0.000–1—
layers.25FLOAT0.000–1—
layers.26FLOAT0.000–1—
layers.27FLOAT0.000–1—
layers.28FLOAT0.000–1—
layers.29FLOAT0.000–1—
noise_refiner.0FLOAT0.000–1—
noise_refiner.1FLOAT0.000–1—
final_layerFLOAT0.000–1—
t_embedderFLOAT0.000–1—
x_embedderFLOAT0.000–1—
x_pad_tokenFLOAT0.000–1—

Outputs (1)

NameTypeDescription
MODELMODEL—