ChandlerGIS
commited on
Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: creativeml-openrail-m
|
3 |
+
base_model: "stabilityai/stable-diffusion-xl-base-1.0"
|
4 |
+
tags:
|
5 |
+
- stable-diffusion
|
6 |
+
- stable-diffusion-diffusers
|
7 |
+
- text-to-image
|
8 |
+
- diffusers
|
9 |
+
- simpletuner
|
10 |
+
- lora
|
11 |
+
- template:sd-lora
|
12 |
+
inference: true
|
13 |
+
|
14 |
+
---
|
15 |
+
|
16 |
+
# xhsgirl_v0.2SDXL
|
17 |
+
|
18 |
+
This is a LoRA derived from [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
The main validation prompt used during training was:
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
```
|
27 |
+
a woman side view upper body, hands clasped near mouth, strapless dress, long wavy hair, black car hood, forest background
|
28 |
+
```
|
29 |
+
|
30 |
+
## Validation settings
|
31 |
+
- CFG: `5.5`
|
32 |
+
- CFG Rescale: `0.0`
|
33 |
+
- Steps: `30`
|
34 |
+
- Sampler: `None`
|
35 |
+
- Seed: `42`
|
36 |
+
- Resolution: `1024`
|
37 |
+
|
38 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
<Gallery />
|
44 |
+
|
45 |
+
The text encoder **was not** trained.
|
46 |
+
You may reuse the base model text encoder for inference.
|
47 |
+
|
48 |
+
|
49 |
+
## Training settings
|
50 |
+
|
51 |
+
- Training epochs: 150
|
52 |
+
- Training steps: 150
|
53 |
+
- Learning rate: 8e-06
|
54 |
+
- Effective batch size: 16
|
55 |
+
- Micro-batch size: 4
|
56 |
+
- Gradient accumulation steps: 4
|
57 |
+
- Number of GPUs: 1
|
58 |
+
- Prediction type: epsilon
|
59 |
+
- Rescaled betas zero SNR: False
|
60 |
+
- Optimizer: AdamW, stochastic bf16
|
61 |
+
- Precision: Pure BF16
|
62 |
+
- Xformers: Not used
|
63 |
+
- LoRA Rank: 16
|
64 |
+
- LoRA Alpha: None
|
65 |
+
- LoRA Dropout: 0.1
|
66 |
+
- LoRA initialisation style: default
|
67 |
+
|
68 |
+
|
69 |
+
## Datasets
|
70 |
+
|
71 |
+
### xhsgirl_v0.2sdxl
|
72 |
+
- Repeats: 0
|
73 |
+
- Total number of images: 16
|
74 |
+
- Total number of aspect buckets: 1
|
75 |
+
- Resolution: 1024 px
|
76 |
+
- Cropped: True
|
77 |
+
- Crop style: center
|
78 |
+
- Crop aspect: square
|
79 |
+
|
80 |
+
|
81 |
+
## Inference
|
82 |
+
|
83 |
+
|
84 |
+
```python
|
85 |
+
import torch
|
86 |
+
from diffusers import DiffusionPipeline
|
87 |
+
|
88 |
+
model_id = 'stabilityai/stable-diffusion-xl-base-1.0'
|
89 |
+
adapter_id = 'ChandlerGIS/xhsgirl_v0.2SDXL'
|
90 |
+
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
91 |
+
pipeline.load_lora_weights(adapter_id)
|
92 |
+
|
93 |
+
prompt = "a woman side view upper body, hands clasped near mouth, strapless dress, long wavy hair, black car hood, forest background"
|
94 |
+
negative_prompt = 'blurry, cropped, ugly'
|
95 |
+
|
96 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
97 |
+
image = pipeline(
|
98 |
+
prompt=prompt,
|
99 |
+
negative_prompt=negative_prompt,
|
100 |
+
num_inference_steps=30,
|
101 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
102 |
+
width=1024,
|
103 |
+
height=1024,
|
104 |
+
guidance_scale=5.5,
|
105 |
+
guidance_rescale=0.0,
|
106 |
+
).images[0]
|
107 |
+
image.save("output.png", format="PNG")
|
108 |
+
```
|
109 |
+
|