unified-inference/Feature Request: Enable Unified Text+Image Output Mode in Qwen-Image via Qwen2.5-VL Core
**Thank you Qwen team! **
Your work on Qwen-Image is impressive—the MMDiT architecture + Qwen2.5-VL integration delivers best-in-class text rendering and editing. I've tested multiple on-device diffusion models, and Qwen-Image stands out for efficiency and quality. That's why I'm excited to propose an enhancement that could make it even more powerful for edge AI.
Overview
Propose extending Qwen-Image to support dynamic output mode selection (text OR image) based on user prompt intent, by "unlocking" the already-integrated Qwen2.5-VL core for dual-role inference.
Motivation
Edge devices (phones, IoT) need multimodal flexibility without loading separate LLM + diffusion models Qwen2.5-VL is already embedded as a frozen encoder—enabling its text-generation capability would require minimal architectural changes Unified output mode reduces app complexity, memory footprint, and orchestration overhead Aligns with on-device AI trends: users expect one model to "understand and respond" in any modality
Proposed Solution
Add a lightweight output router head that detects prompt intent: "Generate a cyberpunk cat" → Image mode (current behavior) "Explain quantum physics" → Text mode (new capability) "Describe this image then make a variant" → Hybrid pipeline Enable conditional activation of Qwen2.5-VL's decoder layers when text output is requested Provide a simple API flag: mode="auto" | "text" | "image" for explicit control Optimize memory sharing: reuse VAE/latent buffers between modes to minimize peak RAM
Why This Is Feasible
✅ Qwen2.5-VL weights are already loaded (currently frozen as encoder) ✅ MMDiT backbone can be bypassed for pure text generation ✅ Quantization strategy (4-bit LLM + 8-bit diffusion) is already edge-optimized ✅ Prior art: MNN runtime demonstrates unified LLM+diffusion execution on mobile
Use Cases
Offline multimodal assistants on phones: "What's in this photo?" → text answer; "Make it anime-style" → image output Creative apps: Users mix text brainstorming + visual generation in one workflow Privacy-preserving edge AI: No cloud round-trip needed for multimodal reasoning Low-bandwidth regions: Single model download serves multiple interaction types
Technical Considerations
Router logic could be a tiny classifier head (<1M params) trained on intent detection Memory pooling: Share KV cache between text/image modes to avoid duplication Delegate optimization: GPU/NPU scheduling could prioritize active mode (text vs. diffusion) Backward compatibility: Default behavior remains image-only; new mode is opt-in
Alternatives Considered
Running separate Qwen2.5-7B + Qwen-Image models: ~2× memory, complex orchestration Cloud fallback for text mode: Defeats on-device privacy/latency benefits Keeping status quo: Misses opportunity to lead in unified edge multimodal AI
References
Qwen-Image Technical Report: MMDiT + Qwen2.5-VL architecture GitHub MNN runtime: Demonstrates unified LLM+diffusion execution on mobile [[CSDN Blog]] Edge AI trends: Multimodal on-device inference is the next frontier (Google AI Edge, Apple MLX)
Next Steps / Contribution
I'm happy to: Help prototype the intent router logic Provide benchmarking data on target devices (Pixel, iPhone, Android SoCs) Collaborate on a design doc for memory-sharing optimizations Please let me know if this aligns with the Qwen roadmap and what the preferred contribution workflow would be.
I did some more research and just found out that you already have a unified model, Qwen-VLo. so it would be easier for you to implement this then. This would greatly boost both qwen image and mnn runtime in the community and make your company to lead in edge ai.
Thanks!
Source: QwenLM/Qwen-Image