diff --git a/StableDiffusionUI_Voldemort_paperspace.ipynb b/StableDiffusionUI_Voldemort_paperspace.ipynb index 507658f..5091d54 100644 --- a/StableDiffusionUI_Voldemort_paperspace.ipynb +++ b/StableDiffusionUI_Voldemort_paperspace.ipynb @@ -126,8 +126,7 @@ " !git clone \"{repo_clone_url}\" \"{path}\"\n", " else:\n", " print(f'{repo_clone_url.split(\"/\")[-1]} already downloaded, updating...')\n", - " %cd \"{path}\"\n", - " !git pull\n", + " !cd \"{path}\" && git pull\n", "\n", "def init_free():\n", " if (free_tier and repo_storage_dir != '/notebooks'):\n", @@ -189,9 +188,10 @@ "# See https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts\n", "import os\n", "import shutil\n", + "import requests\n", "!pip install moviepy==1.0.3\n", "!apt update\n", - "!apt install -y potrace\n", + "!apt install -y potrace python3-tk\n", "\n", "def download_file_dir(url, output_dir):\n", " # output_dir must have a trailing slash\n", @@ -206,7 +206,6 @@ "custom_scripts = [\n", " 'https://raw.githubusercontent.com/GRMrGecko/stable-diffusion-webui-automatic/advanced_matrix/scripts/advanced_prompt_matrix.py',\n", " 'https://raw.githubusercontent.com/jtkelm2/stable-diffusion-webui-1/master/scripts/wildcards.py',\n", - " 'https://raw.githubusercontent.com/ThereforeGames/txt2img2img/main/scripts/txt2img2img.py',\n", " 'https://raw.githubusercontent.com/dfaker/stable-diffusion-webui-cv2-external-masking-script/main/external_masking.py',\n", " 'https://raw.githubusercontent.com/memes-forever/Stable-diffusion-webui-video/main/videos.py',\n", " 'https://raw.githubusercontent.com/yownas/seed_travel/main/scripts/seed_travel.py',\n", @@ -224,15 +223,18 @@ " download_file_dir(item, f'{repo_storage_dir}/stable-diffusion-webui/scripts/')\n", " print(f'{item.split(\"/\")[-1]} downloaded...')\n", "\n", + "# Download and set up txt2img2img\n", + "update_repo_if_not_exists(f'{repo_storage_dir}/stable-diffusion-webui/txt2img2img_root', 'https://github.com/ThereforeGames/txt2img2img.git')\n", + "!cp -r \"{repo_storage_dir}/stable-diffusion-webui/txt2img2img_root/scripts\" \"{repo_storage_dir}/stable-diffusion-webui\"\n", + "!cp -r \"{repo_storage_dir}/stable-diffusion-webui/txt2img2img_root/txt2img2img\" \"{repo_storage_dir}/stable-diffusion-webui\"\n", + "!cp -r \"{repo_storage_dir}/stable-diffusion-webui/txt2img2img_root/venv\" \"{repo_storage_dir}/stable-diffusion-webui\"\n", + " \n", "# Download and set up txt2mask\n", "update_repo_if_not_exists(f'{repo_storage_dir}/stable-diffusion-webui/txt2mask', 'https://github.com/ThereforeGames/txt2mask.git')\n", "!cp -r \"{repo_storage_dir}/stable-diffusion-webui/txt2mask/repositories/clipseg\" \"{repo_storage_dir}/stable-diffusion-webui/repositories\"\n", - "txt2mask_source = f'{repo_storage_dir}/stable-diffusion-webui/txt2mask/scripts/'\n", - "for file in os.listdir(txt2mask_source):\n", - " src = os.path.join(txt2mask_source, file)\n", - " if os.path.isfile(src):\n", - " shutil.copy(src, f'{repo_storage_dir}/stable-diffusion-webui/scripts/')\n", + "!cp -r \"{repo_storage_dir}/stable-diffusion-webui/txt2mask/scripts/\" \"{repo_storage_dir}/stable-diffusion-webui/\"\n", "\n", + "# Do the wildcard script\n", "!mkdir -p \"{repo_storage_dir}/stable-diffusion-webui/scripts/wildcards\"\n", "wildcard_lists = [\n", " 'https://raw.githubusercontent.com/jtkelm2/stable-diffusion-webui-1/master/scripts/wildcards/adjective.txt',\n",