Otter Pupp commited on
Commit
9b6ab2d
1 Parent(s): 0d8b050

add lora extraction script

Browse files
Files changed (1) hide show
  1. loras/extract_lora.sh +21 -0
loras/extract_lora.sh ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ cd ~/sd/kohya-sd-scripts
3
+ # ./venv/bin/pip install --upgrade pip
4
+ # ./venv/bin/pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
5
+ # ./venv/bin/pip install --upgrade xformers
6
+
7
+ # ./venv/bin/python networks/extract_lora_from_models.py -h
8
+ ./venv/bin/python networks/extract_lora_from_models.py \
9
+ --model_org ~/sd/ComfyUI/models/checkpoints/v1-5-pruned-emaonly.safetensors \
10
+ --model_tuned ~/sd/ComfyUI/models/checkpoints/spin-diffusion-v3-sd15.safetensors \
11
+ --dim 256 \
12
+ --save_precision fp16 \
13
+ --save_to ~/sd/ComfyUI/models/loras/spin-diffusion-v3-256.ckpt
14
+
15
+
16
+ ./venv/bin/python networks/extract_lora_from_models.py \
17
+ --model_org ~/sd/ComfyUI/models/checkpoints/v1-5-pruned-emaonly.safetensors \
18
+ --model_tuned ~/sd/ComfyUI/models/checkpoints/spin-diffusion-v3-sd15.safetensors \
19
+ --dim 128 \
20
+ --save_precision fp16 \
21
+ --save_to ~/sd/ComfyUI/models/loras/spin-diffusion-v3-128.ckpt