--- license: apache-2.0 tags: - comfyui - plato-keys - pandoras-workspace - procrustes - cross-encoder - cross-modal - qwen3.5 - qwen3-vl - gemma-4 - clap - moss-image - krea-2 - z-image - stable-audio-3 --- # PlatoKeys — Pre-Calibrated Cross-Encoder & Cross-Modal Alignment Keys for ComfyUI Closed-form alignment keys (`.safetensors`) for [**ComfyUI-PlatoKeys**](https://github.com/Nynxz/ComfyUI-PlatoKeys) and [**ComfyUI-PandorasWorkspace**](https://github.com/Nynxz/ComfyUI-PandorasWorkspace), inspired by Stanford Hazy Research's [**Plato's Key**](https://hazyresearch.stanford.edu/blog/2026-11-25-platos-key) and the Platonic Representation Hypothesis. Place downloaded `.safetensors` keys (flat or keeping the subfolder layout — both node packs discover keys recursively) into: - `ComfyUI/models/plato_keys/` (for **ComfyUI-PlatoKeys**), or - `ComfyUI/models/pandora_keys/` (for **ComfyUI-PandorasWorkspace** — also auto-reads `plato_keys/`). --- ## Repository Layout ```text nynxz/PlatoKeys/ ├── moss_image/ # Cross-encoder keys targeting MOSS-Image (Qwen3.5-9B) ├── krea2/ # 12-layer cross-encoder keys targeting Krea 2 (Qwen3-VL-4B) ├── z_image/ # Cross-encoder, Vision, & Speech keys targeting Z-Image / Z-Image-Turbo (Qwen3-4B) ├── cross_modal/ # Zero-transcription Audio->Image & Image->Audio keys (Pandora's Workspace) └── ablations/ # Procrustes / *_norm / PCA ablation variants & calibration metrics JSONs ``` --- ## 1. `moss_image/` — Target: MOSS-Image (`Qwen3.5-9B`, `4096-d`) Swap MOSS-Image's `Qwen3.5-9B` encoder for a lighter `Qwen3.5-2B` or `Gemma 4 E2B / E4B` encoder. | File | Route | Size | Layers | TokCos | CtrCos | R² | Notes | |---|---|---:|---|---:|---:|---:|---| | [`moss_image/qwen35_2b_to_qwen35_9b_moss_image_ridge.safetensors`](moss_image/qwen35_2b_to_qwen35_9b_moss_image_ridge.safetensors) | `Qwen3.5-2B → Qwen3.5-9B` | 16.8 MB | `last` | **0.8978** | **0.8402** | **0.7486** | Recommended (`moss_image` template) | | [`moss_image/qwen35_2b_comfy_to_qwen35_9b_moss_ridge.safetensors`](moss_image/qwen35_2b_comfy_to_qwen35_9b_moss_ridge.safetensors) | `Qwen3.5-2B (stock ComfyUI) → Qwen3.5-9B` | 16.8 MB | `last` | **0.8859** | **0.8333** | **0.7371** | For stock `CLIPLoader(type="qwen_image")` | | [`moss_image/gemma4_e4b_4layer_to_qwen35_9b_moss_image_ridge.safetensors`](moss_image/gemma4_e4b_4layer_to_qwen35_9b_moss_image_ridge.safetensors) | `Gemma 4 E4B → Qwen3.5-9B` | 83.9 MB | `[21,28,35,42]` | **0.8860** | **0.7638** | **0.5936** | 4-layer concat (`10240 → 4096`), cross-tokenizer | | [`moss_image/gemma4_e2b_4layer_to_qwen35_9b_moss_image_ridge.safetensors`](moss_image/gemma4_e2b_4layer_to_qwen35_9b_moss_image_ridge.safetensors) | `Gemma 4 E2B → Qwen3.5-9B` | 50.4 MB | `[18,24,30,35]` | **0.8556** | **0.7008** | **0.4739** | 4-layer concat (`6144 → 4096`), cross-tokenizer | | [`moss_image/qwen35_9b_to_qwen35_2b_moss_image_ridge.safetensors`](moss_image/qwen35_9b_to_qwen35_2b_moss_image_ridge.safetensors) | `Qwen3.5-9B → Qwen3.5-2B` | 16.8 MB | `last` | **0.9433** | **0.9008** | **0.8384** | Reverse direction | --- ## 2. `krea2/` — Target: Krea 2 (`12-layer Qwen3-VL-4B`, `12 × 2560-d`) Drop-in 12-layer stack keys for Krea 2 via **Patch CLIP (Plato Key)** or **Plato Key Encode** (supports Visual Fusion & standard `CLIPTextEncode`). | File | Route | Size | Layers | TokCos | CtrCos | R² | Notes | |---|---|---:|---|---:|---:|---:|---| | [`krea2/qwen35_9b_to_qwen3vl_4b_krea2_ridge.safetensors`](krea2/qwen35_9b_to_qwen3vl_4b_krea2_ridge.safetensors) | `Qwen3.5-9B → Krea 2` | 241 MB | 12-layer | **0.9432** | **0.8798** | **0.7723** | Bigger/stronger encoder for Krea 2 | | [`krea2/qwen35_2b_to_qwen3vl_4b_krea2_ridge.safetensors`](krea2/qwen35_2b_to_qwen3vl_4b_krea2_ridge.safetensors) | `Qwen3.5-2B → Krea 2` | 121 MB | 12-layer | **0.9352** | **0.8638** | **0.7412** | Smaller/faster encoder for Krea 2 | | [`krea2/gemma4_e4b_12layer_to_qwen3vl_4b_krea2_ridge.safetensors`](krea2/gemma4_e4b_12layer_to_qwen3vl_4b_krea2_ridge.safetensors) | `Gemma 4 E4B → Krea 2` | 157.5 MB | 12-layer | — | **0.7454** | **0.5400** | Cross-tokenizer SentencePiece ↔ Qwen BPE | | [`krea2/gemma4_e2b_12layer_to_qwen3vl_4b_krea2_ridge.safetensors`](krea2/gemma4_e2b_12layer_to_qwen3vl_4b_krea2_ridge.safetensors) | `Gemma 4 E2B → Krea 2` | 94.6 MB | 12-layer | — | **0.7007** | **0.4698** | Lightweight Gemma 4 E2B → Krea 2 | --- ## 3. `z_image/` — Target: Z-Image / Z-Image-Turbo (`Qwen3-4B`, `2560-d`) Enable **zero-training Vision** (via `Qwen3-VL-4B`, calibrated on text prompts only!) and **Text + Spoken Audio** (via `Gemma 4 E2B / E4B`) on text-only `Z-Image-Turbo`. | File | Route | Size | Layers | TokCos | CtrCos | R² | Capability | |---|---|---:|---|---:|---:|---:|---| | [`z_image/qwen3vl_4b_to_zimage_qwen3_4b_ridge.safetensors`](z_image/qwen3vl_4b_to_zimage_qwen3_4b_ridge.safetensors) | `Qwen3-VL-4B → Z-Image` | 13.1 MB | `hidden(-2)` | **0.9565** | **0.9672** | **0.9964** | **Zero-training Image → Z-Image & Virtual-Tok Fusion** | | [`z_image/gemma4_e4b_4layer_to_zimage_qwen3_4b_ridge.safetensors`](z_image/gemma4_e4b_4layer_to_zimage_qwen3_4b_ridge.safetensors) | `Gemma 4 E4B → Z-Image` | 52.5 MB | `[21,28,35,42]` | **0.9448** | **0.7483** | **0.5617** | Text + **zero-transcription Spoken Audio → Z-Image** | | [`z_image/gemma4_e2b_4layer_to_zimage_qwen3_4b_ridge.safetensors`](z_image/gemma4_e2b_4layer_to_zimage_qwen3_4b_ridge.safetensors) | `Gemma 4 E2B → Z-Image` | 31.5 MB | `[18,24,30,35]` | **0.9314** | **0.6884** | **0.4422** | Lightweight Gemma 4 E2B → Z-Image | --- ## 4. `cross_modal/` — Cross-Modal Bridges (for ComfyUI-PandorasWorkspace) True non-speech **Environmental Audio → Image** and **Image → Sound** keys — single forward pass, zero transcription, zero image captioning, zero LLM `generate()`. | File | Route | Method | Size | Capability | |---|---|---|---:|---| | [`cross_modal/clap_env_audio_to_zimage_basis.safetensors`](cross_modal/clap_env_audio_to_zimage_basis.safetensors) | `LAION CLAP → Z-Image` | `basis_attention` (180 scenes) | 17.7 MB | **Zero-audio-training Environmental Sound → Z-Image** (`Replace` & `Virtual Tok` fusion) | | [`cross_modal/gemma4_e4b_env_audio_to_zimage_ridge.safetensors`](cross_modal/gemma4_e4b_env_audio_to_zimage_ridge.safetensors) | `Gemma 4 E4B Audio → Z-Image` | Closed-form Ridge (`Ret@1 = 81.2%`) | 52.5 MB | Paired ESC-50 environmental sound → Z-Image readout | | [`cross_modal/clip_h_to_stable_audio_3_basis.safetensors`](cross_modal/clip_h_to_stable_audio_3_basis.safetensors) | `CLIP-ViT-H → Stable Audio 3` | `basis_attention` (180 scenes) | 9.0 MB | **Zero-training Image → Stereo Sound** on Stable Audio 3 Medium (uses stock `clip_vision_h`) | --- ## 5. `ablations/` — Procrustes, Variance-Matched (`_norm`), & PCA Variants Archived comparison keys (`procrustes`, `procrustes_norm`, `procrustes_pca256`, `ridge_norm`) and `metrics.json` benchmark logs from the initial MOSS-Image and Krea 2 calibration sweeps. For everyday ComfyUI use, prefer the `*_ridge.safetensors` and `*_basis.safetensors` keys in the target-model folders above.