Commit Graph
104 Commits
Author SHA1 Message Date
WildAi 8565fde6f5 pixelrush: README + changelog for 2.9.0 corrected-theory release
Document the refiner_model input (paper SDXL + SDXL-Turbo setup),
noise_injection modes, sigma=24 default and the gaussian_kernel_size
removal (migration note for old workflows), plus the 2.9.0 changelog:
corrected SLERP, adapter space fix (SDXL 7.7x under-noising root
cause), generic DDIM, analytic Gaussian mask, empty-negative CFG fix.
Version bumped 2.8.3 -> 2.9.0. Full repo suite green (1146 passed).
2026-09-02 14:01:32 +03:00
WildAi 27d059d7a0 pixelrush: calibrate slerp HF bound from measurements
Step 11 of plan 2026-09-02: measured the corrected algorithm on the
SDXL-realistic mock (VAE std 7.7 = unit model space, unit-std structured
eps, space-converting adapters). Results: refinement HF ratio 0.748
(slerp) / 0.955 (additive); inversion rel norm 0.87 (= sigma_K, analytically
consistent); dominance 0.85; seam 0.83. The historical "noise dominance"
(6.3x) reproduces only with mismatched magnitudes - confirming the
2026-08-12 bug was the magnitude/space mismatch. slerp HF guard tightened
from provisional >=0.5 to >=0.6 (measured 0.748). Results recorded in
the plan.
2026-09-02 13:55:38 +03:00
WildAi aaf013f8bd pixelrush: schema finalization tests
Add an execute()-signature-matches-schema test (regex over multi-line
Input() calls) so removed inputs (gaussian_kernel_size) and new ones
(refiner_model, noise_injection) can never drift from the execute
parameters; assert sigma max=128 covers the paper default 24; forbid
gaussian_kernel_size in the node source entirely.
2026-09-02 13:37:04 +03:00
WildAi 4a5efe1a02 pixelrush: optional refiner_model input (paper separate refiner)
Per pixelrush-correct.txt the refiner should be a distinct model from
the base generator (paper: SDXL base + SDXL-Turbo ADD-distilled
refiner). New optional node input refiner_model: when provided (and
distinct from the base), execute builds refiner_eps from it via its own
model_sampling, while the schedule functions (alpha_bar_at, sigma_at,
forward/reverse steps) stay bound to the base model. When absent, the
base model is reused for both - the documented intentional choice.
Acceptance test: two recording adapters verify base at t=0 and
refiner at t=K per patch.
2026-09-02 13:12:50 +03:00
WildAi c4456136a2 pixelrush: fix empty-negative CFG amplification; raise on empty positive
run_cond('negative') returned zeros for an empty negative list, so CFG
degenerated to eps = cfg_scale * eps_cond (7x amplification at the
default 7.0). Now an empty negative returns the conditional eps
unchanged (CFG undefined without an unconditional branch), and an
empty positive raises ValueError. Tests build a real _make_predict_eps
against new conftest stubs (comfy.model_management/samplers/
sampler_helpers/utils) and pin both paths exactly. Full repo suite
green (1139 passed).
2026-09-02 12:51:19 +03:00
WildAi 3387dbcdcd pixelrush: adapters own the VAE<->model space conversion
Root fix for the SDXL 'compressed look': in VAE-space mode the
forward/reverse adapters previously applied noise_scaling directly to
VAE-space x with model-space eps, so for SDXL (scale_factor 0.13025)
the model saw noise 7.7x too small for the claimed timestep - the
input SNR never matched sigma and the refiner's prediction washed out.

Now forward_step converts x via process_latent_in, applies noise_scaling
in model space, and converts back via process_latent_out (reverse_step
mirrors it). predict_eps keeps returning model-space eps - principled
under the corrected theory since the slerp mixes it with std-1 random
noise. For pure-scaling formats the composition equals running the whole
algorithm in model space (exactness pinned by
process_latent_in(forward(x,e,s)) == s*x + s*e... i.e. noise at full
model-space scale).

