Train Diff PixArtSigmaXL2_1024MS (Mikey)
Add-difference merging, block by block
- model1
- model2
- model3
- MODEL
This is where the pack's two merge ideas meet: the "add difference" technique from Train Diff - extract what changed between a before-and-after model pair and graft that change onto a third model - combined with the per-block control from Model Merge PixArtSigmaXL2_1024MS. Instead of one global ratio applying the difference everywhere, every transformer block in the PixArtSigmaXL2_1024MS architecture gets its own ratio.
How it works
The mechanism is the same three-model setup as the plain Train Diff node: model2 and model3 are a before/after pair, the node computes what changed between them, and applies that change onto model1. What's different here is granularity - instead of a single ratio scaling the whole difference uniformly, you get a separate ratio per transformer block plus the architecture's named components (embedders, final layer). That means you can apply a training effect strongly in the blocks that carry, say, style or texture, while leaving the blocks responsible for overall composition untouched - the same logic that makes block merging worth the extra sliders over a flat ratio, applied here to a difference instead of a straight blend.
The inputs and outputs that matter
model1- the base being modified.model2andmodel3- the before/after pair the difference is measured from (change =model3minusmodel2, same direction as the plain Train Diff node).blocks.0.throughblocks.27., plusfinal_layer,pos_embed,t_block.1,t_embedder,x_embedder,y_embedder- one ratio each, all FLOAT with range -10 to 10 and step 0.01, default 1. All 28 numbered transformer blocks plus the six named components get independent control. Positive values apply the difference in that block; negative values apply it in reverse; 0 leaves that block untouched.MODEL(output) -model1, with the block-weighted difference applied.
Every slider defaulting to 1 means an untouched run of this node applies the full difference uniformly everywhere - functionally the same starting point as the plain Train Diff node at ratio=1, before you start differentiating block by block.
How to install it
Bundled with the rest of Mikey Nodes. ComfyUI Manager: search "Mikey Nodes," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/bash-j/mikey_nodes
then restart. All three models need to be PixArtSigmaXL2_1024MS-architecture checkpoints, already downloaded - this node merges what you have, it doesn't pull anything from the network.
Common issues & troubleshooting
Any model that isn't PixArtSigmaXL2_1024MS. The 28-block structure and named components this node exposes are wired specifically to that architecture. A mismatched checkpoint in any of the three slots won't have compatible tensor shapes to merge against.
28-plus sliders and no idea where to start. Same advice as the plain block-merge node: don't randomize everything at once. Set every block to the same value first and get a baseline result you understand, then differentiate a handful of blocks at a time - early versus late, or whichever grouping matches what you're actually trying to change - so you can attribute what you see to a specific part of the network.
Result is worse than either the plain Train Diff merge or model1 alone. Merging in general dilutes rather than combines when the inputs pull in different directions, and per-block control doesn't remove that risk - it just gives you more surface area to either fix it or make it worse. If a uniform ratio of 1 across every block isn't working, try scaling everything down together (all blocks to 0.5, say) before you start differentiating individual blocks; isolate the "how much" question from the "where" question.
Confusing this with the plain PixArt Sigma block merge. That node blends two models toward each other directly; this one applies a difference extracted from a separate pair onto a third model. They solve different problems even though the slider layout looks nearly identical - check which one actually matches what you're trying to do before wiring up three models here.
Inputs (37)
| Name | Type | Default | Description |
|---|---|---|---|
| model1 | MODEL | — | |
| model2 | MODEL | — | |
| model3 | MODEL | — | |
| blocks.0. | FLOAT | 1.00-10–10 | — |
| blocks.1. | FLOAT | 1.00-10–10 | — |
| blocks.2. | FLOAT | 1.00-10–10 | — |
| blocks.3. | FLOAT | 1.00-10–10 | — |
| blocks.4. | FLOAT | 1.00-10–10 | — |
| blocks.5. | FLOAT | 1.00-10–10 | — |
| blocks.6. | FLOAT | 1.00-10–10 | — |
| blocks.7. | FLOAT | 1.00-10–10 | — |
| blocks.8. | FLOAT | 1.00-10–10 | — |
| blocks.9. | FLOAT | 1.00-10–10 | — |
| blocks.10. | FLOAT | 1.00-10–10 | — |
| blocks.11. | FLOAT | 1.00-10–10 | — |
| blocks.12. | FLOAT | 1.00-10–10 | — |
| blocks.13. | FLOAT | 1.00-10–10 | — |
| blocks.14. | FLOAT | 1.00-10–10 | — |
| blocks.15. | FLOAT | 1.00-10–10 | — |
| blocks.16. | FLOAT | 1.00-10–10 | — |
| blocks.17. | FLOAT | 1.00-10–10 | — |
| blocks.18. | FLOAT | 1.00-10–10 | — |
| blocks.19. | FLOAT | 1.00-10–10 | — |
| blocks.20. | FLOAT | 1.00-10–10 | — |
| blocks.21. | FLOAT | 1.00-10–10 | — |
| blocks.22. | FLOAT | 1.00-10–10 | — |
| blocks.23. | FLOAT | 1.00-10–10 | — |
| blocks.24. | FLOAT | 1.00-10–10 | — |
| blocks.25. | FLOAT | 1.00-10–10 | — |
| blocks.26. | FLOAT | 1.00-10–10 | — |
| blocks.27. | FLOAT | 1.00-10–10 | — |
| final_layer | FLOAT | 1.00-10–10 | — |
| pos_embed | FLOAT | 1.00-10–10 | — |
| t_block.1 | FLOAT | 1.00-10–10 | — |
| t_embedder | FLOAT | 1.00-10–10 | — |
| x_embedder | FLOAT | 1.00-10–10 | — |
| y_embedder | FLOAT | 1.00-10–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |