diff --git a/README.md b/README.md index 04d07f0..8398931 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,79 @@ --- -license: Apache License 2.0 +base_model: black-forest-labs/FLUX.1-Kontext-dev +base_model_relation: quantized +datasets: +- mit-han-lab/svdquant-datasets +frameworks: PyTorch +language: +- en +license: other +license_link: https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/blob/main/LICENSE.md +license_name: flux-1-dev-non-commercial-license +tags: +- image-to-image +- SVDQuant +- FLUX.1-Kontext-dev +- FLUX.1 +- Diffusion +- Quantization +- ICLR2025 +tasks: +- text-to-image-synthesis +- image-to-image -#model-type: -##如 gpt、phi、llama、chatglm、baichuan 等 -#- gpt - -#domain: -##如 nlp、cv、audio、multi-modal -#- nlp - -#language: -##语言代码列表 https://help.aliyun.com/document_detail/215387.html?spm=a2c4g.11186623.0.0.9f8d7467kni6Aa -#- cn - -#metrics: -##如 CIDEr、Blue、ROUGE 等 -#- CIDEr - -#tags: -##各种自定义,包括 pretrained、fine-tuned、instruction-tuned、RL-tuned 等训练方法和其他 -#- pretrained - -#tools: -##如 vllm、fastchat、llamacpp、AdaSeq 等 -#- vllm --- -### 当前模型的贡献者未提供更加详细的模型介绍。模型文件和权重,可浏览“模型文件”页面获取。 -#### 您可以通过如下git clone命令,或者ModelScope SDK来下载模型 +

+ Nunchaku Logo +

-SDK下载 -```bash -#安装ModelScope -pip install modelscope -``` -```python -#SDK模型下载 -from modelscope import snapshot_download -model_dir = snapshot_download('nunchaku-tech/nunchaku-flux.1-kontext-dev') -``` -Git下载 -``` -#Git模型下载 -git clone https://www.modelscope.cn/nunchaku-tech/nunchaku-flux.1-kontext-dev.git +# Model Card for nunchaku-flux.1-kontext-dev + +![visual](https://huggingface.co/datasets/nunchaku-tech/cdn/resolve/main/ComfyUI-nunchaku/workflows/nunchaku-flux.1-kontext-dev.png) +This repository contains Nunchaku-quantized versions of [FLUX.1-Kontext-dev](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev), capable of editing images based on text instructions. It is optimized for efficient inference while maintaining minimal loss in performance. + +## Model Details + +### Model Description + +- **Developed by:** Nunchaku Team +- **Model type:** image-to-image +- **License:** [flux-1-dev-non-commercial-license](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/blob/main/LICENSE.md) +- **Quantized from model:** [FLUX.1-Kontext-dev](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev) + +### Model Files + +- [`svdq-int4_r32-flux.1-kontext-dev.safetensors`](./svdq-int4_r32-flux.1-kontext-dev.safetensors): SVDQuant quantized INT4 FLUX.1-Kontext-dev model. For users with non-Blackwell GPUs (pre-50-series). +- [`svdq-fp4_r32-flux.1-kontext-dev.safetensors`](./svdq-fp4_r32-flux.1-kontext-dev.safetensors): SVDQuant quantized NVFP4 FLUX.1-Kontext-dev model. For users with Blackwell GPUs (50-series). + + +### Model Sources + +- **Inference Engine:** [nunchaku](https://github.com/nunchaku-tech/nunchaku) +- **Quantization Library:** [deepcompressor](https://github.com/nunchaku-tech/deepcompressor) +- **Paper:** [SVDQuant: Absorbing Outliers by Low-Rank Components for 4-Bit Diffusion Models](http://arxiv.org/abs/2411.05007) +- **Demo:** [svdquant.mit.edu](https://svdquant.mit.edu) + +## Usage + +- Diffusers Usage: See [flux.1-kontext-dev.py](https://github.com/nunchaku-tech/nunchaku/blob/main/examples/flux.1-kontext-dev.py). Check our [tutorial](https://nunchaku.tech/docs/nunchaku/usage/kontext.html) for more advanced usage. +- ComfyUI Usage: See [nunchaku-flux.1-kontext-dev.json](https://nunchaku.tech/docs/ComfyUI-nunchaku/workflows/t2i.html#nunchaku-flux-1-kontext-dev-json). + +## Performance + +![performance](https://huggingface.co/datasets/nunchaku-tech/cdn/resolve/main/nunchaku/assets/efficiency.jpg) + +## Citation + +```bibtex +@inproceedings{ + 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}, + booktitle={The Thirteenth International Conference on Learning Representations}, + year={2025} +} ``` -

如果您是本模型的贡献者,我们邀请您根据模型贡献文档,及时完善模型卡片内容。

\ No newline at end of file +## Attribution Notice + +The FLUX.1 [dev] Model is licensed by Black Forest Labs Inc. under the FLUX.1 [dev] Non-Commercial License. Copyright Black Forest Labs Inc. IN NO EVENT SHALL BLACK FOREST LABS INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL. \ No newline at end of file