The operate_in_vae_space flag is removed everywhere: the pipeline is
always VAE-space at the interfaces (ComfyUI LATENT convention); VAE
adapters no longer touch process_latent_out/in. Dominance guard gains
a lower bound (no-op detection) plus a refinement-changes-latent test.
2026-09-02 12:41:20 +03:00
WildAi 8b1bfc2bcc pixelrush: restore slerp noise injection, keep additive as opt-in
Default injection is now the paper's slerp(eps_refined, eps_random,
noise_lambda) per pixelrush-correct.txt. The 2026-08-13 additive mode
(eps_pred + lambda*eps_rand) remains available via
noise_injection='additive' (node combo input) for workflows tuned
against it. Tests pin both formulas exactly via seeded randn streams
(lambda=0 -> pure eps, lambda=1 -> pure random, additive formula),
the slerp default, and invalid-mode rejection. The legacy-calibrated
HF tests are pinned to additive; a new slerp-mode HF guard holds the
provisional >=0.5 bound pending Step 11 calibration.
2026-09-02 12:04:18 +03:00
WildAi c0c867cedf pixelrush: separate inversion_eps and refiner_eps adapters
Per pixelrush-correct.txt the core must accept distinct epsilon
adapters: inversion_eps (base generator, drives the 0->K partial DDIM
inversion) and refiner_eps (distilled one-step refiner, drives the K->0
prediction). The node currently passes the same base-model predict_eps
for both - an intentional choice the corrected theory allows; a
separate refiner_model input is added in a later step. Tests pin the
call pattern (inversion at t=0, refiner at t=K) and that a distinct
refiner changes the output.
2026-09-02 11:46:34 +03:00
WildAi d530be9917 pixelrush: analytic Gaussian feather mask (sigma default 24, no kernel)
Per pixelrush-correct.txt: the mask is exp(-(xx^2+yy^2)/(2 sigma^2))
centered on the patch and peak-normalized to 1 - an explicit encoding of
the paper's Gaussian-filtered patch mask. Replaces the blurred-all-ones
approximation (sigma=8, kernel=41); gaussian_kernel_size is removed from
config, node schema and execute. Node sigma range widened to 1..128 so
the corrected default 24 is reachable from the UI.
2026-09-02 11:31:51 +03:00
WildAi 1a8ef4f9a6 pixelrush: fix alpha_k NameError with partially-provided adapters
alpha_k was only computed when sigma_at was None, so sigma_at +
DDIM fallback (either adapter missing) raised NameError. Compute it
whenever any fallback branch can execute; when both adapters are
provided alpha_bar_at is never called (pinned by test).
2026-09-02 11:12:08 +03:00
WildAi c780c77e14 pixelrush: generic DDIM transition between arbitrary timesteps
Add predict_x0_from_epsilon + ddim_deterministic_step (eta=0, source ->
dest schedule values, same epsilon) per pixelrush-correct.txt. The old
0->K / K->0 functions become thin wrappers over the generic form.
Tests pin the formula, wrapper equivalence, and eta=0 path-independence.
2026-09-02 11:08:09 +03:00
WildAi 5deebc67dd pixelrush: corrected standard SLERP (raw-vector form with lerp fallback)
Per pixelrush-correct.txt: the 2026-08-12 unit-vector x linear-magnitude
form carried magnitudes separately; the paper convention is standard
vector slerp sin((1-t)w)/sin(w)*a + sin(tw)/sin(w)*b on raw flattened
vectors, with a lerp fallback when sin_omega < 1e-4. The conflicting
grep-tests (which forbade the corrected form) are rewritten to require it.
2026-09-02 11:02:32 +03:00
WildAi 185ce8023d fix(qwen2d-vae): disable VAE interception by default (opt-in via DYPE_ENABLE_QWEN2D_VAE=1) 2.8.3 2026-09-01 01:43:02 +03:00
WildAi f5c1d5d61a chore: bump version to 2.8.2 2.8.2 2026-08-31 11:28:12 +03:00
IrradiatedHaggis 8604d1f223 Fix PixelRush crash on float16: antialiased bicubic not implemented for Half 2026-08-29 17:10:30 -07:00
IrradiatedHaggis c96560050a Fix graph-build and execution crashes when resolution inputs are None 2026-08-29 15:23:24 -07:00
WildAi 98c20ed598 merge: fold remote main README tweak (superseded by condensed rewrite) 2.8.1 2026-08-25 21:24:34 +03:00
WildAi a7d2c7a211 test: tomli fallback for tomllib on py3.10 (CI matrix leg) 2026-08-25 21:18:09 +03:00
WildAi b85b5257ea test: reference shipped scope plan instead of gitignored .dev path 2026-08-25 21:10:10 +03:00
WildAi f4460a9a6f ci: add numpy to test deps; declare numpy runtime dependency 2026-08-25 21:02:06 +03:00
WildAi 0b37167d33 ci: run version-sync guard standalone (no pytest/torch in meta job) 2026-08-25 20:47:51 +03:00
WildAi 950d8d6c58 docs: condensed README rewrite; guards adapted to new changelog format 2026-08-25 20:39:42 +03:00
WildAi 9b11bd70c1 fix(validation): /8 alignment + named validate_inputs params (v2.8.1) 2026-08-25 17:12:27 +03:00
WildAi 900ceda564 fix: resolve review issues W1-W9; suite green (1107 passed) 2026-08-25 16:09:05 +03:00
WildAi 4f0fb1934f fix(spa): accurate error for SEGA/DyPE->SPA switch; narrow filter-error scope 2026-08-24 20:17:19 +03:00
WildAi 4fbcfea534 perf(hap-calib): early GPU-leaf release + post-run cache purge 2026-08-24 16:25:25 +03:00
WildAi 4973cb08b1 fix(hap): expected aux head-count fallback logs INFO instead of wrong-plan WARNING 2026-08-24 15:30:00 +03:00
WildAi cec29a68cd fix(hap): runtime plan-layer ordinal mirrors calibration's dominant-head filter 2026-08-19 18:17:55 +03:00
WildAi 17244b9b6d feat(hap): HAP calibration node + runtime fixes for Krea2 2026-08-19 15:54:54 +03:00
WildAi 867a346552 fix(hrdit): Anima crashes + node-order independence
G1: wrapper now mirrors the real ComfyUI optimized_attention signature (mask/attn_precision/skip_reshape/skip_output_reshape in slots 5-8) and forwards orig() with the correct positional order - the pre-fix wrapper fed skip_reshape into the mask slot on the unmasked Anima/cosmos path (AttributeError: bool.ndim).

