Text-to-Image
Diffusers
Safetensors
MLX
mflux
MOSSImagePipeline
apple-silicon
moss-image
chinese-calligraphy
layout-to-image
Instructions to use vanch007/MOSS-Image-SFT-mlx-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use vanch007/MOSS-Image-SFT-mlx-bf16 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("vanch007/MOSS-Image-SFT-mlx-bf16", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - MLX
How to use vanch007/MOSS-Image-SFT-mlx-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download vanch007/MOSS-Image-SFT-mlx-bf16 --local-dir MOSS-Image-SFT-mlx-bf16
- mflux
How to use vanch007/MOSS-Image-SFT-mlx-bf16 with mflux:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Draw Things
- DiffusionBee
- Atomic Chat
MOSS-Image-SFT-mlx-bf16
中文说明
本仓库提供专为 Apple Silicon (Mac) 优化的 mflux MLX BF16 原生格式权重,基于复旦大学 OpenMOSS-Team/MOSS-Image-SFT 图像生成大模型进行原生移植与转换。
完整支持通过 mflux 在 Apple Silicon Mac (M系列芯片) 上直接离线运行纯本地的高精度中文排版生成、复杂 Layout 空间布局生图与商业摄影大片。
核心亮点
- **42 层 DiT 单流 Transformer (原生 BF16)**:42 个 Transformer Block,隐藏层维度 3072,全量 MLX 原生 SDPA 注意力加速与
_situ门控激活函数。 - Qwen 3.5 多模态文本编码:无缝支持长文本与复杂结构化 Layout-to-Image JSON 提示词,实现精准的中文文字排版与书法渲染。
- FLUX.2 Small VAE 高清解码:原生对齐批归一化反变换,对比度饱满、高光通透、暗部深邃。
- 原生支持 StepCache 缓存加速:支持残差特征跳步复用,大幅减少深层计算开销。
快速开始 (CLI)
1. 命令行直接生图
mflux-generate-moss-image \
--model vanch007/MOSS-Image-SFT-mlx-bf16 \
--prompt 'A wide view of a modern kitchen refrigerator. A small yellow sticky note on the refrigerator door is clearly handwritten in clean Chinese calligraphy: "记得买牛奶和鸡蛋!顺便带一袋面包。" Warm kitchen light, high resolution, sharp focus.' \
--width 1024 \
--height 1024 \
--steps 25 \
--guidance 3.0 \
--output refrigerator.png
2. Python API 调用
from mflux.models.moss_image.variants.txt2img.moss_image import MOSSImage
model = MOSSImage(model_path="vanch007/MOSS-Image-SFT-mlx-bf16")
image = model.generate_image(
prompt='A cute fluffy ginger cat sitting on a polished wooden table in soft morning window light, realistic photography, sharp focus.',
width=1024,
height=1024,
num_inference_steps=25,
guidance_scale=3.0,
seed=42,
)
image.save("ginger_cat.png")
English
This repository provides the native MLX BF16 format weights of OpenMOSS-Team/MOSS-Image-SFT for Apple Silicon via mflux.
Highlights
- 42-layer single-stream DiT transformer in native MLX format.
- Qwen 3.5 text encoder supporting complex layout JSON and bilingual text rendering.
- FLUX.2 Small VAE for clean, high-dynamic-range image reconstruction.
Acknowledgments
- OpenMOSS-Team for MOSS-Image
- mflux by filipstrand
- Downloads last month
- -
Hardware compatibility
Log In to add your hardware
Quantized
Model tree for vanch007/MOSS-Image-SFT-mlx-bf16
Base model
OpenMOSS-Team/MOSS-Image-Base Finetuned
OpenMOSS-Team/MOSS-Image-SFT