pull/498/head
Akegarasu 2024-08-30 19:59:14 +08:00
parent 274f8c9da9
commit e319e7c90b
No known key found for this signature in database
GPG Key ID: DACA951FEBA569A2
5 changed files with 7 additions and 5 deletions

2
.gitignore vendored
View File

@ -7,6 +7,8 @@ __pycache__
output/*
!output/.keep
assets/config.json
py310
python
git

View File

@ -13,7 +13,7 @@ RUN git clone --recurse-submodules https://github.com/Akegarasu/lora-scripts
WORKDIR /app/lora-scripts
RUN pip install xformers==0.0.27.post2 --no-deps && pip install -r requirements.txt
WORKDIR /app/lora-scripts/sd-scripts
WORKDIR /app/lora-scripts/scripts
RUN pip install -r requirements.txt
WORKDIR /app/lora-scripts

View File

@ -119,7 +119,7 @@ async def run_script(request: Request, background_tasks: BackgroundTasks):
value = f'"{v}"'
result.append(value)
script_args = " ".join(result)
script_path = Path(os.getcwd()) / "sd-scripts" / script_name
script_path = Path(os.getcwd()) / "scripts" / script_name
cmd = f"{launch_utils.python_bin} {script_path} {script_args}"
background_tasks.add_task(launch_utils.run, cmd)
return APIResponseSuccess()

View File

@ -31,7 +31,7 @@ if ($new_conv_rank) {
}
# run svd_merge
accelerate launch --num_cpu_threads_per_process=8 "./sd-scripts/networks/svd_merge_lora.py" `
accelerate launch --num_cpu_threads_per_process=8 "./scripts/networks/svd_merge_lora.py" `
--save_precision=$save_precision `
--precision=$precision `
--new_rank=$new_rank `

View File

@ -46,7 +46,7 @@
},
"outputs": [],
"source": [
"!accelerate launch --num_cpu_threads_per_process=8 \"./sd-scripts/train_network.py\" \\\n",
"!accelerate launch --num_cpu_threads_per_process=8 \"./scripts/train_network.py\" \\\n",
" --enable_bucket \\\n",
" --pretrained_model_name_or_path=$pretrained_model \\\n",
" --train_data_dir=$train_data_dir \\\n",
@ -96,4 +96,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}