Commit Graph
4 Commits
Author SHA1 Message Date
facok 858f0747c4 Extract shared downsample_mask helper to core/sampling.py
Deduplicate mask downsampling logic that was copied in 3 places
(intervene.py color hook, intervene.py tone hook, sharpen.py).
2026-03-21 22:56:59 +08:00
facok 0d9b685c2f Clean up: remove unused pack_info fields and legacy constants 2026-03-21 22:17:42 +08:00
facok ec9941b5fc Use model's latent_format for space conversion instead of hardcoded FLUX constants
Replaces hardcoded SCALE_FACTOR/SHIFT_FACTOR with model.latent_format.process_in/out
so LCS works with any model (FLUX, LTXV, SD, etc). Adds LTXAV packed tensor
unpack/repack support for audio+video models. All hooks (color, tone, sharpness,
observer) now use the model-aware conversion from args["model"].
2026-03-21 21:30:22 +08:00
facok 03fb376b8c Fix sharpness calibration and simplify intervention hook
- Use random noise images instead of solid-color (blur had no effect
  on spatially uniform images, making calibration a no-op)
- Generate images per-batch to avoid 200 MB upfront allocation
- Simplify hook algebraically: patches + delta * pc1_dir eliminates
  projection/reconstruction/residual intermediates (~24 MB per step)
- Move SCALE_FACTOR, SHIFT_FACTOR, find_step_index to core/sampling.py
- Rename sd → shd to avoid confusion with state_dict convention
- Remove redundant [:,:,:,:3] slice and unused imports
2026-03-20 13:12:46 +08:00