nynxz/PlatoKeys

A set of .safetensors alignment keys released by nynxz (uploaded on 11 26), designed to be used with the author's ComfyUI-PlatoKeys / ComfyUI-PandorasWorkspace node packages. The approach is inspired by Plato's Key from Stanford's Hazy Research: it uses closed-form methods such as ridge regression to map the hidden states of one encoder to the space of another, without any training. The keys are grouped into four categories based on their target: MOSS-Image (replacing the Qwen3.5-9B encoder with Qwen3.5-2B or Gemma 4 E2B / E4B), Krea 2 (a stack of 12 layers of Qwen3-VL-4B), Z-Image / Z-Image-Turbo (connecting to Qwen3-VL-4B for image understanding and Gemma 4 for audio processing), and cross-modal keys for ambient sound → Z-Image and images → Stable Audio 3.

A set of .safetensors alignment keys released by nynxz (uploaded on 11 26), designed to be used with the author's ComfyUI-PlatoKeys / ComfyUI-PandorasWorkspace node packages. The approach is inspired by Plato's Key from Stanford's Hazy Research: it uses closed-form methods such as ridge regression to map the hidden states of one encoder to the space of another, without any training. The keys are grouped into four categories based on their target: MOSS-Image (replacing the Qwen3.5-9B encoder with Qwen3.5-2B or Gemma 4 E2B / E4B), Krea 2 (a stack of 12 layers of Qwen3-VL-4B), Z-Image / Z-Image-Turbo (connecting to Qwen3-VL-4B for image understanding and Gemma 4 for audio processing), and cross-modal keys for ambient sound → Z-Image and images → Stable Audio 3.

Why it matters These mapping files, computed in closed form without training, allow replacing the text encoders of MOSS-Image, Krea 2, and Z-Image with smaller models, while also enabling image understanding and audio processing.

Upvotes 29 · Likes 29 · Downloads 0

Reasons

  • Each key lists alignment metrics (token cosine similarity, centered cosine similarity, R²): for example, the recommended Qwen3.5-2B → MOSS-Image key has an R² of 0.7486, and the Qwen3-VL-4B → Z-Image key scores 0.9964; keys involving cross-tokenizer models like Gemma 4 score significantly lower (approximately 0.44–0.59)
  • Small file sizes: the recommended MOSS-Image key is 16.8 MB, and Krea 2 keys are 94.6–241 MB
  • The ablations directory includes control versions using Procrustes, PCA, etc., along with calibration metric JSONs, facilitating independent comparison

Usage

  • Place the required .safetensors files in ComfyUI/models/plato_keys/ (PandorasWorkspace uses models/pandora_keys/ but also reads from plato_keys). After installing the corresponding node packages, use the Patch CLIP (Plato Key) or Plato Key Encode nodes.
  • For daily use, select the *_ridge and *_basis keys in each target directory; when loading Qwen3.5-2B using the native CLIPLoader(type="qwen_image"), choose the MOSS-Image key with "comfy" in its filename.

Risks

  • The model card provides only alignment metrics, without image generation comparisons; the impact on image quality and prompt adherence after swapping encoders is unknown. It requires installing third-party custom nodes and is not native to ComfyUI.
  • This is a personal project; the data sources used for calibration are not specified. This entry has not been tested.

Open

Hugging Face Trending

Explore the latest AI Radar updates