Drawing a stylised cartoon capybara.
This is from the End of training. You may download the any of the SD3 checkpoints from
https://huggingface.co/alastandy/capybara2_sd3_dev_lora/tree/main
Flux.1 D were not uploaded to huggingface but if you want an earlier checkpoint let me know.
Note the images with backgrounds combine this LORA Capybara with my Vector Art stylized background https://civarchive.com/models/801332.
They are combined with weight 100%, 100% [1.0,1.0] for first one and are combined with weight 100%, 60% [1.0,0.6] on the other. (No other special work was needed due to how the Capybara LORA was trained)
There seems to be no way to actually just edit and add the resource via the website, so I gave up on trying to do that.
Trigger words
When using the Flux.1 D Version the trigger word is: Drawcapybara
When using the SD3 Version you should use a drawing of a capybaracartoon to trigger the image generation.
This model is intended to either be combined with other LORA models, or to render a stylized Capybara on a white background, or for use in more complex render setups.
Description
base_model: black-forest-labs/FLUX.2-klein-base-4B
library_name: diffusers
license: other
instance_prompt: a drawing of Drawcapybara capybara
widget: []
tags:
- text-to-image
- diffusers-training
- diffusers
- lora
- flux2-klein
- flux2-klein-diffusers
- template:sd-lora
# Flux.2 [Klein] DreamBooth LoRA - capybara3
<Gallery />
## Model description
These are capybara3 DreamBooth LoRA weights for black-forest-labs/FLUX.2-klein-base-4B.
The weights were trained using [DreamBooth](https://dreambooth.github.io/) with the [Flux2 diffusers trainer](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/README_flux2.md).
Quant training? None
## Trigger words
You should use a drawing of Drawcapybara capybara to trigger the image generation.
## Download model
[Download the *.safetensors LoRA](capybara3/tree/main) in the Files & versions tab.
## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
```py
from diffusers import AutoPipelineForText2Image
import torch
pipeline = AutoPipelineForText2Image.from_pretrained("black-forest-labs/FLUX.2", torch_dtype=torch.bfloat16).to('cuda')
pipeline.load_lora_weights('capybara3', weight_name='pytorch_lora_weights.safetensors')
image = pipeline('a drawing of Drawcapybara capybara').images[0]
```
For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters)
## License
Please adhere to the licensing terms as described [here](https://huggingface.co/black-forest-labs/FLUX.2/blob/main/LICENSE.md).
## Training details
Training command was:
TOKENIZERS_PARALLELISM=true accelerate launch diffusers/examples/dreambooth/train_dreambooth_lora_flux2_klein.py \
 --pretrained_model_name_or_path="black-forest-labs/FLUX.2-klein-base-4B" \
 --dataset_name=DATASET_NAME_OR_PATH
 --output_dir=OUTPUT_DIR
 --instance_prompt="a drawing of Drawcapybara capybara" \
 --optimizer="prodigy" \
 --gradient_checkpointing \
 --train_batch_size=1 \
 --sample_batch_size=1 \
 --cache_latents \
 --guidance_scale=1 \
 --learning_rate=1.0 \
 --gradient_accumulation_steps=1 \
 --num_train_epochs=500 \
 --lr_warmup_steps=0 \
 --lr_scheduler="constant" \
 --caption_column="prompt" \
 --rank=32 \
 --lora_alpha=32 \
 --checkpointing_steps=1000 \
 --report_to="tensorboard" \
 --resolution=DATASET_RENDERED_RESOLUTION