Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some questions about run this demo #9

Open
gecade opened this issue Dec 20, 2024 · 11 comments
Open

Some questions about run this demo #9

gecade opened this issue Dec 20, 2024 · 11 comments

Comments

@gecade
Copy link

gecade commented Dec 20, 2024

I followed your instructions and said that after completing the environment configuration and model download step by step, I can now successfully launch the Gradio page, but when I upload an image, enter the Prompt and click run, I keep getting the error "gradio.exceptions.Error: 'Please select the correct VLM model and input the correct API Key first!'", I chose my local llama3-llava-next-8b-hf model, but throwing it gives an error, and by the way, the same error now appears on the HuggingFace demo

@liyaowei-stu
Copy link
Collaborator

I just tested the gradio online demo, and it runs normally.
image

Have you switched to any vlm model other than gpt4-o?

@liyaowei-stu
Copy link
Collaborator

If you want to use GPT4o, after you enter the GPT4-o API key and click submit, a success indicator will appear in the input box, at which point you can use gpt4o permanently.

@liyaowei-stu
Copy link
Collaborator

https://github.com/TencentARC/BrushEdit/blob/main/app/src/vlm_template.py

At the same time, you can check the paths of different vlm in this file.

@gecade
Copy link
Author

gecade commented Dec 23, 2024

ok I can use the Qwen2-VL-7B-Instruct (Default) ,but now when I run this code locally, I type in the prompt "remove the frog" followed by ./src/brushedit_all_in_one_pipeline.py
original_image = cv2.resize(original_image, (width_new, height_new)) will report an error indicating the cause
cv2.error: OpenCV(4.10.0) 👎 error: (-5:Bad argument) in function 'resize'

Overload resolution

  • src is not a numpy array, neither a scalar
  • Expected Ptrcv::UMat for argument 'src'

@liyaowei-stu
Copy link
Collaborator

I can use qwen-vl and input on both local and online demos when input "remove the frog". Please provide more information so that I can reproduce this error. It seems that the image has not been loaded normally, or the correct size has not been specified.

@mrlihellohorld
Copy link

image
image
I encountered the same problem, in the gradio online demo

@liyaowei-stu
Copy link
Collaborator

ok, I will check and repair it. Please wait a moment. Thank you.

@gecade
Copy link
Author

gecade commented Dec 24, 2024

My prompt is "remove the frog" and the resulting image is

Image_20241224160242
Image_20241224160250
Is this normal?

@liyaowei-stu
Copy link
Collaborator

You should click 'Dilation Generated Mask' to correctly dilate mask, preventing the leakage of frog information in the mask area.

@gecade
Copy link
Author

gecade commented Dec 24, 2024

You should click 'Dilation Generated Mask' to correctly dilate mask, preventing the leakage of frog information in the mask area.

Is there no way to generate the correct image by directly clicking run?

@liyaowei-stu
Copy link
Collaborator

In fact, I can appropriately automatically dilate the mask during the remove operation, and I will update the code. This will enhance automation capabilities. Stay tuned, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants