Recreating Midjourney sref for Krea 2: 108 Tokens Lock in Any Style
multimodalart · x · 2026-11-23
- Developer lyraaaa released krea2-sref-adapter (MIT license) on Hugging Face, bringing Midjourney-style sref style references to the Krea 2 image model: a single integer maps to a fixed style, and the same number yields an identical style across any prompt and seed.
- How it works: Krea 2 uses the Qwen3-VL text encoder to turn the prompt into hidden states, which then pass through txtfusion and an MLP to become one row of prompt tokens (each 6144-dimensional), placed before the image patches as "position-free bagged tokens." sref simply stuffs 108 extra tokens into this bag.
- Integer-to-style-block pipeline: the number is used as a seed to sample 64 Gaussian values, scaled by sd to get style coordinates; a fixed linear-mapping basis ([64,108,6144]) stored in srefspace.npz is then weighted-summed to generate a 108×6144 token block injected into the model.
- The accompanying image shows a grid of styles for many numbers, and the code is open-sourced on GitHub.
More from coding & agent
- Open-source ADK & MCP agentic engineering masterclass labs from GoTech World 2026 — gerardsans · 2026-11-23
- Grok Bot Black Friday deal hunter: watches stores every few hours, pings only on target prices — nima_owji · 2026-11-23
- Forward Deployed Engineer job listings up 4x as the AI-native role goes mainstream — tlakomy · 2026-11-23
- No cart on the site, yet orders flow: agents buying via Shopify's UCP endpoint — gaganghotra_ · 2026-11-23
- Hands-on with rumored Gemini 4 Neon: one prompt builds a full 3D cathedral scene — teortaxesTex · 2026-11-23
- How do you handle context handoffs between agents in production? — Ok_Avocado970 · 2026-11-23