From 6990badb8bba86dd796fb0ce484e1dfbfb7e7edd Mon Sep 17 00:00:00 2001 From: moshferatu Date: Sun, 21 Apr 2024 05:18:23 -0700 Subject: [PATCH] Add script to recreate model / checkpoint symlinks when updating ComfyUI --- comfyui_symlinks.bat | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 comfyui_symlinks.bat diff --git a/comfyui_symlinks.bat b/comfyui_symlinks.bat new file mode 100644 index 0000000..0e70df1 --- /dev/null +++ b/comfyui_symlinks.bat @@ -0,0 +1,24 @@ +:: When ComfyUI updates, existing symlinks are removed. This script recreates them. + +@echo off + +set source=D:\Models\Stable Diffusion\Models +set target=D:\Models\Stable Diffusion\Web UIs\ComfyUI\ComfyUI\models + +if exist "%target%\checkpoints" rmdir /s /q "%target%\checkpoints" +if exist "%target%\clip" rmdir /s /q "%target%\clip" +if exist "%target%\clip_vision" rmdir /s /q "%target%\clip_vision" +if exist "%target%\controlnet" rmdir /s /q "%target%\controlnet" +if exist "%target%\ipadapter" rmdir /s /q "%target%\ipadapter" +if exist "%target%\loras" rmdir /s /q "%target%\loras" +if exist "%target%\unet" rmdir /s /q "%target%\unet" +if exist "%target%\vae" rmdir /s /q "%target%\vae" + +mklink /D "%target%\checkpoints" "%source%\checkpoints" +mklink /D "%target%\clip" "%source%\clip" +mklink /D "%target%\clip_vision" "%source%\clip_vision" +mklink /D "%target%\controlnet" "%source%\controlnet" +mklink /D "%target%\ipadapter" "%source%\ipadapter" +mklink /D "%target%\loras" "%source%\loras" +mklink /D "%target%\unet" "%source%\unet" +mklink /D "%target%\vae" "%source%\vae" \ No newline at end of file