bghira commited on
Commit
17dfa3b
·
verified ·
1 Parent(s): 994b1ea

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +145 -0
README.md ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - not-for-all-audiences
11
+ - lora
12
+ - template:sd-lora
13
+ - lycoris
14
+ inference: true
15
+
16
+ ---
17
+
18
+ # flux-sfwbooru-3.5M-lokr-attempt5b
19
+
20
+ This is a LyCORIS adapter derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
21
+
22
+
23
+ The main validation prompt used during training was:
24
+
25
+
26
+
27
+ ```
28
+ A photo-realistic image of a cat
29
+ ```
30
+
31
+ ## Validation settings
32
+ - CFG: `3.0`
33
+ - CFG Rescale: `0.0`
34
+ - Steps: `20`
35
+ - Sampler: `None`
36
+ - Seed: `42`
37
+ - Resolution: `1024x1024`
38
+
39
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
40
+
41
+
42
+
43
+
44
+ <Gallery />
45
+
46
+ The text encoder **was not** trained.
47
+ You may reuse the base model text encoder for inference.
48
+
49
+
50
+ ## Training settings
51
+
52
+ - Training epochs: 0
53
+ - Training steps: 50250
54
+ - Learning rate: 2e-06
55
+ - Effective batch size: 3
56
+ - Micro-batch size: 1
57
+ - Gradient accumulation steps: 1
58
+ - Number of GPUs: 3
59
+ - Prediction type: flow-matching
60
+ - Rescaled betas zero SNR: False
61
+ - Optimizer: optimi-lion
62
+ - Precision: Pure BF16
63
+ - Quantised: Yes: int8-quanto
64
+ - Xformers: Not used
65
+ - LyCORIS Config:
66
+ ```json
67
+ {
68
+ "algo": "lokr",
69
+ "multiplier": 1.0,
70
+ "linear_dim": 10000,
71
+ "linear_alpha": 1,
72
+ "factor": 8,
73
+ "apply_preset": {
74
+ "target_module": [
75
+ "Attention",
76
+ "FeedForward"
77
+ ],
78
+ "module_algo_map": {
79
+ "Attention": {
80
+ "factor": 6
81
+ },
82
+ "FeedForward": {
83
+ "factor": 4
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ ## Datasets
91
+
92
+ ### sfwbooru
93
+ - Repeats: 0
94
+ - Total number of images: ~638952
95
+ - Total number of aspect buckets: 95
96
+ - Resolution: 1.048576 megapixels
97
+ - Cropped: False
98
+ - Crop style: None
99
+ - Crop aspect: None
100
+ ### sfwbooru-512
101
+ - Repeats: 0
102
+ - Total number of images: ~736341
103
+ - Total number of aspect buckets: 57
104
+ - Resolution: 0.262144 megapixels
105
+ - Cropped: False
106
+ - Crop style: None
107
+ - Crop aspect: None
108
+ ### sfwbooru-crop
109
+ - Repeats: 0
110
+ - Total number of images: ~560661
111
+ - Total number of aspect buckets: 1
112
+ - Resolution: 1.048576 megapixels
113
+ - Cropped: True
114
+ - Crop style: random
115
+ - Crop aspect: square
116
+
117
+
118
+ ## Inference
119
+
120
+
121
+ ```python
122
+ import torch
123
+ from diffusers import DiffusionPipeline
124
+ from lycoris import create_lycoris_from_weights
125
+
126
+ model_id = 'black-forest-labs/FLUX.1-dev'
127
+ adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
128
+ lora_scale = 1.0
129
+ wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
130
+ wrapper.merge_to()
131
+
132
+ prompt = "A photo-realistic image of a cat"
133
+
134
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
135
+ image = pipeline(
136
+ prompt=prompt,
137
+ num_inference_steps=20,
138
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
139
+ width=1024,
140
+ height=1024,
141
+ guidance_scale=3.0,
142
+ ).images[0]
143
+ image.save("output.png", format="PNG")
144
+ ```
145
+