Files
AEmotionStudio-ComfyUI-Shad…/shaders
Æmotion StudioandClaude Opus 5 1a4b3a8808 fix: fill every latent channel at the source, not downstream
The generators handed back noise spanning about one channel however many the
latent had, and travel_mode walk worked around it by remixing 64 renders after
the fact. The plan was to fix shaders/base.py::expand_channels. That alone would
have changed nothing for SD 1.5 or SDXL: the collapse had three sources, and the
one that mattered at four channels was somewhere else.

- domain_warp copied one field four times with repeat(1, 4, 1, 1), so
  expand_channels returned early at four channels and never ran.
- temporal_coherent broadcast one field to every channel with .expand(): rank
  1.00 at any channel count, and it is the shader the video preset picks.
- curl_noise padded its colour path with copies of one magnitude field.

BaseNoiseGenerator.fill_channels replaces expand_channels. Every channel up to
CHANNEL_BASIS (64) is its own render at seed + 6151*c; channels past that are
QR-orthogonalised mixtures of those renders. Channel 0 stays the generator's own
draw, so a one-channel request is unchanged -- and jump, which is built from
one-channel draws, is byte-identical to before for all four generators. The
extra renders run inside a forked RNG. 6151 has no collisions among the first 64
channels under the mod-10000 seed hashing curl_noise does internally.

Effective rank for domain_warp at 4 / 24 / 128 channels goes from
1.00 / 2.13 / 2.43 to 3.91 / 22.72 / 69.56.

The travel-mode guard had to become direction-aware. Only a basis of 1 skipped
it, so once the generators were wide, drift (basis 4) would have been treated as
a remix that could not help and silently returned walk's noise. It already did
that for tensor_field and curl_noise. A basis below the widest now narrows
unconditionally. Widening is skipped once a draw exceeds 0.65 of its target,
just above the best a random remix reached (0.52-0.64, measured across all four
generators at 16, 24 and 128 channels), so walk passes the generator's noise
through instead of rendering 64 more draws and discarding them. The old 0.9
threshold would still have paid for that on 16-channel models.

Seven of the eleven goldens moved, not the one the handoff predicted; the four
that should not move held byte-identical. The suite is now pinned to the
standard pipeline, re-captured, with every standard-only input set explicitly in
NODE_DEFAULTS. The old legacy output is at the pre-collapse-fix tag.
test_legacy_golden.py becomes test_golden.py.

test_blend_calibration_is_current no longer compares difference on an absolute
tolerance: its whole curve sits below the tolerance, and after this change it
passed by 0.002. Every other mode stays within 0.049 of the table.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 14:02:59 -07:00
..