davidrd123
commited on
Commit
•
4e43d58
1
Parent(s):
ca27f49
Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: creativeml-openrail-m
|
3 |
+
base_model: "stabilityai/stable-diffusion-xl-base-1.0"
|
4 |
+
tags:
|
5 |
+
- sdxl
|
6 |
+
- sdxl-diffusers
|
7 |
+
- text-to-image
|
8 |
+
- diffusers
|
9 |
+
- simpletuner
|
10 |
+
- not-for-all-audiences
|
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: 'your prompt to validate on'
|
22 |
+
parameters:
|
23 |
+
negative_prompt: 'blurry, cropped, ugly'
|
24 |
+
output:
|
25 |
+
url: ./assets/image_1_0.png
|
26 |
+
- text: 'another prompt to validate on'
|
27 |
+
parameters:
|
28 |
+
negative_prompt: 'blurry, cropped, ugly'
|
29 |
+
output:
|
30 |
+
url: ./assets/image_2_0.png
|
31 |
+
- text: 'ggn_style, A nude woman sits on a patterned cloth with crossed legs. She holds a small object in her hand. A low table with fruit is in front of her. Pink flowers are in the background, with mountains and palm trees beyond. Text is in the bottom left corner.'
|
32 |
+
parameters:
|
33 |
+
negative_prompt: 'blurry, cropped, ugly'
|
34 |
+
output:
|
35 |
+
url: ./assets/image_3_0.png
|
36 |
+
---
|
37 |
+
|
38 |
+
# paul-gaugin-sdxl-lora-03
|
39 |
+
|
40 |
+
This is a LyCORIS adapter derived from [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).
|
41 |
+
|
42 |
+
|
43 |
+
The main validation prompt used during training was:
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
```
|
48 |
+
ggn_style, A nude woman sits on a patterned cloth with crossed legs. She holds a small object in her hand. A low table with fruit is in front of her. Pink flowers are in the background, with mountains and palm trees beyond. Text is in the bottom left corner.
|
49 |
+
```
|
50 |
+
|
51 |
+
## Validation settings
|
52 |
+
- CFG: `4.2`
|
53 |
+
- CFG Rescale: `0.0`
|
54 |
+
- Steps: `20`
|
55 |
+
- Sampler: `None`
|
56 |
+
- Seed: `42`
|
57 |
+
- Resolution: `1024x1024`
|
58 |
+
|
59 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
60 |
+
|
61 |
+
You can find some example images in the following gallery:
|
62 |
+
|
63 |
+
|
64 |
+
<Gallery />
|
65 |
+
|
66 |
+
The text encoder **was not** trained.
|
67 |
+
You may reuse the base model text encoder for inference.
|
68 |
+
|
69 |
+
|
70 |
+
## Training settings
|
71 |
+
|
72 |
+
- Training epochs: 0
|
73 |
+
- Training steps: 100
|
74 |
+
- Learning rate: 5e-05
|
75 |
+
- Effective batch size: 4
|
76 |
+
- Micro-batch size: 4
|
77 |
+
- Gradient accumulation steps: 1
|
78 |
+
- Number of GPUs: 1
|
79 |
+
- Prediction type: epsilon
|
80 |
+
- Rescaled betas zero SNR: False
|
81 |
+
- Optimizer: optimi-lionweight_decay=1e-3
|
82 |
+
- Precision: Pure BF16
|
83 |
+
- Quantised: Yes: int8-quanto
|
84 |
+
- Xformers: Not used
|
85 |
+
- LyCORIS Config:
|
86 |
+
```json
|
87 |
+
{
|
88 |
+
"algo": "lokr",
|
89 |
+
"multiplier": 1.0,
|
90 |
+
"linear_dim": 10000,
|
91 |
+
"linear_alpha": 1,
|
92 |
+
"factor": 16,
|
93 |
+
"apply_preset": {
|
94 |
+
"target_module": [
|
95 |
+
"Attention",
|
96 |
+
"FeedForward"
|
97 |
+
],
|
98 |
+
"module_algo_map": {
|
99 |
+
"Attention": {
|
100 |
+
"factor": 16
|
101 |
+
},
|
102 |
+
"FeedForward": {
|
103 |
+
"factor": 8
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
}
|
108 |
+
```
|
109 |
+
|
110 |
+
## Datasets
|
111 |
+
|
112 |
+
### paul-gaugin-sdxl-512
|
113 |
+
- Repeats: 10
|
114 |
+
- Total number of images: 85
|
115 |
+
- Total number of aspect buckets: 8
|
116 |
+
- Resolution: 0.262144 megapixels
|
117 |
+
- Cropped: False
|
118 |
+
- Crop style: None
|
119 |
+
- Crop aspect: None
|
120 |
+
### paul-gaugin-sdxl-1024
|
121 |
+
- Repeats: 10
|
122 |
+
- Total number of images: 85
|
123 |
+
- Total number of aspect buckets: 4
|
124 |
+
- Resolution: 1.048576 megapixels
|
125 |
+
- Cropped: False
|
126 |
+
- Crop style: None
|
127 |
+
- Crop aspect: None
|
128 |
+
### paul-gaugin-sdxl-512-crop
|
129 |
+
- Repeats: 10
|
130 |
+
- Total number of images: 85
|
131 |
+
- Total number of aspect buckets: 1
|
132 |
+
- Resolution: 0.262144 megapixels
|
133 |
+
- Cropped: True
|
134 |
+
- Crop style: random
|
135 |
+
- Crop aspect: square
|
136 |
+
### paul-gaugin-sdxl-1024-crop
|
137 |
+
- Repeats: 10
|
138 |
+
- Total number of images: 85
|
139 |
+
- Total number of aspect buckets: 1
|
140 |
+
- Resolution: 1.048576 megapixels
|
141 |
+
- Cropped: True
|
142 |
+
- Crop style: random
|
143 |
+
- Crop aspect: square
|
144 |
+
|
145 |
+
|
146 |
+
## Inference
|
147 |
+
|
148 |
+
|
149 |
+
```python
|
150 |
+
import torch
|
151 |
+
from diffusers import DiffusionPipeline
|
152 |
+
from lycoris import create_lycoris_from_weights
|
153 |
+
|
154 |
+
model_id = 'stabilityai/stable-diffusion-xl-base-1.0'
|
155 |
+
adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
|
156 |
+
lora_scale = 1.0
|
157 |
+
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
|
158 |
+
wrapper.merge_to()
|
159 |
+
|
160 |
+
prompt = "ggn_style, A nude woman sits on a patterned cloth with crossed legs. She holds a small object in her hand. A low table with fruit is in front of her. Pink flowers are in the background, with mountains and palm trees beyond. Text is in the bottom left corner."
|
161 |
+
negative_prompt = 'blurry, cropped, ugly'
|
162 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
163 |
+
image = pipeline(
|
164 |
+
prompt=prompt,
|
165 |
+
negative_prompt=negative_prompt,
|
166 |
+
num_inference_steps=20,
|
167 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
168 |
+
width=1024,
|
169 |
+
height=1024,
|
170 |
+
guidance_scale=4.2,
|
171 |
+
guidance_rescale=0.0,
|
172 |
+
).images[0]
|
173 |
+
image.save("output.png", format="PNG")
|
174 |
+
```
|
175 |
+
|