Instructions to use pmczip/Krea2Raw_Loras with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use pmczip/Krea2Raw_Loras 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-Raw", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("pmczip/Krea2Raw_Loras") prompt = "a high-resolution side-view photograph featuring 4j133 with long, wavy dark brown hair, styled in loose waves, she has a pleasant, inviting smile and striking brown eyes, she is wearing a black strapless bandeau top, and a pair of light blue jeans that are pulled down to her waist, revealing her midriff, her outfit is accessorized with large gold hoop earrings and a black belt with a silver buckle, adding a touch of sophistication, the background is a solid, bright pink, which contrasts nicely with her dark hair and outfit, making her the focal point of the image, the lighting is soft and even, highlighting her smooth skin, the overall mood of casual and relaxed, with a focus on the subject's confident demeanor" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Training config
Hi! Thanks for sharing your work. Any chance you could also share your training settings? What res do you train on btw? I did some 512 res runs but the quality is not as crisp compared to your results.
I just used the ai-toolkit config from https://www.reddit.com/r/StableDiffusion/comments/1ueacq2/krea_2_character_lora_training_for_16_gb_vram/
I leave it at 512 and make my own trigger word. I do a lot of images as compared to others but it's not low-quality images. Also, I get many headshots not just full body and medium shots which I use many as well, a good mixture of all 3 types seems to work well.
Since I have an RTX 5070 Ti, I'd ask you how much computation time it takes to train a LoRA character with these parameters. You obviously have more CUDA cores and tensor cores than me, and I'll have to take that into account.
I have an RTX 5060 Ti (16 GB), and it takes 2.5 to 3 hours for my system to train a Krea2 LoRA.
Thanks for the info. Since this was my first training session, I asked Gemini to convert the data you shared on Reddit into a YAML file for the AI ToolKit inside Stability Matrix. I must say your settings were truly advanced, especially four of those parameters that proved crucial for avoiding offloading. I worked consistently with 15.1 GB of VRAM and completed 1,500 steps in about 45 minutes.
Thanks for the info. Since this was my first training session, I asked Gemini to convert the data you shared on Reddit into a YAML file for the AI ToolKit inside Stability Matrix. I must say your settings were truly advanced, especially four of those parameters that proved crucial for avoiding offloading. I worked consistently with 15.1 GB of VRAM and completed 1,500 steps in about 45 minutes.
share the config you used, please
Thanks for the info. Since this was my first training session, I asked Gemini to convert the data you shared on Reddit into a YAML file for the AI ToolKit inside Stability Matrix. I must say your settings were truly advanced, especially four of those parameters that proved crucial for avoiding offloading. I worked consistently with 15.1 GB of VRAM and completed 1,500 steps in about 45 minutes.
How much RAM do you have? Same config OOMs on my setup, but I'm RAM limited with 16GB.
I just used the ai-toolkit config from https://www.reddit.com/r/StableDiffusion/comments/1ueacq2/krea_2_character_lora_training_for_16_gb_vram/
I leave it at 512 and make my own trigger word. I do a lot of images as compared to others but it's not low-quality images. Also, I get many headshots not just full body and medium shots which I use many as well, a good mixture of all 3 types seems to work well.
Thanks for sharing! Have you noticed a weird quirk of krea regarding relative eye distances? The eye closer to the camera tends to drift further away from the nose in 3/4 shots throwing off the likeness, no matter how large and varied the dataset is. I haven't found a fix for that so far.
Thanks for the info. Since this was my first training session, I asked Gemini to convert the data you shared on Reddit into a YAML file for the AI ToolKit inside Stability Matrix. I must say your settings were truly advanced, especially four of those parameters that proved crucial for avoiding offloading. I worked consistently with 15.1 GB of VRAM and completed 1,500 steps in about 45 minutes.
How much RAM do you have? Same config OOMs on my setup, but I'm RAM limited with 16GB.
64 GB, DDR4, 4000 MHz. Of course, I had Gemini convert the parameters used by pmczip, but it took me a while to get everything working. A One trainer on Stability Matrix doesn't work, and I don't know why. I didn't want to install Python at the OS level, and Stability Matrix is completely standalone. AIToolKit works fine, as long as you have a good yaml file. In my case, I can't even train at 768 or 1024p. I offload it because the RAW model and text encoder are too heavy, but the result is very good as long as you use close-ups or half-length shots and avoid full-body photos because the face would take up too small a portion of the photo at 512p. If you'd like (and if pmczip allows it, since this is its own space), I can share the yaml codes and optimization commands I added to run_windows.bat. But with 16 GB of RAM, you'll have to find a way to do it, because everything I configured in the two files is specific to my hardware configuration.