Fix AdaBins model installation

pull/33/head
Adam Letts 3 years ago
parent 0bfbd5c530
commit 753dbeae31
  1. 8
      Disco_Diffusion.ipynb
  2. 8
      disco.py

@ -577,10 +577,10 @@
" except:\n",
" if os.path.exists(\"AdaBins\") is not True:\n",
" gitclone(\"https://github.com/shariqfarooq123/AdaBins.git\")\n",
" if not os.path.exists(f'{model_path}/pretrained/AdaBins_nyu.pt'):\n",
" os.makedirs(f'{model_path}/pretrained')\n",
" wget(\"https://cloudflare-ipfs.com/ipfs/Qmd2mMnDLWePKmgfS8m6ntAg4nhV5VkUyAydYBp8cWWeB7/AdaBins_nyu.pt\", f'{model_path}/pretrained')\n",
" sys.path.append(f'{os.getcwd()}/AdaBins')\n",
" if not os.path.exists(f'{PROJECT_DIR}/pretrained/AdaBins_nyu.pt'):\n",
" createPath(f'{PROJECT_DIR}/pretrained')\n",
" wget("https://cloudflare-ipfs.com/ipfs/Qmd2mMnDLWePKmgfS8m6ntAg4nhV5VkUyAydYBp8cWWeB7/AdaBins_nyu.pt", f'{PROJECT_DIR}/pretrained')\n",
" sys.path.append(f'{PROJECT_DIR}/AdaBins')\n",
" from infer import InferenceHelper\n",
" MAX_ADABINS_AREA = 500000\n",
"\n",

@ -549,10 +549,10 @@ if USE_ADABINS:
except:
if os.path.exists("AdaBins") is not True:
gitclone("https://github.com/shariqfarooq123/AdaBins.git")
if not os.path.exists(f'{model_path}/pretrained/AdaBins_nyu.pt'):
os.makedirs(f'{model_path}/pretrained')
wget("https://cloudflare-ipfs.com/ipfs/Qmd2mMnDLWePKmgfS8m6ntAg4nhV5VkUyAydYBp8cWWeB7/AdaBins_nyu.pt", f'{model_path}/pretrained')
sys.path.append(f'{os.getcwd()}/AdaBins')
if not os.path.exists(f'{PROJECT_DIR}/pretrained/AdaBins_nyu.pt'):
createPath(f'{PROJECT_DIR}/pretrained')
wget("https://cloudflare-ipfs.com/ipfs/Qmd2mMnDLWePKmgfS8m6ntAg4nhV5VkUyAydYBp8cWWeB7/AdaBins_nyu.pt", f'{PROJECT_DIR}/pretrained')
sys.path.append(f'{PROJECT_DIR}/AdaBins')
from infer import InferenceHelper
MAX_ADABINS_AREA = 500000

Loading…
Cancel
Save