| |
|
|
| $save_precision = "fp16" |
| $new_rank = 4 |
| $model = "./output/lora_name.safetensors" |
| $save_to = "./output/lora_name_new.safetensors" |
| $device = "cuda" |
| $verbose = 1 |
| $dynamic_method = "" |
| $dynamic_param = "" |
|
|
|
|
| |
| .\venv\Scripts\activate |
|
|
| $Env:HF_HOME = "huggingface" |
| $ext_args = [System.Collections.ArrayList]::new() |
|
|
| if ($verbose) { |
| [void]$ext_args.Add("--verbose") |
| } |
|
|
| if ($dynamic_method) { |
| [void]$ext_args.Add("--dynamic_method=" + $dynamic_method) |
| } |
|
|
| if ($dynamic_param) { |
| [void]$ext_args.Add("--dynamic_param=" + $dynamic_param) |
| } |
|
|
| |
| accelerate launch --num_cpu_threads_per_process=8 "./sd-scripts/networks/resize_lora.py" ` |
| --save_precision=$save_precision ` |
| --new_rank=$new_rank ` |
| --model=$model ` |
| --save_to=$save_to ` |
| --device=$device ` |
| $ext_args |
|
|
| Write-Output "Resize finished" |
| Read-Host | Out-Null ; |
|
|