Implements "The Latent Color Subspace" (arXiv:2603.12261v1, ICML 2026) as a ComfyUI plugin with V3 API + V2 backward compatibility. 6 nodes across 3 categories: - LCS/calibration: LCSCalibrate (PCA from VAE), LCSLoadData (cache load) - LCS/intervention: LCSColorIntervene (single color), LCSColorBatch (multi) - LCS/observe: LCSPreviewColors (latent color map), LCSStepObserver Core modules: patchify (16ch->64d patches), bicone HSL<->LCS mapping, alpha_t/beta_t tables (51 entries from Appendix F), PCA calibration, and timestep normalization with residual preservation.
10 lines
434 B
Python
10 lines
434 B
Python
from .lcs_data import LCSData
|
|
from .patchify import patchify, unpatchify
|
|
from .timestep import sigma_to_paper_t, get_alpha_beta, normalize_to_t50, denormalize_from_t50
|
|
from .color_space import decode_lcs_to_hsl, encode_hsl_to_lcs, hex_to_hsl, hsl_to_rgb
|
|
|
|
# Lazy import for calibration (depends on comfy.utils)
|
|
def calibrate(*args, **kwargs):
|
|
from .calibration import calibrate as _calibrate
|
|
return _calibrate(*args, **kwargs)
|