liming123332/sd-forge-llm_sdxl_adapter — reverse-engineered prompt

Reverse engineered prompt

Build me a plug in for Stable Diffusion reForge that lets me use a local LLM as the text encoder for SDXL image generation through an adapter, and make it work in both txt2img and img2img. I also want matching ComfyUI nodes so the same idea can be used in workflows.

It should let me pick an LLM model and an adapter from the usual model folders, turn the feature on or off, set a system prompt, choose how many starting tokens to skip, and pick the adapter type for Gemma or T5Gemma. Please support Gemma and T5Gemma style models, including a more memory friendly loading path for T5Gemma so it uses less VRAM when possible.

Make setup simple, including dependency install if needed, and handle model loading errors clearly so the console shows useful status messages. It should work with models and adapters stored either in the main models folders or inside the extension folder. If anything is unclear, look up the current reForge and ComfyUI docs online.

Want more depth? Deep Reverse