Fanghua-Yu / SUPIR

SUPIR aims at developing Practical Algorithms for Photo-Realistic Image Restoration In the Wild. Our new online demo is also released at suppixel.ai.
http://supir.xpixel.group/
Other
4.22k stars 372 forks source link

Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/opt/clip-vit-large-patch14' #23

Open nbansal90 opened 7 months ago

nbansal90 commented 7 months ago

I am trying to run inference:

python test.py --img_dir './inputs/' --save_dir ./results --SUPIR_sign Q --upscale 2

Getting this error: huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/opt/clip-vit-large-patch14'. Use `repo_type` argument if needed.

I presume this looks like this has something to do with location, but not sure what changes should be done?

Path For the downloaded models. LLAVA_CLIP_PATH = '/opt/clip-vit-large-patch14-336' LLAVA_MODEL_PATH = '/opt/llava-v1.5-13b' SDXL_CLIP1_PATH = '/opt/clip-vit-large-patch14' SDXL_CLIP2_CACHE_DIR = '/opt/CLIP-ViT-bigG-14-laion2B-39B-b160k/'

Regards Nitin

Fanghua-Yu commented 7 months ago

Hello, please update this repo and try to modify CKPT_PTH.py like this:

LLAVA_CLIP_PATH = '/opt/clip-vit-large-patch14-336'
LLAVA_MODEL_PATH = '/opt/llava-v1.5-13b'
SDXL_CLIP1_PATH = '/opt/clip-vit-large-patch14'
SDXL_CLIP2_CACHE_DIR = '/opt/CLIP-ViT-bigG-14-laion2B-39B-b160k/open_clip_pytorch_model.bin'
mashoutsider commented 6 months ago

Same problem. Not sure why the proposed solution above would work... seems to be changing SDXL_CLIP2_CKPT_PTH to SDXL_CLIP2_CACHE_DIR in CKPT_PTH.py, but the problem seems to stem from SDXL_CLIP1_PATH

nbansal90 commented 6 months ago

So, I updated my paths to the following and it worked for me:


LLAVA_CLIP_PATH = './opt/LLaVA1.5/clip-vit-large-patch14-336'
LLAVA_MODEL_PATH = './opt/LLaVA1.5 /llava-v1.5-13b'
SDXL_CLIP1_PATH = './opt/clip-vit-large-patch14'
SDXL_CLIP2_CACHE_DIR = './opt/CLIP-ViT-bigG-14-laion2B-39B-b160k/' ```
mashoutsider commented 6 months ago

Thanks.. that makes sense. I had some luck with

LLAVA_CLIP_PATH = './opt/LLaVA1.5/clip-vit-large-patch14-336' LLAVA_MODEL_PATH = 'opt/LLaVA1.5 /llava-v1.5-13b' SDXL_CLIP1_PATH = 'opt/clip-vit-large-patch14' SDXL_CLIP2_CACHE_DIR = 'opt/CLIP-ViT-bigG-14-laion2B-39B-b160k/'

Seems like a leading / is what causes the issue