--- license: apache-2.0 tags: - comfyui - plato-keys - ridge - cross-encoder - qwen3-vl - qwen3.5 - moss-image - minimax-h3 --- # PlatoKeys (`SKYMYTH/PlatoKeys`) Pre-calibrated closed-form **PlatoKey** alignment weights (`.safetensors`) for [**ComfyUI-PlatoKeys**](https://github.com/Nynxz/ComfyUI-PlatoKeys), inspired by Stanford Hazy Research's [**Plato's Key**](https://hazyresearch.stanford.edu/blog/2026-11-25-platos-key). Zero gradient training — calibrated directly on ComfyUI-native hidden states using exact `float64` closed-form Ridge regression. --- ## Available Keys ### `moss_image/` — Target: MOSS-Image (`Qwen3.5-9B`, `4096-d`) | File | Route | Size | Source Layers | TokCos | CtrCos | CntCos | R² | ChStdR | Notes | |---|---|---:|---|---:|---:|---:|---:|---:|---| | [`moss_image/qwen3vl_32b_4layer_to_qwen35_9b_moss_image_ridge.safetensors`](moss_image/qwen3vl_32b_4layer_to_qwen35_9b_moss_image_ridge.safetensors) | `Qwen3-VL-32B (MiniMax H3) → Qwen3.5-9B (MOSS-Image)` | 167.87 MB | `[25, 33, 41, 50]` (`norm=False`, `20480-d`) | **0.9134** | **0.8691** | **0.8600** | **0.7840** | **0.9985** | Target `last` (`norm=True`, `4096-d`), `fp16` | #### Calibration Details - **Source checkpoint:** `qwen3vl_32b_minimax_h3_int8_convrot` (`CLIPType.MINIMAX`, 4-layer concat `[25, 33, 41, 50]`, `source_layer_norm=False`, `20,480-d`) - **Target checkpoint:** `qwen3.5_9b_int8_convrot` (`CLIPType.MOSS_IMAGE`, `last` layer, `target_layer_norm=True`, `4,096-d`) - **Prompt template:** `<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n\n` (`strip_prompt=True`) - **Corpus:** `2,000` prompts (`1,850` train / `74,557` tokens; `150` held-out validation / `5,974` tokens; `99.1%` UTF-8 byte-span token alignment) - **Method:** Closed-form `float64` Ridge regression (`best_alpha = 3.00e-04`, zero gradient descent) - **Additional validation metrics:** `content_r2 = 0.7599`, `RelL2 = 0.3951`, `NormR = 0.9167` --- ## ComfyUI Usage 1. Place the downloaded key into: ```text ComfyUI/models/plato_keys/moss_image/qwen3vl_32b_4layer_to_qwen35_9b_moss_image_ridge.safetensors ``` 2. Install [**ComfyUI-PlatoKeys**](https://github.com/Nynxz/ComfyUI-PlatoKeys) and restart/refresh ComfyUI. 3. Wire in ComfyUI: ```text CLIPLoader (qwen3vl_32b_minimax_h3_int8_convrot.safetensors, type=minimax) ─┬─► Plato Key Encode (+) ► MOSS-Image Sampler Load Plato Key (moss_image/qwen3vl_32b_4layer_to_qwen35_9b_moss_image_ridge) ┘ ``` Or use **`Patch CLIP (Plato Key)`** before **`CLIPTextEncode`** (or any downstream conditioning node).