change user def clip to option

This commit is contained in:
KarryCharon
2024-06-02 23:24:14 +08:00
parent 628935481b
commit 81744e656e
+3 -1
View File
@@ -17,7 +17,9 @@ if system() == "Darwin":
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
os.environ["HF_HOME"] = "~/.cache/huggingface"
os.environ["XFORMERS_FORCE_DISABLE_TRITON"] = "1"
os.environ["USER_DEF_CLIP"] = Path(__file__).parent.joinpath("models/open_clip_pytorch_model.bin").as_posix()
USER_DEF_CLIP = Path(__file__).parent.joinpath("models/open_clip_pytorch_model.bin")
if USER_DEF_CLIP.exists():
os.environ["USER_DEF_CLIP"] = USER_DEF_CLIP.as_posix()
# os.environ["no_proxy"] = "localhost, 127.0.0.1, ::1"
ROOT = Path(__file__).parent.joinpath("ToonCrafter")