G2: pytest mock _sdpa flipped to the real ComfyUI signature (it matched the wrapper's inverted convention, hiding G1); conformance tripwire added (tests/test_orig_call_convention.py).

G3: HAP decline-guards - non-square attention (cross-attn) and plan/model head-count mismatch decline to plain attention with one-time logs instead of crashing or computing wrong math.

G4: _hrdit_carry_state() re-applies HRDiT patcher attrs after ModelPatcher.clone() in both apply functions (+ _hrdit_state_ref indirection), so SPA->HAP / HAP->SPA chaining is order-independent.

SPA non-square guard: averaged passes apply spatial RoPE to both q and k (only valid for square self-attention); Anima cross-attention (q_len != k_len) crashed einsum - now declined to plain attention.

README: v2.7.1 changelog + HAP model-specificity/v1-limitation notes.
2026-08-16 19:02:29 +03:00
WildAi b9578e7400 feat(hrdit): add HAP node, calibration, scaling
- HAP runtime: per-head scope plans via FlexAttention
  (CUDA + torch>=2.5) with SDPA dense-mask fallback
- Calibration: Taylor-softmax scoring + knapsack solver
  (calibration/calibrate_hap.py, --dry_run toy pipeline)
- Shipped FLUX scope plan (configs/scope_plan_flux.json)
- SPA+HAP compose via refcounted shared hook install
- proportional_attention knob on SPA+HAP (default off)
- spa_layer_filter knob on SPA (flat index spec)
- Demote "SPA averaged-attention ACTIVE" log to debug
- README: HAP section, coverage matrix, v2.7.0 changelog
2026-08-16 01:41:20 +03:00
WildAi 265904917e refactor(spa): remove no-op method input from node
The DyPE extrapolation methods (ntk/yarn/vision_yarn/pi) never
affected SPA output: SPA always applies the model's native
no-extrapolation RoPE (ntk_factor=1.0) on the bundled coords
(HRDiT "nor" RoPE). The knob was inherited UI plumbing from the
DyPE base-class constructor chain and only invited misleading
A/B testing.

- drop the method combo from the SPA node schema + execute()
- keep method/yarn_alt_scaling params in apply_spa_to_model for
  the DyPEBasePosEmbed constructor chain (documented as no-ops)
- add a schema guard test asserting the input stays removed
- update README parameter table + changelog
2026-08-15 17:53:37 +03:00
WildAi f0069c6e87 feat(spa): add SPA position-alignment node
HRDiT-style bundle+slide positional alignment for high-res DiTs
(Krea-2, Z-Image, FLUX, Anima, Qwen, Nunchaku). Fixes the
ripple/mosaic output and ~10x inference time at bundle_size>2.

- bundle_size is the paper's tokens-per-bundle N (0=auto, 1=off,
  2..8 explicit); legacy group_num-scale values (>=32) migrate to
  auto with a one-time warning
