24 lines
1.0 KiB
Batchfile
24 lines
1.0 KiB
Batchfile
|
:: 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"
|