wang1111magic
commited on
Commit
•
7c761a7
1
Parent(s):
4d7c23c
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: 'qxxy style,Your_name,best quality,This is a high-resolution anime still featuring a young male character with black hair wearing a white school uniform with a green and yellow tie. He appears startled or surprised, with his mouth slightly open and a hand to his cheek, as though he has just witnessed something unexpected. The setting seems to be a cafe with a modern, airy interior, as indicated by the wooden trusses on the ceiling and hanging industrial-style lamps. The daylight filters through the windows, creating a bright atmosphere. No other characters are visible, which places the entire focus on the young man''s reaction.,1boy, necktie, male_focus, solo, school_uniform, indoors, striped_necktie, green_necktie, short_sleeves, shirt, upper_body'
|
20 |
+
parameters:
|
21 |
+
negative_prompt: ''''
|
22 |
+
output:
|
23 |
+
url: ./assets/image_1_0.png
|
24 |
+
---
|
25 |
+
|
26 |
+
# 0821flux-Your-name-lora64lora-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 |
+
qxxy style,Your_name,best quality,This is a high-resolution anime still featuring a young male character with black hair wearing a white school uniform with a green and yellow tie. He appears startled or surprised, with his mouth slightly open and a hand to his cheek, as though he has just witnessed something unexpected. The setting seems to be a cafe with a modern, airy interior, as indicated by the wooden trusses on the ceiling and hanging industrial-style lamps. The daylight filters through the windows, creating a bright atmosphere. No other characters are visible, which places the entire focus on the young man's reaction.,1boy, necktie, male_focus, solo, school_uniform, indoors, striped_necktie, green_necktie, short_sleeves, shirt, upper_body
|
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: 0
|
62 |
+
- Training steps: 300
|
63 |
+
- Learning rate: 0.0003
|
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_bf16
|
71 |
+
- Precision: bf16
|
72 |
+
- Quantised: Yes: int8-quanto
|
73 |
+
- Xformers: Not used
|
74 |
+
- LoRA Rank: 64
|
75 |
+
- LoRA Alpha: None
|
76 |
+
- LoRA Dropout: 0.1
|
77 |
+
- LoRA initialisation style: default
|
78 |
+
|
79 |
+
|
80 |
+
## Datasets
|
81 |
+
|
82 |
+
### qxxy style
|
83 |
+
- Repeats: 10
|
84 |
+
- Total number of images: 488
|
85 |
+
- Total number of aspect buckets: 1
|
86 |
+
- Resolution: 1024 px
|
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 = 'wang1111magic/0821flux-Your-name-lora64lora-training'
|
101 |
+
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
102 |
+
pipeline.load_lora_weights(adapter_id)
|
103 |
+
|
104 |
+
prompt = "qxxy style,Your_name,best quality,This is a high-resolution anime still featuring a young male character with black hair wearing a white school uniform with a green and yellow tie. He appears startled or surprised, with his mouth slightly open and a hand to his cheek, as though he has just witnessed something unexpected. The setting seems to be a cafe with a modern, airy interior, as indicated by the wooden trusses on the ceiling and hanging industrial-style lamps. The daylight filters through the windows, creating a bright atmosphere. No other characters are visible, which places the entire focus on the young man's reaction.,1boy, necktie, male_focus, solo, school_uniform, indoors, striped_necktie, green_necktie, short_sleeves, shirt, upper_body"
|
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 |
+
|