- trained-extent gate: identity at <=1024px (no big-patch mosaic)
- spa_steps (default 3) gates SPA to leading denoise steps;
  ~1.3-1.8x overhead instead of 10x
- delta-RoPE cache: inv(base)@variant composed once per grid
- averages attention OUTPUTS across 2s-1 slide variants (not
  rotation matrices), killing the period-s ripple
2026-08-15 17:53:18 +03:00
WildAi a0d66f443b pixelrush: fix compressed/jpeg artifacts (H1 noise injection) 2026-08-13 15:25:42 +03:00
WildAi 102820c7bc pixelrush progress, sdxl better result 2026-08-13 14:52:38 +03:00
WildAi bad3415bfc pixelrush progress, sdxl bug not resolved 2026-08-12 18:58:23 +03:00
WildAi fcf1a6c272 fix(pixelrush): scale k_timestep to model's native timestep range 2026-08-12 15:30:21 +03:00
WildAi ce3d7e187c fix(pixelrush): support non-EPS prediction types (CONST/flow, V_PRED, X0) 2026-08-12 15:14:22 +03:00
WildAi 858dd4cd4b fix(pixelrush): move comfy.utils import to function scope 2026-08-11 21:44:42 +03:00
WildAi 9084045816 fix(pixelrush): bypass calculate_denoised to get raw epsilon 2026-08-11 19:56:02 +03:00
WildAi 1c8561a5ac fix(pixelrush): resolve inference bugs causing noisy output 2026-08-11 18:13:08 +03:00
WildAi 2992c3f8f4 feat(pixelrush): add native ComfyUI progress bar 2026-08-11 14:48:52 +03:00
WildAi cfd73f01b3 fix(pixelrush): pass 5D latents for 3D latent models (Krea2/Qwen/Anima) 2026-08-11 11:26:35 +03:00
WildAi b3ce2e8e34 feat: add FreeScale, Qwen2D VAE, and 5D latent support 2026-08-10 20:23:14 +03:00
WildAi 8813763a08 fix(freescale): pass 5D latents for 3D latent models (Krea2/Qwen/Anima) 2026-08-10 20:02:55 +03:00
WildAi 377febab69 debug: use logger.info for VAE decode shape, add fallback reshape 2026-08-06 22:33:45 +03:00
WildAi 9630bdedb3 debug: add shape logging and handle 3D VAE decode output shapes 2026-08-06 22:25:48 +03:00
WildAi d9d56c1319 fix: squeeze temporal dimension from VAE decode output for 3D VAEs 2026-08-06 22:19:40 +03:00
WildAi c437aa5885 fix: use model.process_latent_out/in for VAE latent format conversion 2026-08-06 22:15:08 +03:00
WildAi ac98ed0576 fix: handle 3D/video VAEs (Qwen, Krea2) with temporal dimension 2026-08-06 22:10:17 +03:00