machachu56
commited on
Commit
•
250b3d4
1
Parent(s):
206bf6b
Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: 'a dog sitting on a couch'
|
20 |
+
parameters:
|
21 |
+
negative_prompt: ''''
|
22 |
+
output:
|
23 |
+
url: ./assets/image_1_0.png
|
24 |
+
---
|
25 |
+
|
26 |
+
# flux-daiki
|
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 |
+
a dog sitting on a couch
|
38 |
+
```
|
39 |
+
|
40 |
+
## Validation settings
|
41 |
+
- CFG: `3.5`
|
42 |
+
- CFG Rescale: `0.0`
|
43 |
+
- Steps: `15`
|
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: 9
|
62 |
+
- Training steps: 200
|
63 |
+
- Learning rate: 0.0001
|
64 |
+
- Effective batch size: 2
|
65 |
+
- Micro-batch size: 2
|
66 |
+
- Gradient accumulation steps: 1
|
67 |
+
- Number of GPUs: 1
|
68 |
+
- Prediction type: flow-matching
|
69 |
+
- Rescaled betas zero SNR: False
|
70 |
+
- Optimizer: AdamW, stochastic bf16
|
71 |
+
- Precision: Pure BF16
|
72 |
+
- Xformers: Enabled
|
73 |
+
- LoRA Rank: 16
|
74 |
+
- LoRA Alpha: None
|
75 |
+
- LoRA Dropout: 0.1
|
76 |
+
- LoRA initialisation style: default
|
77 |
+
|
78 |
+
|
79 |
+
## Datasets
|
80 |
+
|
81 |
+
### default_dataset
|
82 |
+
- Repeats: 0
|
83 |
+
- Total number of images: 44
|
84 |
+
- Total number of aspect buckets: 1
|
85 |
+
- Resolution: 1.0 megapixels
|
86 |
+
- Cropped: True
|
87 |
+
- Crop style: center
|
88 |
+
- Crop aspect: square
|
89 |
+
|
90 |
+
|
91 |
+
## Inference
|
92 |
+
|
93 |
+
|
94 |
+
```python
|
95 |
+
import torch
|
96 |
+
from diffusers import DiffusionPipeline
|
97 |
+
|
98 |
+
model_id = 'black-forest-labs/FLUX.1-dev'
|
99 |
+
adapter_id = 'machachu56/flux-daiki'
|
100 |
+
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
101 |
+
pipeline.load_lora_weights(adapter_id)
|
102 |
+
|
103 |
+
prompt = "a dog sitting on a couch"
|
104 |
+
|
105 |
+
|
106 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
107 |
+
image = pipeline(
|
108 |
+
prompt=prompt,
|
109 |
+
num_inference_steps=15,
|
110 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
111 |
+
width=1024,
|
112 |
+
height=1024,
|
113 |
+
guidance_scale=3.5,
|
114 |
+
).images[0]
|
115 |
+
image.save("output.png", format="PNG")
|
116 |
+
```
|
117 |
+
|