Text-to-Image
Diffusers
Krea2Pipeline
custom_krea2
image-generation
quantized
4-bit precision
int4
turbo
krea
krea-2
quantfunc
comfyui
Instructions to use QuantFunc/Krea-2-QuantFunc-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use QuantFunc/Krea-2-QuantFunc-4bit with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("QuantFunc/Krea-2-QuantFunc-4bit", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
|
Download README.md from QuantFunc/Krea-2-QuantFunc-4bit: direct link, hf CLI and curl.
- Browser
- Download file 4.53 kB
-
https://huggingface.co/QuantFunc/Krea-2-QuantFunc-4bit/resolve/main/README.md
- Command line
-
hf download hf://QuantFunc/Krea-2-QuantFunc-4bit/README.md
-
curl -L -o README.md https://huggingface.co/QuantFunc/Krea-2-QuantFunc-4bit/resolve/main/README.md
4.53 kB
| license: other | |
| license_name: krea-2-community-license | |
| base_model: | |
| - krea/Krea-2-Turbo | |
| base_model_relation: quantized | |
| pipeline_tag: text-to-image | |
| library_name: diffusers | |
| tags: | |
| - text-to-image | |
| - image-generation | |
| - quantized | |
| - 4-bit | |
| - int4 | |
| - turbo | |
| - krea | |
| - krea-2 | |
| - quantfunc | |
| - comfyui | |
| <div align="center" style="margin-top: 50px;"> | |
| <a href="https://github.com/QuantFunc/ComfyUI-QuantFunc"> | |
| <img src="https://raw.githubusercontent.com/QuantFunc/ComfyUI-QuantFunc/main/assets/logo.webp" width="300" alt="QuantFunc logo"> | |
| </a> | |
| </div> | |
| <p align="center"> | |
| ๐ <a href="https://www.quantfunc.com/">Website</a> | | |
| ๐ <a href="https://github.com/QuantFunc/ComfyUI-QuantFunc">GitHub</a> | | |
| ๐ค <a href="https://huggingface.co/QuantFunc">Hugging Face</a> | | |
| ๐ค <a href="https://www.modelscope.cn/profile/QuantFunc">ModelScope</a> | | |
| ๐จ <a href="https://civitai.com/user/quantfunc">Civitai</a> | | |
| ๐ฎ <a href="https://discord.gg/jCp9TpFWcn">Discord</a> | |
| </p> | |
| # Krea-2-QuantFunc-4bit | |
| **4x compression, quality held.** | |
| QuantFunc INT4 compresses Krea-2-Turbo to about a quarter of its 16-bit size. In our visual comparisons, composition, detail, color and style stay close to the 16-bit baseline, roughly on par with FP8 and INT8 ConvRot. | |
| ## Showcase | |
| All images below were generated by Krea-2-QuantFunc-4bit. | |
| | Portrait photography | Sci-fi scene | | |
| |---|---| | |
| |  |  | | |
| | **Impasto art** | **Watercolor illustration** | | |
| |  |  | | |
| ## Fast denoising, fast end-to-end too | |
| ### High-VRAM | |
| On an RTX 4090, same workflow and generation settings: | |
| | Stage | QuantFunc INT4 | FP8 | Speedup | | |
| |---|---:|---:|---:| | |
| | Denoising | **1.6s** | 5.0s | **3.13x** | | |
| | End-to-end | **2.5s** | 6.5s | **2.6x** | | |
| > End-to-end includes text encoder, denoising and VAE. Text encoder and VAE are not part of the QuantFunc plugin's acceleration path today. Actual speed varies with resolution, steps, driver, software version and hardware. | |
| ### Low-VRAM | |
| On 8 GB / 12 GB and similar VRAM-constrained setups, 4-bit weights cut weight-bandwidth demand significantly, adding extra speedup โ up to roughly **11x**. Actual gains depend on VRAM capacity/bandwidth, offload behavior and generation settings. | |
| ## Swap one loader, keep your workflow | |
| 1. Install or update [ComfyUI-QuantFunc](https://github.com/QuantFunc/ComfyUI-QuantFunc). | |
| 2. Download the r128 or r32 weights. | |
| 3. Swap your model loader for the QuantFunc loader and pick the matching weight file. | |
| Every other node, connection and generation parameter stays as-is. | |
| Krea-2-Turbo is a distilled turbo model โ use fewer sampling steps and turn CFG off (guidance 1.0). | |
| ## RTX 20-series through GB300, one build covers it all | |
| Runs on every NVIDIA **SM75+** GPU: RTX 20/30/40/50-series, A100, H100, H200, B100, B200, GB300. | |
| ## Choose a model | |
| | Variant | File | Size | Use case | | |
| |---|---|---:|---| | |
| | **r128** | `krea2-turbo-quantfunc-int4-r128.safetensors` | ~8.3 GB | Quality-first, recommended | | |
| | **r32** | `krea2-turbo-quantfunc-int4-r32.safetensors` | ~7.8 GB | Size/VRAM-first | | |
| ## Loading | |
| Weights use QuantFunc's own safetensors format โ load with **ComfyUI-QuantFunc** or the **QuantFunc inference engine**, not as a drop-in Diffusers checkpoint. (This repo declares `library_name: diffusers` purely so Hugging Face counts real downloads of the flat `.safetensors` files above โ see [HF's download-stats docs](https://huggingface.co/docs/hub/models-download-stats) โ not because the files load via the `diffusers` package.) | |
| ## Source & license | |
| This repository distributes derived quantized weights produced from: | |
| - Base model: [krea/Krea-2-Turbo](https://huggingface.co/krea/Krea-2-Turbo) | |
| - Pretrained base: [krea/Krea-2-Raw](https://huggingface.co/krea/Krea-2-Raw) | |
| Weights follow the **Krea 2 Community License** โ please read the original model's license terms before use. | |
| ## Community | |
| - ๐ [QuantFunc website](https://www.quantfunc.com/) | |
| - ๐ [ComfyUI-QuantFunc on GitHub](https://github.com/QuantFunc/ComfyUI-QuantFunc) | |
| - ๐ฎ [Discord](https://discord.gg/jCp9TpFWcn) | |