---
title: MOSS-Image-EntroPack
canonical_url: "https://www.modelscope.cn/models/DiffSynth-Studio/MOSS-Image-EntroPack"
md_url: "https://www.modelscope.cn/models/DiffSynth-Studio/MOSS-Image-EntroPack.md"
repository: DiffSynth-Studio/MOSS-Image-EntroPack
chinese_name: "MOSS-Image EntroPack低位量化模型"
last_updated: 2026-10-19
pipeline_tag: text-to-image-synthesis
tasks:
  - text-to-image-synthesis
base_model_relation: finetune
parameters: 40.9B
tensor_type:
  - U8
  - BF16
  - F32
library_name:
  - pytorch
  - safetensors
downloads: 24
stars: 0
---

# MOSS-Image-EntroPack

> MOSS-Image-EntroPack - DiffSynth-Studio 在 ModelScope 开源的模型。MOSS-Image — EntroPack Pre-Quantized Models

- **Repository**: DiffSynth-Studio/MOSS-Image-EntroPack
- **Tasks**: text-to-image-synthesis
- **Parameters**: 40.9B
- **Downloads**: 24
- **Stars**: 0
- **Last updated**: 2026-10-19

Source: https://www.modelscope.cn/models/DiffSynth-Studio/MOSS-Image-EntroPack

---

# MOSS-Image — EntroPack Pre-Quantized Models

