Fanghua-Yu / SUPIR

SUPIR aims at developing Practical Algorithms for Photo-Realistic Image Restoration In the Wild

Home Page:http://supir.xpixel.group/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"LLaVA is not available. Please add text manually."

Sumsar3 opened this issue · comments

I'm trying to get LLaVA to work in SUPIR but I'm not able to do it. I downloaded the folders (143GB lol) and move it to the models folder:

2024-03-06 195113

Then I set the paths on CKPT_PTH.py:

2024-03-06 195010

I run gradio with python gradio_demo.py --use_tile_vae --use_image_slider --loading_half_params --load_8bit_llava

When I'm into gradio and I click on "LLaVA run" I get this error on Prompt Box:

2024-03-06 195848

No errors on cmd window.

What I'm doing wrong? Thanks.

This prompt is occurred when use_llava = False:

SUPIR/gradio_demo.py

Lines 75 to 83 in bca9a72

def llave_process(input_image, temperature, top_p, qs=None):
torch.cuda.set_device(LLaVA_device)
if use_llava:
LQ = HWC3(input_image)
LQ = Image.fromarray(LQ.astype('uint8'))
captions = llava_agent.gen_image_caption([LQ], temperature=temperature, top_p=top_p, qs=qs)
else:
captions = ['LLaVA is not available. Please add text manually.']
return captions[0]

It should be true with your gradio setting. Try to find something wrong with this variant. (sync the repo first)

Closing the issue since was a gradio problem. Thanks!