ohcaidek commited on
Commit
0a5044f
·
verified ·
1 Parent(s): e4ee991

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +129 -0
README.md ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # simpletuner-lora
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: 5
53
+ - Training steps: 200
54
+ - Learning rate: 0.0008
55
+ - Effective batch size: 1
56
+ - Micro-batch size: 1
57
+ - Gradient accumulation steps: 1
58
+ - Number of GPUs: 1
59
+ - Prediction type: flow-matching
60
+ - Rescaled betas zero SNR: False
61
+ - Optimizer: adamw_bf16
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,
70
+ "linear_dim": 1000000,
71
+ "linear_alpha": 1,
72
+ "factor": 16,
73
+ "apply_preset": {
74
+ "target_module": [
75
+ "FluxTransformerBlock",
76
+ "FluxSingleTransformerBlock"
77
+ ],
78
+ "module_algo_map": {
79
+ "Attention": {
80
+ "factor": 16
81
+ },
82
+ "FeedForward": {
83
+ "factor": 8
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ ## Datasets
91
+
92
+ ### default_dataset
93
+ - Repeats: 0
94
+ - Total number of images: 37
95
+ - Total number of aspect buckets: 1
96
+ - Resolution: 1.048576 megapixels
97
+ - Cropped: True
98
+ - Crop style: center
99
+ - Crop aspect: square
100
+
101
+
102
+ ## Inference
103
+
104
+
105
+ ```python
106
+ import torch
107
+ from diffusers import DiffusionPipeline
108
+ from lycoris import create_lycoris_from_weights
109
+
110
+ model_id = 'black-forest-labs/FLUX.1-dev'
111
+ adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
112
+ lora_scale = 1.0
113
+ wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
114
+ wrapper.merge_to()
115
+
116
+ prompt = "A photo-realistic image of a cat"
117
+
118
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
119
+ image = pipeline(
120
+ prompt=prompt,
121
+ num_inference_steps=20,
122
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
123
+ width=1024,
124
+ height=1024,
125
+ guidance_scale=3.0,
126
+ ).images[0]
127
+ image.save("output.png", format="PNG")
128
+ ```
129
+