If you "mess up" your Python virtual environment (venv), such as installing Extensions that cause package version conflicts, one of the easiest way to solve this is to delete the venv folder and let the Webui reinstall everything again. However, currently there is no way to reinstall specifically the requirements for Spaces, other than completely uninstall and install again, which includes wiping and cloning the Space repo again as well. And certain repo is quite large in size (eg. The repo for IDM-VTON is close to 1 GB), so this approach might not be ideal.
PR
Make the Install button show as Reinstall if the Space is installed and a requiremenets.txt file exists; otherwise behave like how it currently works.
Set force_download to False so that it will not clone the entire repo again if the files already present
Context
If you "mess up" your Python virtual environment (
venv
), such as installing Extensions that cause package version conflicts, one of the easiest way to solve this is to delete thevenv
folder and let the Webui reinstall everything again. However, currently there is no way to reinstall specifically the requirements for Spaces, other than completely uninstall and install again, which includes wiping and cloning the Space repo again as well. And certain repo is quite large in size (eg. The repo forIDM-VTON
is close to 1 GB), so this approach might not be ideal.PR
Install
button show asReinstall
if the Space is installed and arequiremenets.txt
file exists; otherwise behave like how it currently works.force_download
toFalse
so that it will not clone the entire repo again if the files already present