Instructions to use ostris/krea2_turbo_training_adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ostris/krea2_turbo_training_adapter with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("krea/Krea-2-Turbo", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("ostris/krea2_turbo_training_adapter") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Training a Krea 2 Turbo adapter for a fine-tuned checkpoint
Hi! First of all, thank you for your work on the Krea 2 training adapter. It works well with the original Krea 2 Turbo model.
Unfortunately, I found that it is much less compatible with a separately fine-tuned Krea 2 Turbo checkpoint I use, so I'd like to try training a similar adapter specifically for that checkpoint.
Could you please share some details about how you created the original adapter? In particular, I'd be very interested in the dataset generation procedure: what kinds of prompts/captions you used, roughly how many generated images, preferred resolutions/aspect ratios, and whether you used the generation prompts themselves as training captions.
Any additional training details such as LoRA rank/alpha, number of steps, optimizer, or anything else you found important would also be very helpful.
I understand this is somewhat experimental, so even a rough description of your procedure would be greatly appreciated. Thanks!
The basic process is to generate about 1,000 images with various aspect ratios and prompts with the target model. Then you train a LoRA on those images with a low learning rate. I do 1e-5. As you train it, the samples will begin to degrade as distillation breaks down. This is the goal. You just need to train it until the samples stop degrading farther. The important thing is to not inject new data, so only train on images generated with the target model. The entire training takes about a day on a 5090.
Do i need any specific prompt writing rules? I mean style, scene, camera settings etc, or i just need to make it more [different] to not getting stuck undistillation be sensitive about specific visual clusters?
The more diverse the better. I usually use an existing captioned dataset and just pull the prompts from it randomly.