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diffusion-xl-base-1.0"
|
4 |
+
tags:
|
5 |
+
- sdxl
|
6 |
+
- sdxl-diffusers
|
7 |
+
- text-to-image
|
8 |
+
- diffusers
|
9 |
+
- simpletuner
|
10 |
+
- safe-for-work
|
11 |
+
- lora
|
12 |
+
- template:sd-lora
|
13 |
+
- lycoris
|
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: 'brst_style painting of a hipster making a chair'
|
22 |
+
parameters:
|
23 |
+
negative_prompt: 'blurry, cropped, ugly'
|
24 |
+
output:
|
25 |
+
url: ./assets/image_1_0.png
|
26 |
+
- text: 'brst_style painting of a hamster'
|
27 |
+
parameters:
|
28 |
+
negative_prompt: 'blurry, cropped, ugly'
|
29 |
+
output:
|
30 |
+
url: ./assets/image_2_0.png
|
31 |
+
- text: 'brst_style, A winding dirt road leads through a grassy area with rocks and flowers. Two people rest beside the road, one horse nearby. Tall trees frame the road, opening to a vast landscape with green fields, a lake, and towering mountains in the background. A small village with a church is visible by the lake.'
|
32 |
+
parameters:
|
33 |
+
negative_prompt: 'blurry, cropped, ugly'
|
34 |
+
output:
|
35 |
+
url: ./assets/image_3_0.png
|
36 |
+
- text: 'brst_style, A large waterfall cascades down a cliff. Trees surround the scene with some positioned on top of the cliff and others at the base. Rocks and a stream occupy the foreground. A mountain range appears in the background.'
|
37 |
+
parameters:
|
38 |
+
negative_prompt: 'blurry, cropped, ugly'
|
39 |
+
output:
|
40 |
+
url: ./assets/image_4_0.png
|
41 |
+
- text: 'brst_style, A seated woman with long dark hair is depicted in a front-facing view. She is wearing a dress with a white collar and appears to be in her thirties. Her hands are on her lap. Green leaves and flowers surround her.'
|
42 |
+
parameters:
|
43 |
+
negative_prompt: 'blurry, cropped, ugly'
|
44 |
+
output:
|
45 |
+
url: ./assets/image_5_0.png
|
46 |
+
- text: 'brst_style, Two mountain robots stand on rocky outcrops. with skyscrapers scattered across the land. One robot is on a higher rock, looking slightly left, while the other is on a lower rock, facing right. Snow-capped mountains and green valleys stretch into the distance. '
|
47 |
+
parameters:
|
48 |
+
negative_prompt: 'blurry, cropped, ugly'
|
49 |
+
output:
|
50 |
+
url: ./assets/image_6_0.png
|
51 |
+
- text: 'brst_style, A panoramic view of Yosemite Valley with El Capitan and Half Dome visible. Lush forests in the foreground, a winding river, and dramatic clouds in the sky.'
|
52 |
+
parameters:
|
53 |
+
negative_prompt: 'blurry, cropped, ugly'
|
54 |
+
output:
|
55 |
+
url: ./assets/image_7_0.png
|
56 |
+
- text: 'brst_style, A futuristic space station orbiting Earth, with the planet''s curvature and some continents visible. The space station has solar panels and docking bays.'
|
57 |
+
parameters:
|
58 |
+
negative_prompt: 'blurry, cropped, ugly'
|
59 |
+
output:
|
60 |
+
url: ./assets/image_8_0.png
|
61 |
+
- text: 'brst_style, A busy urban street with tall buildings, cars, and pedestrians. A mix of modern and classical architecture, with trees lining the sidewalks.'
|
62 |
+
parameters:
|
63 |
+
negative_prompt: 'blurry, cropped, ugly'
|
64 |
+
output:
|
65 |
+
url: ./assets/image_9_0.png
|
66 |
+
- text: 'brst_style, A small oasis in a vast desert landscape. Palm trees surround a small pool of water, with sand dunes stretching to the horizon. A camel caravan approaches in the distance.'
|
67 |
+
parameters:
|
68 |
+
negative_prompt: 'blurry, cropped, ugly'
|
69 |
+
output:
|
70 |
+
url: ./assets/image_10_0.png
|
71 |
+
- text: 'brst_style, An underwater coral reef teeming with colorful fish, sea turtles, and various marine life. Sunlight filters through the water''s surface.'
|
72 |
+
parameters:
|
73 |
+
negative_prompt: 'blurry, cropped, ugly'
|
74 |
+
output:
|
75 |
+
url: ./assets/image_11_0.png
|
76 |
+
- text: 'brst_style, Albert Bierstadt taking a selfie with a smartphone in front of one of his landscape paintings. He''s wearing his 19th-century attire but holding a modern device.'
|
77 |
+
parameters:
|
78 |
+
negative_prompt: 'blurry, cropped, ugly'
|
79 |
+
output:
|
80 |
+
url: ./assets/image_12_0.png
|
81 |
+
- text: 'brst_style, A nighttime cityscape with skyscrapers illuminated against a starry sky. The moon is large and prominent, casting a glow over the urban landscape.'
|
82 |
+
parameters:
|
83 |
+
negative_prompt: 'blurry, cropped, ugly'
|
84 |
+
output:
|
85 |
+
url: ./assets/image_13_0.png
|
86 |
+
- text: 'brst_style, hamster'
|
87 |
+
parameters:
|
88 |
+
negative_prompt: 'blurry, cropped, ugly'
|
89 |
+
output:
|
90 |
+
url: ./assets/image_14_0.png
|
91 |
+
---
|
92 |
+
|
93 |
+
# albert-bierstadt-sdxl-lokr
|
94 |
+
|
95 |
+
This is a LyCORIS adapter derived from [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).
|
96 |
+
|
97 |
+
|
98 |
+
The main validation prompt used during training was:
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
+
```
|
103 |
+
brst_style, hamster
|
104 |
+
```
|
105 |
+
|
106 |
+
## Validation settings
|
107 |
+
- CFG: `4.2`
|
108 |
+
- CFG Rescale: `0.0`
|
109 |
+
- Steps: `20`
|
110 |
+
- Sampler: `None`
|
111 |
+
- Seed: `42`
|
112 |
+
- Resolution: `1024x1024`
|
113 |
+
|
114 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
115 |
+
|
116 |
+
You can find some example images in the following gallery:
|
117 |
+
|
118 |
+
|
119 |
+
<Gallery />
|
120 |
+
|
121 |
+
The text encoder **was not** trained.
|
122 |
+
You may reuse the base model text encoder for inference.
|
123 |
+
|
124 |
+
|
125 |
+
## Training settings
|
126 |
+
|
127 |
+
- Training epochs: 1
|
128 |
+
- Training steps: 500
|
129 |
+
- Learning rate: 0.0001
|
130 |
+
- Effective batch size: 16
|
131 |
+
- Micro-batch size: 8
|
132 |
+
- Gradient accumulation steps: 1
|
133 |
+
- Number of GPUs: 2
|
134 |
+
- Prediction type: epsilon
|
135 |
+
- Rescaled betas zero SNR: False
|
136 |
+
- Optimizer: adamw_bf16
|
137 |
+
- Precision: Pure BF16
|
138 |
+
- Quantised: No
|
139 |
+
- Xformers: Not used
|
140 |
+
- LyCORIS Config:
|
141 |
+
```json
|
142 |
+
{
|
143 |
+
"algo": "lokr",
|
144 |
+
"multiplier": 1.0,
|
145 |
+
"linear_dim": 10000,
|
146 |
+
"linear_alpha": 1,
|
147 |
+
"factor": 16,
|
148 |
+
"apply_preset": {
|
149 |
+
"target_module": [
|
150 |
+
"Attention",
|
151 |
+
"FeedForward"
|
152 |
+
],
|
153 |
+
"module_algo_map": {
|
154 |
+
"Attention": {
|
155 |
+
"factor": 16
|
156 |
+
},
|
157 |
+
"FeedForward": {
|
158 |
+
"factor": 8
|
159 |
+
}
|
160 |
+
}
|
161 |
+
}
|
162 |
+
}
|
163 |
+
```
|
164 |
+
|
165 |
+
## Datasets
|
166 |
+
|
167 |
+
### albert-bierstadt-sdxl-512
|
168 |
+
- Repeats: 10
|
169 |
+
- Total number of images: ~82
|
170 |
+
- Total number of aspect buckets: 6
|
171 |
+
- Resolution: 0.262144 megapixels
|
172 |
+
- Cropped: False
|
173 |
+
- Crop style: None
|
174 |
+
- Crop aspect: None
|
175 |
+
### albert-bierstadt-sdxl-1024
|
176 |
+
- Repeats: 10
|
177 |
+
- Total number of images: ~84
|
178 |
+
- Total number of aspect buckets: 12
|
179 |
+
- Resolution: 1.048576 megapixels
|
180 |
+
- Cropped: False
|
181 |
+
- Crop style: None
|
182 |
+
- Crop aspect: None
|
183 |
+
### albert-bierstadt-sdxl-512-crop
|
184 |
+
- Repeats: 10
|
185 |
+
- Total number of images: ~78
|
186 |
+
- Total number of aspect buckets: 1
|
187 |
+
- Resolution: 0.262144 megapixels
|
188 |
+
- Cropped: True
|
189 |
+
- Crop style: random
|
190 |
+
- Crop aspect: square
|
191 |
+
### albert-bierstadt-sdxl-1024-crop
|
192 |
+
- Repeats: 10
|
193 |
+
- Total number of images: ~78
|
194 |
+
- Total number of aspect buckets: 1
|
195 |
+
- Resolution: 1.048576 megapixels
|
196 |
+
- Cropped: True
|
197 |
+
- Crop style: random
|
198 |
+
- Crop aspect: square
|
199 |
+
|
200 |
+
|
201 |
+
## Inference
|
202 |
+
|
203 |
+
|
204 |
+
```python
|
205 |
+
import torch
|
206 |
+
from diffusers import DiffusionPipeline
|
207 |
+
from lycoris import create_lycoris_from_weights
|
208 |
+
|
209 |
+
model_id = 'stabilityai/stable-diffusion-xl-base-1.0'
|
210 |
+
adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
|
211 |
+
lora_scale = 1.0
|
212 |
+
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
|
213 |
+
wrapper.merge_to()
|
214 |
+
|
215 |
+
prompt = "brst_style, hamster"
|
216 |
+
negative_prompt = 'blurry, cropped, ugly'
|
217 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
218 |
+
image = pipeline(
|
219 |
+
prompt=prompt,
|
220 |
+
negative_prompt=negative_prompt,
|
221 |
+
num_inference_steps=20,
|
222 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
223 |
+
width=1024,
|
224 |
+
height=1024,
|
225 |
+
guidance_scale=4.2,
|
226 |
+
guidance_rescale=0.0,
|
227 |
+
).images[0]
|
228 |
+
image.save("output.png", format="PNG")
|
229 |
+
```
|
230 |
+
|