adding comfy python in .env

This commit is contained in:
Apple
2024-03-07 07:20:53 +05:30
parent 1550bdec7d
commit fead250f55
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -1 +1,2 @@
CLIPDROP_API_KEY=
CLIPDROP_API_KEY=
COMFY_PYTHON_PATH=/home/ubuntu/.conda/envs/comfy/bin/python
+5 -1
View File
@@ -109,8 +109,12 @@ class TRI3DATRParseBatch:
# Run the ATR model
cwd = os.getcwd()
os.chdir(ATR_PATH)
from dotenv import load_dotenv
load_dotenv()
COMFY_PYTHON_PATH = os.getenv('COMFY_PYTHON_PATH','python')
print("python path ", COMFY_PYTHON_PATH)
os.system(
"python simple_extractor.py --dataset atr --model-restore checkpoints/atr.pth --input-dir input --output-dir output"
COMFY_PYTHON_PATH + " simple_extractor.py --dataset atr --model-restore checkpoints/atr.pth --input-dir input --output-dir output"
)
os.chdir(cwd)