Instructions to use OzzyGT/krea2_reference_blocks with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OzzyGT/krea2_reference_blocks with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OzzyGT/krea2_reference_blocks", 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
fix edit provenance
Browse files- README.md +4 -2
- krea2_reference.py +1 -1
README.md
CHANGED
|
@@ -111,5 +111,7 @@ These blocks only work with Krea 2, Turbo or raw.
|
|
| 111 |
style-reference LoRA behind `append`
|
| 112 |
- [`conradlocke/krea2-identity-edit`](https://huggingface.co/conradlocke/krea2-identity-edit) -- the
|
| 113 |
Identity-Edit LoRA behind `prepend`
|
| 114 |
-
-
|
| 115 |
-
|
|
|
|
|
|
|
|
|
| 111 |
style-reference LoRA behind `append`
|
| 112 |
- [`conradlocke/krea2-identity-edit`](https://huggingface.co/conradlocke/krea2-identity-edit) -- the
|
| 113 |
Identity-Edit LoRA behind `prepend`
|
| 114 |
+
- `append` follows the built-in Krea 2 edit arch in [ai-toolkit](https://github.com/ostris/ai-toolkit);
|
| 115 |
+
`prepend` follows `predict_velocity_edit` in
|
| 116 |
+
[krea2edit-trainer](https://github.com/lbouaraba/krea2edit-trainer), the third-party ai-toolkit extension
|
| 117 |
+
by Conrad Locke the Identity-Edit LoRA was trained with
|
krea2_reference.py
CHANGED
|
@@ -22,7 +22,7 @@ latents* inside the transformer sequence. All three paths live here, selected by
|
|
| 22 |
time `t=0`. The Ostris AI-Toolkit reference/edit LoRA recipe.
|
| 23 |
* `"prepend"` -- vision (grounded view) + the clean VAE source **before** the noisy target under the plain
|
| 24 |
uniform timestep modulation, distinguished only by its RoPE frame axis. The Identity-Edit recipe
|
| 25 |
-
(
|
| 26 |
|
| 27 |
With `reference_mode="off"` and no images the blocks reduce to stock text-to-image. No mode patches the
|
| 28 |
`Krea2Transformer2DModel` source.
|
|
|
|
| 22 |
time `t=0`. The Ostris AI-Toolkit reference/edit LoRA recipe.
|
| 23 |
* `"prepend"` -- vision (grounded view) + the clean VAE source **before** the noisy target under the plain
|
| 24 |
uniform timestep modulation, distinguished only by its RoPE frame axis. The Identity-Edit recipe
|
| 25 |
+
(krea2edit-trainer's `predict_velocity_edit`); its unconditional branch is grounded on the same image.
|
| 26 |
|
| 27 |
With `reference_mode="off"` and no images the blocks reduce to stock text-to-image. No mode patches the
|
| 28 |
`Krea2Transformer2DModel` source.
|