Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
base_model: "black-forest-labs/FLUX.1-dev"
|
4 |
+
tags:
|
5 |
+
- flux
|
6 |
+
- flux-diffusers
|
7 |
+
- text-to-image
|
8 |
+
- diffusers
|
9 |
+
- simpletuner
|
10 |
+
- lora
|
11 |
+
- template:sd-lora
|
12 |
+
inference: true
|
13 |
+
|
14 |
+
---
|
15 |
+
|
16 |
+
# simpletuner-lora-schedulefree
|
17 |
+
|
18 |
+
This is a LyCORIS adapter derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
|
19 |
+
|
20 |
+
|
21 |
+
The main validation prompt used during training was:
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
```
|
26 |
+
A photo-realistic image of a cat
|
27 |
+
```
|
28 |
+
|
29 |
+
## Validation settings
|
30 |
+
- CFG: `3.0`
|
31 |
+
- CFG Rescale: `0.0`
|
32 |
+
- Steps: `20`
|
33 |
+
- Sampler: `None`
|
34 |
+
- Seed: `42`
|
35 |
+
- Resolution: `1776x512`
|
36 |
+
|
37 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
<Gallery />
|
43 |
+
|
44 |
+
The text encoder **was not** trained.
|
45 |
+
You may reuse the base model text encoder for inference.
|
46 |
+
|
47 |
+
|
48 |
+
## Training settings
|
49 |
+
|
50 |
+
- Training epochs: 13
|
51 |
+
- Training steps: 10001
|
52 |
+
- Learning rate: 0.0001
|
53 |
+
- Effective batch size: 6
|
54 |
+
- Micro-batch size: 2
|
55 |
+
- Gradient accumulation steps: 1
|
56 |
+
- Number of GPUs: 3
|
57 |
+
- Prediction type: flow-matching
|
58 |
+
- Rescaled betas zero SNR: False
|
59 |
+
- Optimizer: adamw_schedulefree+aggressiveweight_decay=1e-3
|
60 |
+
- Precision: bf16
|
61 |
+
- Quantised: Yes: fp8-quanto
|
62 |
+
- Xformers: Not used
|
63 |
+
- LyCORIS Config:
|
64 |
+
```json
|
65 |
+
{
|
66 |
+
"algo": "lokr",
|
67 |
+
"multiplier": 1.0,
|
68 |
+
"linear_dim": 10000,
|
69 |
+
"linear_alpha": 1,
|
70 |
+
"factor": 12,
|
71 |
+
"apply_preset": {
|
72 |
+
"target_module": [
|
73 |
+
"Attention",
|
74 |
+
"FeedForward"
|
75 |
+
],
|
76 |
+
"module_algo_map": {
|
77 |
+
"Attention": {
|
78 |
+
"factor": 12
|
79 |
+
},
|
80 |
+
"FeedForward": {
|
81 |
+
"factor": 6
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
```
|
87 |
+
|
88 |
+
## Datasets
|
89 |
+
|
90 |
+
### garfield
|
91 |
+
- Repeats: 0
|
92 |
+
- Total number of images: ~2211
|
93 |
+
- Total number of aspect buckets: 6
|
94 |
+
- Resolution: 512 px
|
95 |
+
- Cropped: False
|
96 |
+
- Crop style: None
|
97 |
+
- Crop aspect: None
|
98 |
+
|
99 |
+
|
100 |
+
## Inference
|
101 |
+
|
102 |
+
|
103 |
+
```python
|
104 |
+
import torch
|
105 |
+
from diffusers import DiffusionPipeline
|
106 |
+
from lycoris import create_lycoris_from_weights
|
107 |
+
|
108 |
+
model_id = 'black-forest-labs/FLUX.1-dev'
|
109 |
+
adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
|
110 |
+
lora_scale = 1.0
|
111 |
+
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
|
112 |
+
wrapper.merge_to()
|
113 |
+
|
114 |
+
prompt = "A photo-realistic image of a cat"
|
115 |
+
|
116 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
117 |
+
image = pipeline(
|
118 |
+
prompt=prompt,
|
119 |
+
num_inference_steps=20,
|
120 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
121 |
+
width=1776,
|
122 |
+
height=512,
|
123 |
+
guidance_scale=3.0,
|
124 |
+
).images[0]
|
125 |
+
image.save("output.png", format="PNG")
|
126 |
+
```
|
127 |
+
|