davidrd123
commited on
Commit
•
6978744
1
Parent(s):
8f5c2b9
Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
- 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: 'jss_style, A woman sits slouched on a sofa beneath a mantelpiece, wrapped in blankets. Her eyes are closed, and her head rests on the back.'
|
22 |
+
parameters:
|
23 |
+
negative_prompt: 'blurry, cropped, ugly'
|
24 |
+
output:
|
25 |
+
url: ./assets/image_1_0.png
|
26 |
+
- text: 'jss_style, A man wearing a lavish robe holds a large, decorated sword. A young boy stands behind him, holding a cushion with a crown. They are in an ornate hall.'
|
27 |
+
parameters:
|
28 |
+
negative_prompt: 'blurry, cropped, ugly'
|
29 |
+
output:
|
30 |
+
url: ./assets/image_2_0.png
|
31 |
+
- text: 'jss_style, Three young girls in white aprons. One stands alone, two stand together by a large vase. A girl sits on the floor holding a doll. Large vases flank the scene.'
|
32 |
+
parameters:
|
33 |
+
negative_prompt: 'blurry, cropped, ugly'
|
34 |
+
output:
|
35 |
+
url: ./assets/image_3_0.png
|
36 |
+
- text: 'jss_style, hamster'
|
37 |
+
parameters:
|
38 |
+
negative_prompt: 'blurry, cropped, ugly'
|
39 |
+
output:
|
40 |
+
url: ./assets/image_4_0.png
|
41 |
+
- text: 'jss_style, hipster making a chair'
|
42 |
+
parameters:
|
43 |
+
negative_prompt: 'blurry, cropped, ugly'
|
44 |
+
output:
|
45 |
+
url: ./assets/image_5_0.png
|
46 |
+
- text: 'jss_style, A elegant woman in a long, black evening gown stands in a grand, dimly lit room. She has a confident pose, with one hand on her hip. A ornate gold frame mirror is visible in the background.'
|
47 |
+
parameters:
|
48 |
+
negative_prompt: 'blurry, cropped, ugly'
|
49 |
+
output:
|
50 |
+
url: ./assets/image_6_0.png
|
51 |
+
- text: 'jss_style, An opulent interior with a grand piano in the foreground. A woman in a white dress sits at the piano, her back to the viewer. Sunlight streams through tall windows.'
|
52 |
+
parameters:
|
53 |
+
negative_prompt: 'blurry, cropped, ugly'
|
54 |
+
output:
|
55 |
+
url: ./assets/image_7_0.png
|
56 |
+
- text: 'jss_style, A portrait of a modern tech CEO in a casual outfit, standing in front of a wall of computer screens'
|
57 |
+
parameters:
|
58 |
+
negative_prompt: 'blurry, cropped, ugly'
|
59 |
+
output:
|
60 |
+
url: ./assets/image_8_0.png
|
61 |
+
- text: 'jss_style, A group portrait of a modern diverse family in a living room. Capture individual personalities while maintaining group cohesion.'
|
62 |
+
parameters:
|
63 |
+
negative_prompt: 'blurry, cropped, ugly'
|
64 |
+
output:
|
65 |
+
url: ./assets/image_9_0.png
|
66 |
+
- text: 'jss_style, A lively scene in a 1920s dance hall. Couples dancing, musicians playing, ambient lighting. Capture the movement and atmosphere in Sargent''s distinctive style.'
|
67 |
+
parameters:
|
68 |
+
negative_prompt: 'blurry, cropped, ugly'
|
69 |
+
output:
|
70 |
+
url: ./assets/image_10_0.png
|
71 |
+
- text: 'jss_style, People dining at tables outside a Parisian café.'
|
72 |
+
parameters:
|
73 |
+
negative_prompt: 'blurry, cropped, ugly'
|
74 |
+
output:
|
75 |
+
url: ./assets/image_11_0.png
|
76 |
+
- text: 'jss_style, A young boy holds a small black dog in his arms. He wears a red bow tie and stands in front of a textured backdrop. His red socks and shoes are notable.'
|
77 |
+
parameters:
|
78 |
+
negative_prompt: 'blurry, cropped, ugly'
|
79 |
+
output:
|
80 |
+
url: ./assets/image_12_0.png
|
81 |
+
---
|
82 |
+
|
83 |
+
# john-singer-sargent-sdxl-lora-03
|
84 |
+
|
85 |
+
This is a standard PEFT LoRA derived from [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).
|
86 |
+
|
87 |
+
|
88 |
+
The main validation prompt used during training was:
|
89 |
+
|
90 |
+
|
91 |
+
|
92 |
+
```
|
93 |
+
jss_style, A young boy holds a small black dog in his arms. He wears a red bow tie and stands in front of a textured backdrop. His red socks and shoes are notable.
|
94 |
+
```
|
95 |
+
|
96 |
+
## Validation settings
|
97 |
+
- CFG: `4.2`
|
98 |
+
- CFG Rescale: `0.0`
|
99 |
+
- Steps: `30`
|
100 |
+
- Sampler: `None`
|
101 |
+
- Seed: `42`
|
102 |
+
- Resolution: `1024x1024`
|
103 |
+
|
104 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
105 |
+
|
106 |
+
You can find some example images in the following gallery:
|
107 |
+
|
108 |
+
|
109 |
+
<Gallery />
|
110 |
+
|
111 |
+
The text encoder **was not** trained.
|
112 |
+
You may reuse the base model text encoder for inference.
|
113 |
+
|
114 |
+
|
115 |
+
## Training settings
|
116 |
+
|
117 |
+
- Training epochs: 0
|
118 |
+
- Training steps: 250
|
119 |
+
- Learning rate: 8e-05
|
120 |
+
- Effective batch size: 8
|
121 |
+
- Micro-batch size: 8
|
122 |
+
- Gradient accumulation steps: 1
|
123 |
+
- Number of GPUs: 1
|
124 |
+
- Prediction type: epsilon
|
125 |
+
- Rescaled betas zero SNR: False
|
126 |
+
- Optimizer: adamw_bf16
|
127 |
+
- Precision: Pure BF16
|
128 |
+
- Quantised: Yes: int8-quanto
|
129 |
+
- Xformers: Not used
|
130 |
+
- LoRA Rank: 64
|
131 |
+
- LoRA Alpha: None
|
132 |
+
- LoRA Dropout: 0.1
|
133 |
+
- LoRA initialisation style: default
|
134 |
+
|
135 |
+
|
136 |
+
## Datasets
|
137 |
+
|
138 |
+
### jss-sdxl-512
|
139 |
+
- Repeats: 10
|
140 |
+
- Total number of images: 84
|
141 |
+
- Total number of aspect buckets: 7
|
142 |
+
- Resolution: 0.262144 megapixels
|
143 |
+
- Cropped: False
|
144 |
+
- Crop style: None
|
145 |
+
- Crop aspect: None
|
146 |
+
### jss-sdxl-1024
|
147 |
+
- Repeats: 10
|
148 |
+
- Total number of images: 84
|
149 |
+
- Total number of aspect buckets: 14
|
150 |
+
- Resolution: 1.048576 megapixels
|
151 |
+
- Cropped: False
|
152 |
+
- Crop style: None
|
153 |
+
- Crop aspect: None
|
154 |
+
### jss-sdxl-512-crop
|
155 |
+
- Repeats: 10
|
156 |
+
- Total number of images: 84
|
157 |
+
- Total number of aspect buckets: 1
|
158 |
+
- Resolution: 0.262144 megapixels
|
159 |
+
- Cropped: True
|
160 |
+
- Crop style: random
|
161 |
+
- Crop aspect: square
|
162 |
+
### jss-sdxl-1024-crop
|
163 |
+
- Repeats: 10
|
164 |
+
- Total number of images: 84
|
165 |
+
- Total number of aspect buckets: 1
|
166 |
+
- Resolution: 1.048576 megapixels
|
167 |
+
- Cropped: True
|
168 |
+
- Crop style: random
|
169 |
+
- Crop aspect: square
|
170 |
+
|
171 |
+
|
172 |
+
## Inference
|
173 |
+
|
174 |
+
|
175 |
+
```python
|
176 |
+
import torch
|
177 |
+
from diffusers import DiffusionPipeline
|
178 |
+
|
179 |
+
model_id = 'stabilityai/stable-diffusion-xl-base-1.0'
|
180 |
+
adapter_id = 'davidrd123/john-singer-sargent-sdxl-lora-03'
|
181 |
+
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
182 |
+
pipeline.load_lora_weights(adapter_id)
|
183 |
+
|
184 |
+
prompt = "jss_style, A young boy holds a small black dog in his arms. He wears a red bow tie and stands in front of a textured backdrop. His red socks and shoes are notable."
|
185 |
+
negative_prompt = 'blurry, cropped, ugly'
|
186 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
187 |
+
image = pipeline(
|
188 |
+
prompt=prompt,
|
189 |
+
negative_prompt=negative_prompt,
|
190 |
+
num_inference_steps=30,
|
191 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
192 |
+
width=1024,
|
193 |
+
height=1024,
|
194 |
+
guidance_scale=4.2,
|
195 |
+
guidance_rescale=0.0,
|
196 |
+
).images[0]
|
197 |
+
image.save("output.png", format="PNG")
|
198 |
+
```
|
199 |
+
|