AILab-CVC / GPT4Tools

GPT4Tools is an intelligent system that can automatically decide, control, and utilize different visual foundation models, allowing the user to interact with images during a conversation.
http://gpt4tools.github.io
Other
753 stars 55 forks source link

Encountered [error 11001] getaddrinfo failed #10

Open PeterL-1111 opened 1 year ago

PeterL-1111 commented 1 year ago

The original script defined local url: demo.launch(server_name="0.0.0.0", server_port=80)

but I could not open it, I tried to modify the url to demo.launch(server_name="http://127.0.0.1", server_port=7860) which works on stable diffusion on my machine,

then I get the [error 11001] getaddrinfo failed Screenshot 2023-04-28 140134

Please advise, help me😅

Yangr116 commented 1 year ago

Hi, please try this one :demo.launch(server_name="0.0.0.0", server_port=7860).

The port 7860 shouldn't be occupied and closed. You can use lsof -i:7860 to check it. Additionally, the port should be opened. If the port is closed, you should use the sudo ufw allow ${your port} in ubuntu.

PeterL-1111 commented 1 year ago

Thank you!!

I changed to that and it worked with a bit modification, instead of opening the 0.0.0.0:7860, I was able get to the gradio using http://localhost:7860/

The new issues is I get stuck on "Entering new AgentExecutor chain" after giving instruction such as "change background" or "Generate an image of a happy vicuna running in the grass"(in the demo example)

I was using the command line provided in the demo python gpt4tools.py --base_model E:\vicuna\LLaMA --lora_model E:\vicuna\GPT4Tools\lora_weight --llm_device "cpu" --load "Text2Box_cuda:0,Segmenting_cuda:0,Inpainting_cuda:0,ImageCaptioning_cuda:0"

image

image

Yangr116 commented 1 year ago

This may be your cpu memory is not enough. You can change the llama to 8bit during loading following here.

PeterL-1111 commented 1 year ago

Thank you for the reply!!

I tried to add the 8bit to True and device map to auto, but I encountered this error here. Could you please advise? image image

Also, my gradio interface is different from the demo, could you let me know how to get the options in the demo?(1st one is demo, 2nd one is my interface) image image

Yangr116 commented 1 year ago

Can you remove the device_map='auto'?

The gradio interface used in the demo will be released.

PeterL-1111 commented 1 year ago

I see, and I tried the fix, but it returned this error instead, it looks like there is some compatibility with the 8bit format image