Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
|
14 |
+
---
|
15 |
+
|
16 |
+
# lora-training
|
17 |
+
|
18 |
+
This is a LoRA derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
The main validation prompt used during training was:
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
```
|
27 |
+
xwe hermes handbag, photo of woman lower part posing on city street clad in white holding a xwe hermes handbag
|
28 |
+
```
|
29 |
+
|
30 |
+
## Validation settings
|
31 |
+
- CFG: `7.5`
|
32 |
+
- CFG Rescale: `0.0`
|
33 |
+
- Steps: `30`
|
34 |
+
- Sampler: `None`
|
35 |
+
- Seed: `42`
|
36 |
+
- Resolution: `1024`
|
37 |
+
|
38 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
<Gallery />
|
44 |
+
|
45 |
+
The text encoder **was not** trained.
|
46 |
+
You may reuse the base model text encoder for inference.
|
47 |
+
|
48 |
+
|
49 |
+
## Training settings
|
50 |
+
|
51 |
+
- Training epochs: 1999
|
52 |
+
- Training steps: 2000
|
53 |
+
- Learning rate: 1e-06
|
54 |
+
- Effective batch size: 8
|
55 |
+
- Micro-batch size: 4
|
56 |
+
- Gradient accumulation steps: 2
|
57 |
+
- Number of GPUs: 1
|
58 |
+
- Prediction type: flow-matching
|
59 |
+
- Rescaled betas zero SNR: False
|
60 |
+
- Optimizer: AdamW, stochastic bf16
|
61 |
+
- Precision: Pure BF16
|
62 |
+
- Xformers: Not used
|
63 |
+
- LoRA Rank: 4
|
64 |
+
- LoRA Alpha: None
|
65 |
+
- LoRA Dropout: 0.1
|
66 |
+
- LoRA initialisation style: default
|
67 |
+
|
68 |
+
|
69 |
+
## Datasets
|
70 |
+
|
71 |
+
### Hermes-handbag
|
72 |
+
- Repeats: 0
|
73 |
+
- Total number of images: 8
|
74 |
+
- Total number of aspect buckets: 1
|
75 |
+
- Resolution: 1 megapixels
|
76 |
+
- Cropped: True
|
77 |
+
- Crop style: center
|
78 |
+
- Crop aspect: square
|
79 |
+
|
80 |
+
|
81 |
+
## Inference
|
82 |
+
|
83 |
+
|
84 |
+
```python
|
85 |
+
import torch
|
86 |
+
from diffusers import DiffusionPipeline
|
87 |
+
|
88 |
+
model_id = 'black-forest-labs/FLUX.1-dev'
|
89 |
+
adapter_id = 'Fatha/lora-training'
|
90 |
+
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
91 |
+
pipeline.load_lora_weights(adapter_id)
|
92 |
+
|
93 |
+
prompt = "xwe hermes handbag, photo of woman lower part posing on city street clad in white holding a xwe hermes handbag"
|
94 |
+
|
95 |
+
|
96 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
97 |
+
image = pipeline(
|
98 |
+
prompt=prompt,
|
99 |
+
num_inference_steps=30,
|
100 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
101 |
+
width=1024,
|
102 |
+
height=1024,
|
103 |
+
guidance_scale=7.5,
|
104 |
+
).images[0]
|
105 |
+
image.save("output.png", format="PNG")
|
106 |
+
```
|
107 |
+
|