peal.sparse_dictionaries.splice_decomposition

SpLICE concept dictionary over CLIP image embeddings.

SpLICE (Bhalla et al.) decomposes a CLIP image embedding into sparse non-negative weights over a fixed vocabulary of text concepts, so no dictionary training is needed. PEAL exposes it through the SparseDictionary interface so that DiDAE can edit a CLIP-conditioned generator (Stable Diffusion, RAE) along named concepts. The SpLiCE package is imported from peal/dependencies/SpLiCE by extending sys.path at import time.

Classes

SpLICEDecomposition

Sparse dictionary using SpLICE for concept decomposition.

SpLICEDecompositionConfig

Configuration for SpLICE-based sparse decomposition.