Upload config/examples/extract.example.yml with huggingface_hub
Browse files
config/examples/extract.example.yml
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
# this is in yaml format. You can use json if you prefer
|
| 3 |
+
# I like both but yaml is easier to read and write
|
| 4 |
+
# plus it has comments which is nice for documentation
|
| 5 |
+
job: extract # tells the runner what to do
|
| 6 |
+
config:
|
| 7 |
+
# the name will be used to create a folder in the output folder
|
| 8 |
+
# it will also replace any [name] token in the rest of this config
|
| 9 |
+
name: name_of_your_model
|
| 10 |
+
# can be hugging face model, a .ckpt, or a .safetensors
|
| 11 |
+
base_model: "/path/to/base/model.safetensors"
|
| 12 |
+
# can be hugging face model, a .ckpt, or a .safetensors
|
| 13 |
+
extract_model: "/path/to/model/to/extract/trained.safetensors"
|
| 14 |
+
# we will create folder here with name above so. This will create /path/to/output/folder/name_of_your_model
|
| 15 |
+
output_folder: "/path/to/output/folder"
|
| 16 |
+
is_v2: false
|
| 17 |
+
dtype: fp16 # saved dtype
|
| 18 |
+
device: cpu # cpu, cuda:0, etc
|
| 19 |
+
|
| 20 |
+
# processes can be chained like this to run multiple in a row
|
| 21 |
+
# they must all use same models above, but great for testing different
|
| 22 |
+
# sizes and typed of extractions. It is much faster as we already have the models loaded
|
| 23 |
+
process:
|
| 24 |
+
# process 1
|
| 25 |
+
- type: locon # locon or lora (locon is lycoris)
|
| 26 |
+
filename: "[name]_64_32.safetensors" # will be put in output folder
|
| 27 |
+
dtype: fp16
|
| 28 |
+
mode: fixed
|
| 29 |
+
linear: 64
|
| 30 |
+
conv: 32
|
| 31 |
+
|
| 32 |
+
# process 2
|
| 33 |
+
- type: locon
|
| 34 |
+
output_path: "/absolute/path/for/this/output.safetensors" # can be absolute
|
| 35 |
+
mode: ratio
|
| 36 |
+
linear: 0.2
|
| 37 |
+
conv: 0.2
|
| 38 |
+
|
| 39 |
+
# process 3
|
| 40 |
+
- type: locon
|
| 41 |
+
filename: "[name]_ratio_02.safetensors"
|
| 42 |
+
mode: quantile
|
| 43 |
+
linear: 0.5
|
| 44 |
+
conv: 0.5
|
| 45 |
+
|
| 46 |
+
# process 4
|
| 47 |
+
- type: lora # traditional lora extraction (lierla) with linear layers only
|
| 48 |
+
filename: "[name]_4.safetensors"
|
| 49 |
+
mode: fixed # fixed, ratio, quantile supported for lora as well
|
| 50 |
+
linear: 4 # lora dim or rank
|
| 51 |
+
# no conv for lora
|
| 52 |
+
|
| 53 |
+
# process 5
|
| 54 |
+
- type: lora
|
| 55 |
+
filename: "[name]_q05.safetensors"
|
| 56 |
+
mode: quantile
|
| 57 |
+
linear: 0.5
|
| 58 |
+
|
| 59 |
+
# you can put any information you want here, and it will be saved in the model
|
| 60 |
+
# the below is an example. I recommend doing trigger words at a minimum
|
| 61 |
+
# in the metadata. The software will include this plus some other information
|
| 62 |
+
meta:
|
| 63 |
+
name: "[name]" # [name] gets replaced with the name above
|
| 64 |
+
description: A short description of your model
|
| 65 |
+
trigger_words:
|
| 66 |
+
- put
|
| 67 |
+
- trigger
|
| 68 |
+
- words
|
| 69 |
+
- here
|
| 70 |
+
version: '0.1'
|
| 71 |
+
creator:
|
| 72 |
+
name: Your Name
|
| 73 |
+
email: your@email.com
|
| 74 |
+
website: https://yourwebsite.com
|
| 75 |
+
any: All meta data above is arbitrary, it can be whatever you want.
|