We provide pre-quantized weight packages produced by [**EntroPack**](https://github.com/modelscope/entropack) for **MOSS-Image** (Base and SFT, from [openmoss/MOSS-Image-Base](https://www.modelscope.cn/models/openmoss/MOSS-Image-Base) and [openmoss/MOSS-Image-SFT](https://www.modelscope.cn/models/openmoss/MOSS-Image-SFT)), which can be used with the quantization features of [**DiffSynth-Studio**](https://github.com/modelscope/DiffSynth-Studio).

Base is provided at three levels, SFT additionally ships a 3.5-bit variant, and the 3.5-bit and 4.5-bit DiTs use mixed quantization. Base and SFT share the same text encoder packages:

* **`3.5bit`** (SFT only, lowest VRAM) — mixed-bit: the quantization-sensitive layers keep **5.0 bpp**, while the remaining layers use **3.2516 bpp** (weighted target 3.5 bpp);
* **`4.5bit`** (balanced) — mixed-bit: the quantization-sensitive layers keep **5.0 bpp**, while the remaining layers use **4.4172 bpp** (weighted target 4.5 bpp);
* **`6bit`** (highest precision) — uniform entropy coding at 6 bits per weight;
* **`int8_6bit`** (fastest inference) — weights are first **INT8 W8A8-quantized**, then entropy-coded by EntroPack down to 6-bit storage; the forward pass uses **INT8 GEMM**, which delivers a faster inference speed than the BF16 GEMM used by the other levels.

All packages are entropy-coded from the original BF16 weights directly. Every `*.safetensors` ships with a same-named `*.json` that records its quantization config. `actual bpp = 8 × Σ storage bytes / Σ numel` is measured on the package artifacts.

## Preview

All previews are generated with the same prompt and seed; `bf16` is the full-precision reference.

### SFT

<table width="100%">
  <tr>
    <td width="33%" align="center">bf16 (reference)</td>
    <td width="33%" align="center">6bit</td>
    <td width="33%" align="center">int8@6</td>
  </tr>
  <tr>
    <td align="center"><img width="100%" src="assets/MOSS-Image-SFT/bf16.jpg"></td>
    <td align="center"><img width="100%" src="assets/MOSS-Image-SFT/dit_6bit.jpg"></td>
    <td align="center"><img width="100%" src="assets/MOSS-Image-SFT/dit_int8_6bit.jpg"></td>
  </tr>
  <tr>
    <td width="33%" align="center">4.5bit</td>
    <td width="33%" align="center">3.5bit</td>
    <td></td>
  </tr>
  <tr>
    <td align="center"><img width="100%" src="assets/MOSS-Image-SFT/dit_4.5bit.jpg"></td>
    <td align="center"><img width="100%" src="assets/MOSS-Image-SFT/dit_3.5bit.jpg"></td>
    <td></td>
  </tr>
</table>

### Base

<table width="100%">
  <tr>
    <td width="25%" align="center">bf16 (reference)</td>
    <td width="25%" align="center">6bit</td>
    <td width="25%" align="center">4.5bit</td>
    <td width="25%" align="center">int8@6</td>
  </tr>
  <tr>
    <td align="center"><img width="100%" src="assets/MOSS-Image-Base/bf16.jpg"></td>
    <td align="center"><img width="100%" src="assets/MOSS-Image-Base/dit_6bit.jpg"></td>
    <td align="center"><img width="100%" src="assets/MOSS-Image-Base/dit_4.5bit.jpg"></td>
    <td align="center"><img width="100%" src="assets/MOSS-Image-Base/dit_int8_6bit.jpg"></td>
  </tr>
</table>

## DiT

### SFT

| name | file | actual bpp | size |
|---|---|---|---|
| dit_3.5bit (mixed) | `models/MOSS-Image-SFT/dit_3.5bit.safetensors` | 3.526 | 2.24 GB |
| dit_4.5bit (mixed) | `models/MOSS-Image-SFT/dit_4.5bit.safetensors` | 4.545 | 2.89 GB |
| dit_6bit | `models/MOSS-Image-SFT/dit_6bit.safetensors` | 6.055 | 3.85 GB |
| dit_int8_6bit (INT8 GEMM) | `models/MOSS-Image-SFT/dit_int8_6bit.safetensors` | 6.063 | 3.85 GB |

### Base

| name | file | actual bpp | size |
|---|---|---|---|
| dit_4.5bit (mixed) | `models/MOSS-Image-Base/dit_4.5bit.safetensors` | 4.545 | 2.89 GB |
| dit_6bit | `models/MOSS-Image-Base/dit_6bit.safetensors` | 6.055 | 3.85 GB |
| dit_int8_6bit (INT8 GEMM) | `models/MOSS-Image-Base/dit_int8_6bit.safetensors` | 6.063 | 3.85 GB |

## Text Encoder

The text encoder packages are shared by Base and SFT.

| name | file | actual bpp | size |
|---|---|---|---|
| text_encoder_4.5bit | `models/text_encoder_4.5bit.safetensors` | 4.552 | 5.97 GB |
| text_encoder_6bit | `models/text_encoder_6bit.safetensors` | 6.070 | 7.29 GB |
| text_encoder_int8_6bit (INT8 GEMM) | `models/text_encoder_int8_6bit.safetensors` | 6.075 | 7.29 GB |

## Usage

### Install

```bash
# DiffSynth-Studio
git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio && pip install -e .

# EntroPack (pick the extra matching your CUDA version: cuda13 / cuda12)
git clone https://github.com/modelscope/entropack.git
cd entropack && pip install -e '.[cuda13]'
```

### Example scripts

* Inference: [standard](https://github.com/modelscope/DiffSynth-Studio/blob/main/examples/moss_image/model_inference/MOSS-Image-EntroPack.py) / [low VRAM](https://github.com/modelscope/DiffSynth-Studio/blob/main/examples/moss_image/model_inference_low_vram/MOSS-Image-EntroPack.py) — defaults to SFT 4.5bit; switch `dit_package` / `base_model_id` together to use Base or another level
* LoRA training: [train](https://github.com/modelscope/DiffSynth-Studio/blob/main/examples/moss_image/model_training/lora/MOSS-Image-entropack.sh) / [validation](https://github.com/modelscope/DiffSynth-Studio/blob/main/examples/moss_image/model_training/validate_lora/MOSS-Image-entropack.py) — defaults to SFT; replace `MOSS-Image-SFT` with `MOSS-Image-Base` in the dataset and model paths to train on Base

`dit_package` and `text_encoder_package` are chosen independently: any combination works (e.g. `dit_int8_6bit` with `text_encoder_4.5bit`). The 6-bit packages are pre-registered in DiffSynth-Studio, so they load with a plain `ModelConfig`; the helper below registers any package's json sidecar before loading:

```python
import json

import torch

from diffsynth.configs import MODEL_CONFIGS
from diffsynth.pipelines.moss_image import MOSSImagePipeline, ModelConfig

prequant_model_id = "DiffSynth-Studio/MOSS-Image-EntroPack"
base_model_id = "openmoss/MOSS-Image-SFT"
dit_package = "models/MOSS-Image-SFT/dit_4.5bit.safetensors"
text_encoder_package = "models/text_encoder_4.5bit.safetensors"


def make_package(pattern):
    package = ModelConfig(model_id=prequant_model_id, origin_file_pattern=pattern)
    package.download_if_necessary()
    sidecar = ModelConfig(model_id=prequant_model_id, origin_file_pattern=pattern.replace(".safetensors", ".json"))
    sidecar.download_if_necessary()
    with open(sidecar.path) as handle:
        entry = json.load(handle)
    if not any(config.get("model_hash") == entry["model_hash"] for config in MODEL_CONFIGS):
        MODEL_CONFIGS.append(entry)
    return package


pipe = MOSSImagePipeline.from_pretrained(
    torch_dtype=torch.bfloat16,
    device="cuda",
    model_configs=[
        make_package(dit_package),
        make_package(text_encoder_package),
        ModelConfig(model_id=base_model_id, origin_file_pattern="vae/diffusion_pytorch_model.safetensors", computation_dtype=torch.float32),
    ],
    tokenizer_config=ModelConfig(model_id=base_model_id, origin_file_pattern="tokenizer/"),
)
```
