Instructions to use ethanfel/Krea-2-Base-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ethanfel/Krea-2-Base-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("ethanfel/Krea-2-Base-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
- Local Apps Settings
- Draw Things
- DiffusionBee
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: krea-2-community
|
| 4 |
+
license_link: https://www.krea.ai/krea-2-licensing
|
| 5 |
+
pipeline_tag: text-to-image
|
| 6 |
+
library_name: diffusers
|
| 7 |
+
base_model: krea/Krea-2-Raw
|
| 8 |
+
base_model_relation: finetune
|
| 9 |
+
tags:
|
| 10 |
+
- text-to-image
|
| 11 |
+
- flow-matching
|
| 12 |
+
- krea
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Krea 2 Base — Diffusers (working conversion)
|
| 16 |
+
|
| 17 |
+
A **diffusers-loadable** conversion of the Krea 2 **Base/RAW** checkpoint that loads cleanly with
|
| 18 |
+
`diffusers.Krea2Transformer2DModel` / `Krea2Pipeline` (transformer keys renamed to the diffusers
|
| 19 |
+
layout, per-block modulation table reshaped, and the two final-layer `up`/`down` weights dropped to
|
| 20 |
+
match the diffusers Krea2 port). The `vae`, `text_encoder`, `tokenizer` and `scheduler` are the
|
| 21 |
+
standard diffusers components.
|
| 22 |
+
|
| 23 |
+
Intended for **fine-tuning / LoRA training** (train on Base/RAW, run inference on Krea 2 Turbo).
|
| 24 |
+
|
| 25 |
+
```python
|
| 26 |
+
import torch
|
| 27 |
+
from diffusers import Krea2Pipeline
|
| 28 |
+
pipe = Krea2Pipeline.from_pretrained("ethanfel/Krea-2-Base-Diffusers", torch_dtype=torch.bfloat16)
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
In ai-toolkit (krea2 branch), set `model.name_or_path: "ethanfel/Krea-2-Base-Diffusers"` and
|
| 32 |
+
`model.arch: "krea_2"`.
|
| 33 |
+
|
| 34 |
+
Converted with `scripts/convert_krea2_community_to_diffusers.py`. Weights are redistributed under the
|
| 35 |
+
[Krea 2 Community License](https://www.krea.ai/krea-2-licensing).
|