markury commited on
Commit
463e16e
·
verified ·
1 Parent(s): 7d02ac3

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +161 -0
README.md ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 scene from the animated Studio Ghibli movie Spirited Away, a girl is sitting with an orange cat in a grass field with buildings in the background'
20
+ parameters:
21
+ negative_prompt: 'blurry, cropped, ugly'
22
+ output:
23
+ url: ./assets/image_1_0.png
24
+ ---
25
+
26
+ # spirited-away-flux
27
+
28
+ This is a LyCORIS adapter derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
29
+
30
+
31
+ The main validation prompt used during training was:
32
+
33
+
34
+
35
+ ```
36
+ A scene from the animated Studio Ghibli movie Spirited Away, a girl is sitting with an orange cat in a grass field with buildings in the background
37
+ ```
38
+
39
+ ## Validation settings
40
+ - CFG: `3.0`
41
+ - CFG Rescale: `0.0`
42
+ - Steps: `20`
43
+ - Sampler: `None`
44
+ - Seed: `42`
45
+ - Resolution: `1024x1024`
46
+
47
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
48
+
49
+ You can find some example images in the following gallery:
50
+
51
+
52
+ <Gallery />
53
+
54
+ The text encoder **was not** trained.
55
+ You may reuse the base model text encoder for inference.
56
+
57
+
58
+ ## Training settings
59
+
60
+ - Training epochs: 0
61
+ - Training steps: 100
62
+ - Learning rate: 0.003
63
+ - Effective batch size: 8
64
+ - Micro-batch size: 8
65
+ - Gradient accumulation steps: 1
66
+ - Number of GPUs: 1
67
+ - Prediction type: flow-matching
68
+ - Rescaled betas zero SNR: False
69
+ - Optimizer: adamw_schedulefree
70
+ - Precision: bf16
71
+ - Quantised: No
72
+ - Xformers: Not used
73
+ - LyCORIS Config:
74
+ ```json
75
+ {
76
+ "algo": "lokr",
77
+ "multiplier": 1.0,
78
+ "linear_dim": 10000,
79
+ "linear_alpha": 1,
80
+ "factor": 16,
81
+ "apply_preset": {
82
+ "target_module": [
83
+ "Attention",
84
+ "FeedForward"
85
+ ],
86
+ "module_algo_map": {
87
+ "Attention": {
88
+ "factor": 16
89
+ },
90
+ "FeedForward": {
91
+ "factor": 8
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ ## Datasets
99
+
100
+ ### spirited away 1024
101
+ - Repeats: 0
102
+ - Total number of images: 379
103
+ - Total number of aspect buckets: 1
104
+ - Resolution: 1.048576 megapixels
105
+ - Cropped: True
106
+ - Crop style: center
107
+ - Crop aspect: square
108
+ ### spirited away 512
109
+ - Repeats: 0
110
+ - Total number of images: 379
111
+ - Total number of aspect buckets: 1
112
+ - Resolution: 0.262144 megapixels
113
+ - Cropped: True
114
+ - Crop style: center
115
+ - Crop aspect: square
116
+ ### spirited away 768
117
+ - Repeats: 0
118
+ - Total number of images: 379
119
+ - Total number of aspect buckets: 1
120
+ - Resolution: 0.589824 megapixels
121
+ - Cropped: True
122
+ - Crop style: center
123
+ - Crop aspect: square
124
+ ### uncropped
125
+ - Repeats: 0
126
+ - Total number of images: 379
127
+ - Total number of aspect buckets: 1
128
+ - Resolution: 0.589824 megapixels
129
+ - Cropped: False
130
+ - Crop style: None
131
+ - Crop aspect: None
132
+
133
+
134
+ ## Inference
135
+
136
+
137
+ ```python
138
+ import torch
139
+ from diffusers import DiffusionPipeline
140
+ from lycoris import create_lycoris_from_weights
141
+
142
+ model_id = 'black-forest-labs/FLUX.1-dev'
143
+ adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
144
+ lora_scale = 1.0
145
+ wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
146
+ wrapper.merge_to()
147
+
148
+ prompt = "A scene from the animated Studio Ghibli movie Spirited Away, a girl is sitting with an orange cat in a grass field with buildings in the background"
149
+
150
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
151
+ image = pipeline(
152
+ prompt=prompt,
153
+ num_inference_steps=20,
154
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
155
+ width=1024,
156
+ height=1024,
157
+ guidance_scale=3.0,
158
+ ).images[0]
159
+ image.save("output.png", format="PNG")
160
+ ```
161
+