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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
base_model: "stabilityai/stable-diffusion-3-medium-diffusers"
|
| 4 |
+
tags:
|
| 5 |
+
- sd3
|
| 6 |
+
- sd3-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: 'A pair of black gloves with lightning shaped symbols on the backs of the hands, the background is white and the gloves appear strong and powerful.'
|
| 22 |
+
parameters:
|
| 23 |
+
negative_prompt: 'blurry, cropped, ugly'
|
| 24 |
+
output:
|
| 25 |
+
url: ./assets/image_1_0.png
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
# tools_joy_v1
|
| 29 |
+
|
| 30 |
+
This is a LyCORIS adapter derived from [stabilityai/stable-diffusion-3-medium-diffusers](https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers).
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
The main validation prompt used during training was:
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
```
|
| 38 |
+
A pair of black gloves with lightning shaped symbols on the backs of the hands, the background is white and the gloves appear strong and powerful.
|
| 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: `1024x1024`
|
| 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: 100
|
| 64 |
+
- Learning rate: 0.0001
|
| 65 |
+
- Effective batch size: 1
|
| 66 |
+
- Micro-batch size: 1
|
| 67 |
+
- Gradient accumulation steps: 1
|
| 68 |
+
- Number of GPUs: 1
|
| 69 |
+
- Prediction type: flow-matching
|
| 70 |
+
- Rescaled betas zero SNR: False
|
| 71 |
+
- Optimizer: adamw_bf16
|
| 72 |
+
- Precision: Pure BF16
|
| 73 |
+
- Quantised: No
|
| 74 |
+
- Xformers: Not used
|
| 75 |
+
- LyCORIS Config:
|
| 76 |
+
```json
|
| 77 |
+
{
|
| 78 |
+
"algo": "lora",
|
| 79 |
+
"multiplier": 1.0,
|
| 80 |
+
"linear_dim": 64,
|
| 81 |
+
"linear_alpha": 32,
|
| 82 |
+
"apply_preset": {
|
| 83 |
+
"target_module": [
|
| 84 |
+
"Attention",
|
| 85 |
+
"FeedForward"
|
| 86 |
+
],
|
| 87 |
+
"module_algo_map": {
|
| 88 |
+
"Attention": {
|
| 89 |
+
"factor": 16
|
| 90 |
+
},
|
| 91 |
+
"FeedForward": {
|
| 92 |
+
"factor": 8
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
## Datasets
|
| 100 |
+
|
| 101 |
+
### tools_joy_v1-512
|
| 102 |
+
- Repeats: 10
|
| 103 |
+
- Total number of images: 60
|
| 104 |
+
- Total number of aspect buckets: 1
|
| 105 |
+
- Resolution: 0.262144 megapixels
|
| 106 |
+
- Cropped: False
|
| 107 |
+
- Crop style: None
|
| 108 |
+
- Crop aspect: None
|
| 109 |
+
### tools_joy_v1-1024
|
| 110 |
+
- Repeats: 10
|
| 111 |
+
- Total number of images: 60
|
| 112 |
+
- Total number of aspect buckets: 1
|
| 113 |
+
- Resolution: 1.048576 megapixels
|
| 114 |
+
- Cropped: False
|
| 115 |
+
- Crop style: None
|
| 116 |
+
- Crop aspect: None
|
| 117 |
+
### tools_joy_v1-512-crop
|
| 118 |
+
- Repeats: 10
|
| 119 |
+
- Total number of images: 60
|
| 120 |
+
- Total number of aspect buckets: 1
|
| 121 |
+
- Resolution: 0.262144 megapixels
|
| 122 |
+
- Cropped: True
|
| 123 |
+
- Crop style: random
|
| 124 |
+
- Crop aspect: square
|
| 125 |
+
### tools_joy_v1-1024-crop
|
| 126 |
+
- Repeats: 10
|
| 127 |
+
- Total number of images: 60
|
| 128 |
+
- Total number of aspect buckets: 1
|
| 129 |
+
- Resolution: 1.048576 megapixels
|
| 130 |
+
- Cropped: True
|
| 131 |
+
- Crop style: random
|
| 132 |
+
- Crop aspect: square
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
## Inference
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
```python
|
| 139 |
+
import torch
|
| 140 |
+
from diffusers import DiffusionPipeline
|
| 141 |
+
from lycoris import create_lycoris_from_weights
|
| 142 |
+
|
| 143 |
+
model_id = 'stabilityai/stable-diffusion-3-medium-diffusers'
|
| 144 |
+
adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
|
| 145 |
+
lora_scale = 1.0
|
| 146 |
+
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
|
| 147 |
+
wrapper.merge_to()
|
| 148 |
+
|
| 149 |
+
prompt = "A pair of black gloves with lightning shaped symbols on the backs of the hands, the background is white and the gloves appear strong and powerful."
|
| 150 |
+
negative_prompt = 'blurry, cropped, ugly'
|
| 151 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
| 152 |
+
image = pipeline(
|
| 153 |
+
prompt=prompt,
|
| 154 |
+
negative_prompt=negative_prompt,
|
| 155 |
+
num_inference_steps=20,
|
| 156 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
| 157 |
+
width=1024,
|
| 158 |
+
height=1024,
|
| 159 |
+
guidance_scale=5.0,
|
| 160 |
+
).images[0]
|
| 161 |
+
image.save("output.png", format="PNG")
|
| 162 |
+
```
|
| 163 |
+
|