Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
- safe-for-work
|
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 scene from One Piece. Monkey D. Luffy holding a sign that says ''I LOVE PROMPTS!'', he is standing full body on a beach at sunset. He is wearing a red vest, yellow sash, and a straw hat. The setting sun casts a dynamic shadow on his face.'
|
22 |
+
parameters:
|
23 |
+
negative_prompt: 'blurry, cropped, ugly'
|
24 |
+
output:
|
25 |
+
url: ./assets/image_1_0.png
|
26 |
+
- text: 'A scene from One Piece. Monkey D. Luffy jumping out of a propeller airplane, sky diving. He looks excited and his hair is blowing in the wind. The sky is clear and blue, there are birds pictured in the distance.'
|
27 |
+
parameters:
|
28 |
+
negative_prompt: 'blurry, cropped, ugly'
|
29 |
+
output:
|
30 |
+
url: ./assets/image_2_0.png
|
31 |
+
- text: 'A scene from One Piece. Monkey D. Luffy spinning a basketball on his finger on a basketball court. He is wearing a lakers jersey with the #12 on it. The basketball hoop and crowd are in the background cheering him. He is smiling.'
|
32 |
+
parameters:
|
33 |
+
negative_prompt: 'blurry, cropped, ugly'
|
34 |
+
output:
|
35 |
+
url: ./assets/image_3_0.png
|
36 |
+
- text: 'A scene from One Piece. Monkey D. Luffy is wearing a suit in an office shaking the hand of a business woman. The woman has purple hair and is wearing professional attire. There is a Google logo in the background. It is during daytime, and the overall sentiment is one of accomplishment.'
|
37 |
+
parameters:
|
38 |
+
negative_prompt: 'blurry, cropped, ugly'
|
39 |
+
output:
|
40 |
+
url: ./assets/image_4_0.png
|
41 |
+
- text: 'A scene from One Piece. Monkey D. Luffy is fighting a large brown grizzly bear, deep in a forest. The bear is tall and standing on two legs, roaring. The bear is also wearing a crown because it is the king of all bears. Around them are tall trees and other animals watching.'
|
42 |
+
parameters:
|
43 |
+
negative_prompt: 'blurry, cropped, ugly'
|
44 |
+
output:
|
45 |
+
url: ./assets/image_5_0.png
|
46 |
+
---
|
47 |
+
|
48 |
+
# luffy-simpletuner-lora-11
|
49 |
+
|
50 |
+
This is a LyCORIS adapter derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
|
51 |
+
|
52 |
+
|
53 |
+
No validation prompt was used during training.
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
None
|
59 |
+
|
60 |
+
|
61 |
+
## Validation settings
|
62 |
+
- CFG: `3.5`
|
63 |
+
- CFG Rescale: `0.0`
|
64 |
+
- Steps: `20`
|
65 |
+
- Sampler: `None`
|
66 |
+
- Seed: `42`
|
67 |
+
- Resolution: `1024x1024`
|
68 |
+
|
69 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
70 |
+
|
71 |
+
You can find some example images in the following gallery:
|
72 |
+
|
73 |
+
|
74 |
+
<Gallery />
|
75 |
+
|
76 |
+
The text encoder **was not** trained.
|
77 |
+
You may reuse the base model text encoder for inference.
|
78 |
+
|
79 |
+
|
80 |
+
## Training settings
|
81 |
+
|
82 |
+
- Training epochs: 0
|
83 |
+
- Training steps: 300
|
84 |
+
- Learning rate: 5e-05
|
85 |
+
- Effective batch size: 8
|
86 |
+
- Micro-batch size: 8
|
87 |
+
- Gradient accumulation steps: 1
|
88 |
+
- Number of GPUs: 1
|
89 |
+
- Prediction type: flow-matching
|
90 |
+
- Rescaled betas zero SNR: False
|
91 |
+
- Optimizer: adamw_bf16
|
92 |
+
- Precision: Pure BF16
|
93 |
+
- Quantised: Yes: int8-quanto
|
94 |
+
- Xformers: Not used
|
95 |
+
- LyCORIS Config:
|
96 |
+
```json
|
97 |
+
{
|
98 |
+
"algo": "lokr",
|
99 |
+
"multiplier": 1.0,
|
100 |
+
"linear_dim": 10000,
|
101 |
+
"linear_alpha": 1,
|
102 |
+
"factor": 12,
|
103 |
+
"apply_preset": {
|
104 |
+
"target_module": [
|
105 |
+
"Attention",
|
106 |
+
"FeedForward"
|
107 |
+
],
|
108 |
+
"module_algo_map": {
|
109 |
+
"Attention": {
|
110 |
+
"factor": 12
|
111 |
+
},
|
112 |
+
"FeedForward": {
|
113 |
+
"factor": 6
|
114 |
+
}
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
```
|
119 |
+
|
120 |
+
## Datasets
|
121 |
+
|
122 |
+
### luffy-1024
|
123 |
+
- Repeats: 1
|
124 |
+
- Total number of images: 306
|
125 |
+
- Total number of aspect buckets: 1
|
126 |
+
- Resolution: 1.048576 megapixels
|
127 |
+
- Cropped: False
|
128 |
+
- Crop style: None
|
129 |
+
- Crop aspect: None
|
130 |
+
### luffy-768
|
131 |
+
- Repeats: 2
|
132 |
+
- Total number of images: 306
|
133 |
+
- Total number of aspect buckets: 1
|
134 |
+
- Resolution: 0.589824 megapixels
|
135 |
+
- Cropped: False
|
136 |
+
- Crop style: None
|
137 |
+
- Crop aspect: None
|
138 |
+
### luffy-512
|
139 |
+
- Repeats: 2
|
140 |
+
- Total number of images: 306
|
141 |
+
- Total number of aspect buckets: 1
|
142 |
+
- Resolution: 0.262144 megapixels
|
143 |
+
- Cropped: False
|
144 |
+
- Crop style: None
|
145 |
+
- Crop aspect: None
|
146 |
+
|
147 |
+
|
148 |
+
## Inference
|
149 |
+
|
150 |
+
|
151 |
+
```python
|
152 |
+
import torch
|
153 |
+
from diffusers import DiffusionPipeline
|
154 |
+
from lycoris import create_lycoris_from_weights
|
155 |
+
|
156 |
+
model_id = 'black-forest-labs/FLUX.1-dev'
|
157 |
+
adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
|
158 |
+
lora_scale = 1.0
|
159 |
+
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
|
160 |
+
wrapper.merge_to()
|
161 |
+
|
162 |
+
prompt = "An astronaut is riding a horse through the jungles of Thailand."
|
163 |
+
|
164 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
165 |
+
image = pipeline(
|
166 |
+
prompt=prompt,
|
167 |
+
num_inference_steps=20,
|
168 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
169 |
+
width=1024,
|
170 |
+
height=1024,
|
171 |
+
guidance_scale=3.5,
|
172 |
+
).images[0]
|
173 |
+
image.save("output.png", format="PNG")
|
174 |
+
```
|
175 |
+
|