Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: creativeml-openrail-m
|
3 |
+
base_model: "black-forest-labs/FLUX.1-dev"
|
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 |
+
widget:
|
14 |
+
- text: 'unconditional (blank prompt)'
|
15 |
+
parameters:
|
16 |
+
negative_prompt: ''''
|
17 |
+
output:
|
18 |
+
url: ./assets/image_0_0.png
|
19 |
+
- text: 'anime style digital art of a girl with blue-green hair and green eyes wearing a one piece swimsuit'
|
20 |
+
parameters:
|
21 |
+
negative_prompt: ''''
|
22 |
+
output:
|
23 |
+
url: ./assets/image_1_0.png
|
24 |
+
---
|
25 |
+
|
26 |
+
# lora-training
|
27 |
+
|
28 |
+
This is a LoRA derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
The main validation prompt used during training was:
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
```
|
37 |
+
anime style digital art of a girl with blue-green hair and green eyes wearing a one piece swimsuit
|
38 |
+
```
|
39 |
+
|
40 |
+
## Validation settings
|
41 |
+
- CFG: `3.5`
|
42 |
+
- CFG Rescale: `0.0`
|
43 |
+
- Steps: `20`
|
44 |
+
- Sampler: `None`
|
45 |
+
- Seed: `42`
|
46 |
+
- Resolution: `1024`
|
47 |
+
|
48 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
49 |
+
|
50 |
+
You can find some example images in the following gallery:
|
51 |
+
|
52 |
+
|
53 |
+
<Gallery />
|
54 |
+
|
55 |
+
The text encoder **was not** trained.
|
56 |
+
You may reuse the base model text encoder for inference.
|
57 |
+
|
58 |
+
|
59 |
+
## Training settings
|
60 |
+
|
61 |
+
- Training epochs: 5
|
62 |
+
- Training steps: 200
|
63 |
+
- Learning rate: 0.0001
|
64 |
+
- Effective batch size: 1
|
65 |
+
- Micro-batch size: 1
|
66 |
+
- Gradient accumulation steps: 1
|
67 |
+
- Number of GPUs: 1
|
68 |
+
- Prediction type: flow-matching
|
69 |
+
- Rescaled betas zero SNR: False
|
70 |
+
- Optimizer: adamw_bf16
|
71 |
+
- Precision: bf16
|
72 |
+
- Quantised: Yes: int8-quanto
|
73 |
+
- Xformers: Not used
|
74 |
+
- LoRA Rank: 16
|
75 |
+
- LoRA Alpha: None
|
76 |
+
- LoRA Dropout: 0.1
|
77 |
+
- LoRA initialisation style: default
|
78 |
+
|
79 |
+
|
80 |
+
## Datasets
|
81 |
+
|
82 |
+
### anime-test-01
|
83 |
+
- Repeats: 0
|
84 |
+
- Total number of images: 35
|
85 |
+
- Total number of aspect buckets: 1
|
86 |
+
- Resolution: 1.048576 megapixels
|
87 |
+
- Cropped: True
|
88 |
+
- Crop style: center
|
89 |
+
- Crop aspect: square
|
90 |
+
|
91 |
+
|
92 |
+
## Inference
|
93 |
+
|
94 |
+
|
95 |
+
```python
|
96 |
+
import torch
|
97 |
+
from diffusers import DiffusionPipeline
|
98 |
+
|
99 |
+
model_id = 'black-forest-labs/FLUX.1-dev'
|
100 |
+
adapter_id = 'Disra/lora-training'
|
101 |
+
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
102 |
+
pipeline.load_lora_weights(adapter_id)
|
103 |
+
|
104 |
+
prompt = "anime style digital art of a girl with blue-green hair and green eyes wearing a one piece swimsuit"
|
105 |
+
|
106 |
+
|
107 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
108 |
+
image = pipeline(
|
109 |
+
prompt=prompt,
|
110 |
+
num_inference_steps=20,
|
111 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
112 |
+
width=1024,
|
113 |
+
height=1024,
|
114 |
+
guidance_scale=3.5,
|
115 |
+
).images[0]
|
116 |
+
image.save("output.png", format="PNG")
|
117 |
+
```
|
118 |
+
|