4B参数模型跑出0.59秒高清图,还带编辑
大模型做图越来越强,但训练和部署成本也高得吓人。这篇论文反着来:用一套精巧的“编码器-骨干-系统”联合设计,把模型压到40亿参数(4B),却能在单张A100显卡上0.59秒生成1024x1024图片,编辑也只要1秒出头。核心是两招:一是自研的轻量级图像编码器Mage-VAE,用一步扩散编码+锚点正则,压缩成本比主流VAE低一个数量级,画质却不输;二是原生分辨率打包和CUDA内核融合,训练速度提升2.5倍。最终模型在标准评测上不输更大模型,还出了4步推理的Turbo版,让高清生成和编辑真正可交互。这不是你明天就能用的工具,但它证明:不用堆参数,靠系统级优化也能跑出实用速度——对做AI图像产品的团队是个信号:效率可以这样抠出来。
📄 原文摘要(英文)
Large-scale visual generators are increasingly capable but costly to train, fine-tune, and deploy. We introduce Mage-Flow, a compact 4B-scale generative stack for efficient text-to-image generation and instruction-based image editing. The stack is built from two co-designed components: Mage-VAE, a lightweight high-fidelity latent tokenizer, and a Native-Resolution Multimodal Diffusion Transformer trained with rectified flow matching. Mage-VAE uses one-step diffusion-style encoding and decoding with anchor-latent regularization, preserving the reconstruction quality of strong public VAEs while reducing tokenization cost by more than an order of magnitude. Together with native-resolution packing and stack-level CUDA kernel fusion, the stack supports flexible-resolution training and improves end-to-end training throughput by about 2.5times. Built on this foundation, we develop a complete model family with Base, RL-aligned, and Turbo variants for both generation and editing. Diffusion-NFT improves prompt following, text rendering, aesthetic quality, and editing fidelity, while few-step distillation with adversarial perceptual guidance produces 4-step Turbo models for low-latency inference. Despite its compact scale, Mage-Flow and Mage-Flow-Edit achieves competitive performance across standard generation and editing benchmarks. More importantly, the Turbo variants make high-resolution generation and editing practical for interactive use: at 1024^2 resolution on a single NVIDIA A100 GPU, Mage-Flow-Turbo generates an image in 0.59s, and Mage-Flow-Edit-Turbo edits an image in 1.02s, while maintaining a small memory footprint. These results show that careful tokenizer--backbone--system co-design can deliver strong high-resolution generation and editing within an efficient 4B model family.