Instructions to use Kwai-Kolors/Kolors-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Kwai-Kolors/Kolors-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Kwai-Kolors/Kolors-diffusers", 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
[DOC ISSUE] Kolors is still not in the official diffusers package
Thanks for attention. It is now merged into diffusers.
问题仍然存在,已经下载了完整的diffusers库,from diffusers import KolorsPipeline提示KolorsPipeline包不存在
问题仍然存在,已经下载了完整的diffusers库,from diffusers import KolorsPipeline提示KolorsPipeline包不存在
pip install git+https://github.com/huggingface/diffusers.git
你可以用这指令从GitHub安装 ,但是目前diffusers运行需要超过16gb显存
Not in stock 🤗 diffusers: The official diffusers library does not include KolorsPipeline or KolorsImg2ImgPipeline. If you just pip install diffusers, you won’t be able to import them.
Yes, if you install the Kolors repo: The Kolors team extended diffusers with their own custom pipeline classes. When you clone and install their GitHub repo (pip install -e ./Kolors), it registers those classes so that:
python
from diffusers import KolorsPipeline
will actually work — because their repo patches diffusers’s init.py to expose the custom pipeline.

