File size: 3,409 Bytes
6725ff7 0c03cc1 6725ff7 a3d3e10 6725ff7 a3d3e10 6725ff7 65061cf a3d3e10 6725ff7 65061cf 6725ff7 a3d3e10 6725ff7 a3d3e10 6725ff7 a3d3e10 6725ff7 a3d3e10 6725ff7 a3d3e10 6725ff7 a3d3e10 6725ff7 a3d3e10 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
---
base_model: stabilityai/stable-diffusion-3-medium-diffusers
library_name: diffusers
license: openrail++
tags:
- text-to-image
- diffusers-training
- diffusers
- lora
- sd3
- sd3-diffusers
- template:sd-lora
instance_prompt: A photo of T0K cube
widget:
- text: A photo of T0K cube on a shelf
output:
url: image_3.png
datasets:
- AdamLucek/cube-pics-dreambooth
---
# SD3 DreamBooth LoRA - AdamLucek/sd3-cube-dreambooth-lora-cube
**Reference Image**
<img src="https://cdn-uploads.huggingface.co/production/uploads/65ba68a15d2ef0a4b2c892b4/Fx9Py6PeZL6Jaj4yKk8dl.jpeg" width=400>
**Generated Images**
<img src="https://cdn-uploads.huggingface.co/production/uploads/65ba68a15d2ef0a4b2c892b4/UYl02nsBCddvQSB5-egxC.jpeg" width=400>
## Model description
These are DreamBooth LoRA weights for [stabilityai/stable-diffusion-3-medium-diffusers](https://huggingface.co/stabilityai/stable-diffusion-3-medium).
## Trigger words
You should use `A photo of T0K cube` to trigger the image generation.
## Download model
[Download the pytorch_lora_weights.safetensors LoRA](AdamLucek/sd3-cube-dreambooth-lora-cube/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('stabilityai/stable-diffusion-3-medium-diffusers', torch_dtype=torch.float16).to('cuda')
pipeline.load_lora_weights('AdamLucek/sd3-cube-dreambooth-lora-2', weight_name='pytorch_lora_weights.safetensors')
image = pipeline('A photo of T0K cube on a shelf').images[0]
```
### Use it with UIs such as AUTOMATIC1111, Comfy UI, SD.Next, Invoke
- **LoRA**: download **[`diffusers_lora_weights.safetensors` here 💾](/AdamLucek/sd3-cube-dreambooth-lora-cube/blob/main/diffusers_lora_weights.safetensors)**.
- Rename it and place it on your `models/Lora` folder.
- On AUTOMATIC1111, load the LoRA by adding `<lora:your_new_name:1>` to your prompt. On ComfyUI just [load it as a regular LoRA](https://comfyanonymous.github.io/ComfyUI_examples/lora/).
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/stabilityai/stable-diffusion-3-medium/blob/main/LICENSE).
## Training details
The weights were trained using [DreamBooth](https://dreambooth.github.io/) with the [SD3 diffusers trainer](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/README_sd3.md).
Script
```
accelerate launch train_dreambooth_lora_sd3.py \
--pretrained_model_name_or_path="stabilityai/stable-diffusion-3-medium-diffusers" \
--output_dir="lora-trained-sd3-t3" \
--dataset_name="AdamLucek/cube-pics-dreambooth" \
--mixed_precision="fp16" \
--instance_prompt="A photo of T0K cube" \
--resolution=1024 \
--train_batch_size=16 \
--learning_rate=1e-4 \
--report_to="wandb" \
--lr_scheduler="constant" \
--lr_warmup_steps=0 \
--max_train_steps=1000 \
--validation_prompt="A photo of T0K cube on a shelf" \
--validation_epochs=500 \
--seed="420" \
--rank=16 \
--hub_model_id="sd3-cube-dreambooth-lora-2" \
--train_text_encoder \
--push_to_hub
```
Trained on a single H100 |