Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
base_model: "stabilityai/stable-diffusion-3.5-large"
|
4 |
+
tags:
|
5 |
+
- sd3
|
6 |
+
- sd3-diffusers
|
7 |
+
- text-to-image
|
8 |
+
- diffusers
|
9 |
+
- simpletuner
|
10 |
+
- safe-for-work
|
11 |
+
- lora
|
12 |
+
- template:sd-lora
|
13 |
+
- standard
|
14 |
+
inference: true
|
15 |
+
widget:
|
16 |
+
- text: 'unconditional (blank prompt)'
|
17 |
+
parameters:
|
18 |
+
negative_prompt: 'blurry, cropped, ugly'
|
19 |
+
output:
|
20 |
+
url: ./assets/image_0_0.png
|
21 |
+
- text: 'sweatshirt painted in the alebrijeros style'
|
22 |
+
parameters:
|
23 |
+
negative_prompt: 'blurry, cropped, ugly'
|
24 |
+
output:
|
25 |
+
url: ./assets/image_1_0.png
|
26 |
+
---
|
27 |
+
|
28 |
+
# sd3-lora-alebrijeros-final
|
29 |
+
|
30 |
+
This is a standard PEFT LoRA derived from [stabilityai/stable-diffusion-3.5-large](https://huggingface.co/stabilityai/stable-diffusion-3.5-large).
|
31 |
+
|
32 |
+
|
33 |
+
The main validation prompt used during training was:
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
```
|
38 |
+
sweatshirt painted in the alebrijeros style
|
39 |
+
```
|
40 |
+
|
41 |
+
## Validation settings
|
42 |
+
- CFG: `5.0`
|
43 |
+
- CFG Rescale: `0.0`
|
44 |
+
- Steps: `20`
|
45 |
+
- Sampler: `None`
|
46 |
+
- Seed: `42`
|
47 |
+
- Resolution: `512x512`
|
48 |
+
|
49 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
50 |
+
|
51 |
+
You can find some example images in the following gallery:
|
52 |
+
|
53 |
+
|
54 |
+
<Gallery />
|
55 |
+
|
56 |
+
The text encoder **was not** trained.
|
57 |
+
You may reuse the base model text encoder for inference.
|
58 |
+
|
59 |
+
|
60 |
+
## Training settings
|
61 |
+
|
62 |
+
- Training epochs: 0
|
63 |
+
- Training steps: 130
|
64 |
+
- Learning rate: 5e-05
|
65 |
+
- Max grad norm: 0.01
|
66 |
+
- Effective batch size: 1
|
67 |
+
- Micro-batch size: 1
|
68 |
+
- Gradient accumulation steps: 1
|
69 |
+
- Number of GPUs: 1
|
70 |
+
- Prediction type: flow-matching
|
71 |
+
- Rescaled betas zero SNR: False
|
72 |
+
- Optimizer: adamw_bf16
|
73 |
+
- Precision: Pure BF16
|
74 |
+
- Quantised: Yes: int8-quanto
|
75 |
+
- Xformers: Not used
|
76 |
+
- LoRA Rank: 64
|
77 |
+
- LoRA Alpha: None
|
78 |
+
- LoRA Dropout: 0.1
|
79 |
+
- LoRA initialisation style: default
|
80 |
+
|
81 |
+
|
82 |
+
## Datasets
|
83 |
+
|
84 |
+
### alebrijeros-dataset-final-512
|
85 |
+
- Repeats: 5
|
86 |
+
- Total number of images: 25
|
87 |
+
- Total number of aspect buckets: 1
|
88 |
+
- Resolution: 0.262144 megapixels
|
89 |
+
- Cropped: False
|
90 |
+
- Crop style: None
|
91 |
+
- Crop aspect: None
|
92 |
+
- Used for regularisation data: No
|
93 |
+
### alebrijeros-dataset-final-1024
|
94 |
+
- Repeats: 5
|
95 |
+
- Total number of images: 25
|
96 |
+
- Total number of aspect buckets: 1
|
97 |
+
- Resolution: 1.048576 megapixels
|
98 |
+
- Cropped: False
|
99 |
+
- Crop style: None
|
100 |
+
- Crop aspect: None
|
101 |
+
- Used for regularisation data: No
|
102 |
+
### alebrijeros-dataset-final-512-crop
|
103 |
+
- Repeats: 5
|
104 |
+
- Total number of images: 25
|
105 |
+
- Total number of aspect buckets: 1
|
106 |
+
- Resolution: 0.262144 megapixels
|
107 |
+
- Cropped: True
|
108 |
+
- Crop style: random
|
109 |
+
- Crop aspect: square
|
110 |
+
- Used for regularisation data: No
|
111 |
+
### alebrijeros-dataset-final-1024-crop
|
112 |
+
- Repeats: 5
|
113 |
+
- Total number of images: 25
|
114 |
+
- Total number of aspect buckets: 1
|
115 |
+
- Resolution: 1.048576 megapixels
|
116 |
+
- Cropped: True
|
117 |
+
- Crop style: random
|
118 |
+
- Crop aspect: square
|
119 |
+
- Used for regularisation data: No
|
120 |
+
|
121 |
+
|
122 |
+
## Inference
|
123 |
+
|
124 |
+
|
125 |
+
```python
|
126 |
+
import torch
|
127 |
+
from diffusers import DiffusionPipeline
|
128 |
+
|
129 |
+
model_id = 'stabilityai/stable-diffusion-3.5-large'
|
130 |
+
adapter_id = 'CarlosRiverMe/sd3-lora-alebrijeros-final'
|
131 |
+
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
132 |
+
pipeline.load_lora_weights(adapter_id)
|
133 |
+
|
134 |
+
prompt = "sweatshirt painted in the alebrijeros style"
|
135 |
+
negative_prompt = 'blurry, cropped, ugly'
|
136 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
137 |
+
image = pipeline(
|
138 |
+
prompt=prompt,
|
139 |
+
negative_prompt=negative_prompt,
|
140 |
+
num_inference_steps=20,
|
141 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
142 |
+
width=512,
|
143 |
+
height=512,
|
144 |
+
guidance_scale=5.0,
|
145 |
+
).images[0]
|
146 |
+
image.save("output.png", format="PNG")
|
147 |
+
```
|
148 |
+
|