r/StableDiffusion • • 2d ago

Resource - Update Using a 9B text encoder with Krea-2 (Forge Neo)

Post image

The Plato’s Key research shows that one can make a simple linear adapter to fit foreign text encoders to generative models. A few Comfy nodes exist, wiring the various text encoders to different models. I wanted one in Forge Neo, specifically for using the Qwen 3.5 9B text encoder with Krea-2 instead of the native Qwen 4B VL. Why? I hoped for a better prompt adherence. Well... still hoping. It was fun making it anyway. Here's the extension: https://github.com/aoleg/sd-forge-platos-key

Long story short: the linear approach has its limitations. I made an extension for Forge Neo and trained my own key (with a dataset more than ten times the size of the Comfy node), and it was already passable, but prompt adherence was worse, not better, compared to the stock 4B VL. So I trained a projector as well, 5 epochs on some 25,000 prompts.

End result: it works. Very long prompts with mulptiple instances of long text can still come out imperfect, but a 9B text encoder is VERY close to the stock 4B VL: it made the text right in 38/48 images, where the stock 4B VL did it right in 39/48 cases (tested same prompt/seed pairs). I attached the kind of images I was testing on; it's a single image with one long prompt, not a collage. The showcase image is generated with Krea-2 and qwen3.5_9b_int8_convrot as a text encoder.

How to use: install the extension, choose qwen3.5_9b (from MOSS-Image, for example) as your text encoder in the top dropdown box; the extension downloads the key and projector files from my huggingface repo aoleg/qwen3.5-9b-krea2-platos-keys and... it just works.

14 Upvotes

4 comments sorted by

2

u/fondlingbreeze 20h ago

I wonder how it'd do with SDXL, considering the CLIP text encoders are primitive by today's standards.

1

u/aoleg77 20h ago

Hmm... Yeah, I might try that!

1

u/Turkino 1d ago

https://mistral.ai/news/mistral-multimodal-embed/

Wondering if this might be a nice "CLIP" to use too.

1

u/aoleg77 1d ago

Likely possible but the point is moot: it's a weaker text encoder than even a 4B LLM.