Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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. Nami stands at the edge of a cliff, wind blowing through her hair, with the ocean far below. She''s wearing a purple tank top and white skirt, her eyes full of determination. Sanji Vinsmoke is behind her, looking away, leaning on a tree with a cigarette in hand, dressed in his usual black suit. The setting sun casts a golden glow over the rocky terrain and crashing waves below.'
|
22 |
+
parameters:
|
23 |
+
negative_prompt: 'blurry, cropped, ugly'
|
24 |
+
output:
|
25 |
+
url: ./assets/image_1_0.png
|
26 |
+
- text: 'A scene from Jujutsu Kaisen. Maki Zenin is in the middle of a high-stakes battle, leaping forward with her weapon raised. Her glasses reflect the light of an explosion behind her. Beside her, the young male character with messy black hair stumbles, struggling to stay on his feet, his white jacket dirtied from the ongoing fight. The background shows a shattered wooden dojo, with debris scattered all around.'
|
27 |
+
parameters:
|
28 |
+
negative_prompt: 'blurry, cropped, ugly'
|
29 |
+
output:
|
30 |
+
url: ./assets/image_2_0.png
|
31 |
+
- text: 'A scene from Demon Slayer. Muzan Kibutsuji is standing in front of a large chalkboard filled with cryptic equations and diagrams. He holds a piece of chalk in one hand and a test tube in the other, his eyes gleaming with focus. The warm light from nearby candles flickers against the shelves of mysterious bottles and ingredients in his lab, giving the scene an eerie ambiance.'
|
32 |
+
parameters:
|
33 |
+
negative_prompt: 'blurry, cropped, ugly'
|
34 |
+
output:
|
35 |
+
url: ./assets/image_3_0.png
|
36 |
+
- text: 'A scene from Attack on Titan. Levi Ackerman is sitting under a tree, holding the piece of paper close to his face as he reads intently. His sword rests beside him, and the male character with short hair stands nearby, glancing over at the paper with a curious expression. The lush green forest around them is bathed in dappled sunlight, with the tall trees swaying gently in the breeze.'
|
37 |
+
parameters:
|
38 |
+
negative_prompt: 'blurry, cropped, ugly'
|
39 |
+
output:
|
40 |
+
url: ./assets/image_4_0.png
|
41 |
+
- text: 'A scene from My Hero Academia. Shoto Todoroki stands on a cliff overlooking a vast desert, his hand outstretched and half of the cliffside covered in ice. His dark blue outfit contrasts against the bright, sandy terrain. The harsh sunlight creates long shadows across the rocky landscape, adding to the intensity of the moment.'
|
42 |
+
parameters:
|
43 |
+
negative_prompt: 'blurry, cropped, ugly'
|
44 |
+
output:
|
45 |
+
url: ./assets/image_5_0.png
|
46 |
+
- text: 'A scene from Demon Slayer. Shoto Todoroki and Tanjiro Kamado stand side by side in a dense forest, both with serious expressions. Todoroki''s ice powers cover part of the forest floor, while Tanjiro holds his sword at the ready, his green and black checkered haori fluttering in the wind. Behind them, Mitsuri Kanroji smiles brightly, offering encouragement, her pink kimono glowing in the soft light filtering through the trees.'
|
47 |
+
parameters:
|
48 |
+
negative_prompt: 'blurry, cropped, ugly'
|
49 |
+
output:
|
50 |
+
url: ./assets/image_6_0.png
|
51 |
+
- text: 'A scene from Attack on Titan. Monkey D. Luffy is scaling the massive walls of Paradis Island with his stretchy arms, laughing as he pulls himself higher. Mikasa Ackerman watches in disbelief, her military uniform fluttering in the wind as she stands ready with her ODM gear. The sky is clear, with just a few clouds drifting above, and the vast landscape stretches out below them.'
|
52 |
+
parameters:
|
53 |
+
negative_prompt: 'blurry, cropped, ugly'
|
54 |
+
output:
|
55 |
+
url: ./assets/image_7_0.png
|
56 |
+
- text: 'A scene from My Hero Academia. Muzan Kibutsuji and Shoto Todoroki stand in the middle of a quiet street, the ground cracked from a recent battle. Muzan holds a test tube filled with a strange glowing liquid, while Todoroki''s hand is raised, ice forming around them in defensive spikes. The street is eerily still, with the remains of a destroyed building in the background, and the sun is setting, casting long shadows across the scene.'
|
57 |
+
parameters:
|
58 |
+
negative_prompt: 'blurry, cropped, ugly'
|
59 |
+
output:
|
60 |
+
url: ./assets/image_8_0.png
|
61 |
+
- text: 'A scene from One Piece. Levi Ackerman is on the deck of the Thousand Sunny, methodically cleaning his gear with a stern expression. Nami stands nearby, glancing over at him with a mix of curiosity and amusement, her arms crossed. The ship sails through calm waters under a bright blue sky, with a distant island just visible on the horizon.'
|
62 |
+
parameters:
|
63 |
+
negative_prompt: 'blurry, cropped, ugly'
|
64 |
+
output:
|
65 |
+
url: ./assets/image_9_0.png
|
66 |
+
- text: 'A scene from My Hero Academia. Ichigo Kurosaki stands in the middle of a training field, facing off against Shoto Todoroki. Ichigo holds his sword with a confident expression, while Todoroki''s left hand crackles with ice, and his right flares with flames. Muzan Kibutsuji watches from the sidelines, sitting casually on a bench with a sly smile, as if he''s observing a dangerous experiment. The sky above is cloudy, with faint rays of sunlight piercing through.'
|
67 |
+
parameters:
|
68 |
+
negative_prompt: 'blurry, cropped, ugly'
|
69 |
+
output:
|
70 |
+
url: ./assets/image_10_0.png
|
71 |
+
---
|
72 |
+
|
73 |
+
# anime-chars-simpletuner-lora-1
|
74 |
+
|
75 |
+
This is a LyCORIS adapter derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
|
76 |
+
|
77 |
+
|
78 |
+
No validation prompt was used during training.
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
None
|
84 |
+
|
85 |
+
|
86 |
+
## Validation settings
|
87 |
+
- CFG: `3.5`
|
88 |
+
- CFG Rescale: `0.0`
|
89 |
+
- Steps: `20`
|
90 |
+
- Sampler: `None`
|
91 |
+
- Seed: `42`
|
92 |
+
- Resolution: `1024x1024`
|
93 |
+
|
94 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
95 |
+
|
96 |
+
You can find some example images in the following gallery:
|
97 |
+
|
98 |
+
|
99 |
+
<Gallery />
|
100 |
+
|
101 |
+
The text encoder **was not** trained.
|
102 |
+
You may reuse the base model text encoder for inference.
|
103 |
+
|
104 |
+
|
105 |
+
## Training settings
|
106 |
+
|
107 |
+
- Training epochs: 3
|
108 |
+
- Training steps: 200
|
109 |
+
- Learning rate: 0.001
|
110 |
+
- Effective batch size: 192
|
111 |
+
- Micro-batch size: 48
|
112 |
+
- Gradient accumulation steps: 1
|
113 |
+
- Number of GPUs: 4
|
114 |
+
- Prediction type: flow-matching
|
115 |
+
- Rescaled betas zero SNR: False
|
116 |
+
- Optimizer: adamw_bf16
|
117 |
+
- Precision: Pure BF16
|
118 |
+
- Quantised: Yes: int8-quanto
|
119 |
+
- Xformers: Not used
|
120 |
+
- LyCORIS Config:
|
121 |
+
```json
|
122 |
+
{
|
123 |
+
"algo": "lokr",
|
124 |
+
"multiplier": 1.0,
|
125 |
+
"linear_dim": 10000,
|
126 |
+
"linear_alpha": 1,
|
127 |
+
"factor": 12,
|
128 |
+
"apply_preset": {
|
129 |
+
"target_module": [
|
130 |
+
"Attention",
|
131 |
+
"FeedForward"
|
132 |
+
],
|
133 |
+
"module_algo_map": {
|
134 |
+
"Attention": {
|
135 |
+
"factor": 12
|
136 |
+
},
|
137 |
+
"FeedForward": {
|
138 |
+
"factor": 6
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
+
}
|
143 |
+
```
|
144 |
+
|
145 |
+
## Datasets
|
146 |
+
|
147 |
+
### anime_char-512
|
148 |
+
- Repeats: 2
|
149 |
+
- Total number of images: ~3476
|
150 |
+
- Total number of aspect buckets: 1
|
151 |
+
- Resolution: 0.262144 megapixels
|
152 |
+
- Cropped: False
|
153 |
+
- Crop style: None
|
154 |
+
- Crop aspect: None
|
155 |
+
|
156 |
+
|
157 |
+
## Inference
|
158 |
+
|
159 |
+
|
160 |
+
```python
|
161 |
+
import torch
|
162 |
+
from diffusers import DiffusionPipeline
|
163 |
+
from lycoris import create_lycoris_from_weights
|
164 |
+
|
165 |
+
model_id = 'black-forest-labs/FLUX.1-dev'
|
166 |
+
adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
|
167 |
+
lora_scale = 1.0
|
168 |
+
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
|
169 |
+
wrapper.merge_to()
|
170 |
+
|
171 |
+
prompt = "An astronaut is riding a horse through the jungles of Thailand."
|
172 |
+
|
173 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
174 |
+
image = pipeline(
|
175 |
+
prompt=prompt,
|
176 |
+
num_inference_steps=20,
|
177 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
178 |
+
width=1024,
|
179 |
+
height=1024,
|
180 |
+
guidance_scale=3.5,
|
181 |
+
).images[0]
|
182 |
+
image.save("output.png", format="PNG")
|
183 |
+
```
|
184 |
+
|