Apply suggestions from code review

Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com>
This commit is contained in:
Mahmoud Ashraf Mahmoud 2024-02-05 13:41:03 +02:00 committed by GitHub
parent d4d3b44d85
commit 7fb4a701f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,7 +39,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# put the link of the model you want to download (checkpoint or LoRA)\n", "# put the link of the model you want to download (checkpoint or LoRA)\n",
"# link can specify a version id and if not specified the newest version will be downloaded\n", "# link can specify a version id and if not specified the latest version will be downloaded\n",
"# url example without version id: https://civitai.com/models/133005/juggernaut-xl\n", "# url example without version id: https://civitai.com/models/133005/juggernaut-xl\n",
"# url example with version id: https://civitai.com/models/133005?modelVersionId=252902\n", "# url example with version id: https://civitai.com/models/133005?modelVersionId=252902\n",
"\n", "\n",
@ -51,7 +51,7 @@
"from urllib.parse import parse_qs\n", "from urllib.parse import parse_qs\n",
"\n", "\n",
"allowed_types = ['Checkpoint', 'LORA']\n", "allowed_types = ['Checkpoint', 'LORA']\n",
"save_loactions = {\n", "save_locations = {\n",
" 'Checkpoint': '/content/Fooocus/models/checkpoints',\n", " 'Checkpoint': '/content/Fooocus/models/checkpoints',\n",
" 'LORA': '/content/Fooocus/models/loras'\n", " 'LORA': '/content/Fooocus/models/loras'\n",
"}\n", "}\n",
@ -98,7 +98,7 @@
"download_url = primary_file.get('downloadUrl')\n", "download_url = primary_file.get('downloadUrl')\n",
"file_name = primary_file.get('name')\n", "file_name = primary_file.get('name')\n",
"\n", "\n",
"LOCATION = save_loactions[model_type]\n", "LOCATION = save_locations[model_type]\n",
"%cd $LOCATION\n", "%cd $LOCATION\n",
"\n", "\n",
"model_name = data.get('name')\n", "model_name = data.get('name')\n",