PseudoTerminal X commited on
Commit
398b4ad
1 Parent(s): dc6e0f4

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +152 -0
README.md ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - lora
11
+ - template:sd-lora
12
+ inference: true
13
+ widget:
14
+ - text: 'unconditional (blank prompt)'
15
+ parameters:
16
+ negative_prompt: 'blurry, cropped, ugly'
17
+ output:
18
+ url: ./assets/image_0_0.png
19
+ - text: 'a comic strip of garfield, by jim davis. the first panel has garfield saying Help!. the second panel has garfield saying My clungus is leaking! and the third panel has Odie saying uh oh!'
20
+ parameters:
21
+ negative_prompt: 'blurry, cropped, ugly'
22
+ output:
23
+ url: ./assets/image_1_0.png
24
+ - text: 'a comic strip by jim davis, showcasing odie in his full demonic form while garfield cowers in the background'
25
+ parameters:
26
+ negative_prompt: 'blurry, cropped, ugly'
27
+ output:
28
+ url: ./assets/image_2_0.png
29
+ - text: 'a picture of garfield in walmart, shopping amongst the real people'
30
+ parameters:
31
+ negative_prompt: 'blurry, cropped, ugly'
32
+ output:
33
+ url: ./assets/image_3_0.png
34
+ - text: 'A photo-realistic image of a cat'
35
+ parameters:
36
+ negative_prompt: 'blurry, cropped, ugly'
37
+ output:
38
+ url: ./assets/image_4_0.png
39
+ ---
40
+
41
+ # simpletuner-lora
42
+
43
+ This is a LyCORIS adapter derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
44
+
45
+
46
+ The main validation prompt used during training was:
47
+
48
+
49
+
50
+ ```
51
+ A photo-realistic image of a cat
52
+ ```
53
+
54
+ ## Validation settings
55
+ - CFG: `3.0`
56
+ - CFG Rescale: `0.0`
57
+ - Steps: `20`
58
+ - Sampler: `None`
59
+ - Seed: `42`
60
+ - Resolution: `1776x512`
61
+
62
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
63
+
64
+ You can find some example images in the following gallery:
65
+
66
+
67
+ <Gallery />
68
+
69
+ The text encoder **was not** trained.
70
+ You may reuse the base model text encoder for inference.
71
+
72
+
73
+ ## Training settings
74
+
75
+ - Training epochs: 0
76
+ - Training steps: 500
77
+ - Learning rate: 0.0001
78
+ - Effective batch size: 2
79
+ - Micro-batch size: 2
80
+ - Gradient accumulation steps: 1
81
+ - Number of GPUs: 1
82
+ - Prediction type: flow-matching
83
+ - Rescaled betas zero SNR: False
84
+ - Optimizer: optimi-lion
85
+ - Precision: bf16
86
+ - Quantised: Yes: fp8-quanto
87
+ - Xformers: Not used
88
+ - LyCORIS Config:
89
+ ```json
90
+ {
91
+ "algo": "lokr",
92
+ "multiplier": 1.0,
93
+ "linear_dim": 10000,
94
+ "linear_alpha": 1,
95
+ "factor": 16,
96
+ "apply_preset": {
97
+ "target_module": [
98
+ "Attention",
99
+ "FeedForward"
100
+ ],
101
+ "module_algo_map": {
102
+ "Attention": {
103
+ "factor": 16
104
+ },
105
+ "FeedForward": {
106
+ "factor": 8
107
+ }
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ ## Datasets
114
+
115
+ ### garfield
116
+ - Repeats: 0
117
+ - Total number of images: 2206
118
+ - Total number of aspect buckets: 1
119
+ - Resolution: 512 px
120
+ - Cropped: False
121
+ - Crop style: None
122
+ - Crop aspect: None
123
+
124
+
125
+ ## Inference
126
+
127
+
128
+ ```python
129
+ import torch
130
+ from diffusers import DiffusionPipeline
131
+ from lycoris import create_lycoris_from_weights
132
+
133
+ model_id = 'black-forest-labs/FLUX.1-dev'
134
+ adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
135
+ lora_scale = 1.0
136
+ wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
137
+ wrapper.merge_to()
138
+
139
+ prompt = "A photo-realistic image of a cat"
140
+
141
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
142
+ image = pipeline(
143
+ prompt=prompt,
144
+ num_inference_steps=20,
145
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
146
+ width=1776,
147
+ height=512,
148
+ guidance_scale=3.0,
149
+ ).images[0]
150
+ image.save("output.png", format="PNG")
151
+ ```
152
+