---
title: svdquant-models
canonical_url: "https://www.modelscope.cn/models/AI-ModelScope/svdquant-models"
md_url: "https://www.modelscope.cn/models/AI-ModelScope/svdquant-models.md"
repository: AI-ModelScope/svdquant-models
last_updated: 2025-02-08
license: other
pipeline_tag: text-to-image-synthesis
tasks:
  - text-to-image-synthesis
base_model:
  - XLabs-AI/flux-RealismLora
  - alvdansen/sonny-anime-fixed
  - Shakker-Labs/FLUX.1-dev-LoRA-Children-Simple-Sketch
base_model_relation: adapter
parameters: 11.7B
tensor_type:
  - BF16
  - I8
  - I32
library_name:
  - pytorch
  - lora
  - safetensors
frameworks:
  - pytorch
language:
  - en
downloads: 1600
stars: 1
tags:
  - text-to-image
  - SVDQuant
  - FLUX.1-dev
  - INT4
  - FLUX.1
  - Diffusion
  - Quantization
  - LoRA
---

# svdquant-models

> svdquant-models - AI-ModelScope 在 ModelScope 开源的模型。Quantization Library:&nbsp; DeepCompressor &ensp; Inference Engine:&nbsp; Nunchaku [Paper] &ensp; [Code] &ensp; [Website] &ensp; [Blog]

AI-ModelScope/svdquant-models 是 ModelScope 魔搭社区上的 11.7B 参数text-to-image-synthesis模型，采用 other 许可，基于 XLabs-AI/flux-RealismLora、alvdansen/sonny-anime-fixed、Shakker-Labs/FLUX.1-dev-LoRA-Children-Simple-Sketch 构建。

- **Repository**: AI-ModelScope/svdquant-models
- **License**: other
- **Tasks**: text-to-image-synthesis
- **Parameters**: 11.7B
- **Base model**: XLabs-AI/flux-RealismLora, alvdansen/sonny-anime-fixed, Shakker-Labs/FLUX.1-dev-LoRA-Children-Simple-Sketch
- **Tags**: text-to-image, SVDQuant, FLUX.1-dev, INT4, FLUX.1, Diffusion, Quantization, LoRA
- **Downloads**: 1600
- **Stars**: 1
- **Last updated**: 2025-02-08

Source: https://www.modelscope.cn/models/AI-ModelScope/svdquant-models

---

<p align="center" style="border-radius: 10px">
  <img src="https://github.com/mit-han-lab/nunchaku/raw/refs/heads/main/assets/logo.svg" width="50%" alt="logo"/>
</p>
<h4 style="display: flex; justify-content: center; align-items: center; text-align: center;">Quantization Library:&nbsp;<a href='https://github.com/mit-han-lab/deepcompressor'>DeepCompressor</a> &ensp; Inference Engine:&nbsp;<a href='https://github.com/mit-han-lab/nunchaku'>Nunchaku</a>
</h4>
<div style="display: flex; justify-content: center; align-items: center; text-align: center;">
  <a href="https://arxiv.org/abs/2411.05007">[Paper]</a>&ensp;
  <a href='https://github.com/mit-han-lab/nunchaku'>[Code]</a>&ensp;
  <a href='https://hanlab.mit.edu/projects/svdquant'>[Website]</a>&ensp;
  <a href='https://hanlab.mit.edu/blog/svdquant'>[Blog]</a>
</div>

![teaser](https://github.com/mit-han-lab/nunchaku/raw/refs/heads/main/assets/lora.jpg)
SVDQuant seamlessly integrates with off-the-shelf LoRAs without requiring re-quantization. When applying LoRAs, it matches the image quality of the original 16-bit FLUX.1-dev.

## Model Description

<div>
This reposity contains a converted LoRA collection for SVDQuant INT4 FLUX.1-dev. The LoRA style includes <a href="https://huggingface.co/XLabs-AI/flux-RealismLora">Realism</a>, 
<a href="https://huggingface.co/aleksa-codes/flux-ghibsky-illustration">Ghibsky Illustration</a>, 
<a href="https://huggingface.co/alvdansen/sonny-anime-fixed">Anime</a>, 
<a href="https://huggingface.co/Shakker-Labs/FLUX.1-dev-LoRA-Children-Simple-Sketch">Children Sketch</a>, and 
<a href="https://huggingface.co/linoyts/yarn_art_Flux_LoRA">Yarn Art</a>.
</div>


## Usage

### Diffusers

Please follow the instructions in [mit-han-lab/nunchaku](https://github.com/mit-han-lab/nunchaku) to set up the environment. Then you can run the model with

```python
import torch
from diffusers import FluxPipeline

from nunchaku.models.transformer_flux import NunchakuFluxTransformer2dModel

transformer = NunchakuFluxTransformer2dModel.from_pretrained("mit-han-lab/svdq-int4-flux.1-dev")
pipeline = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.1-dev", transformer=transformer, torch_dtype=torch.bfloat16
).to("cuda")
image = pipeline("A cat holding a sign that says hello world", num_inference_steps=50, guidance_scale=3.5).images[0]
image.save("example.png")

```

### Comfy UI

Work in progress.

## Limitations

- The model is only runnable on NVIDIA GPUs with architectures sm_86 (Ampere: RTX 3090, A6000), sm_89 (Ada: RTX 4090), and sm_80 (A100). See this [issue](https://github.com/mit-han-lab/nunchaku/issues/1) for more details.
- You may observe some slight differences from the BF16 models in details.

### Citation

If you find this model useful or relevant to your research, please cite

```bibtex
@article{
  li2024svdquant,
  title={SVDQuant: Absorbing Outliers by Low-Rank Components for 4-Bit Diffusion Models},
  author={Li*, Muyang and Lin*, Yujun and Zhang*, Zhekai and Cai, Tianle and Li, Xiuyu and Guo, Junxian and Xie, Enze and Meng, Chenlin and Zhu, Jun-Yan and Han, Song},
  journal={arXiv preprint arXiv:2411.05007},
  year={2024}
}
```
