Skip to content
New issue

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

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

Already on GitHub? # to your account

processor = Processor('depth_zoe'), processed_image = processor(init_image, to_pil=True) error #111

Open
sanerone695 opened this issue Aug 6, 2024 · 3 comments

Comments

@sanerone695
Copy link

sanerone695 commented Aug 6, 2024

import requests
from PIL import Image
from io import BytesIO

from controlnet_aux.processor import Processor

url = "https://huggingface.co/lllyasviel/sd-controlnet-openpose/resolve/main/images/pose.png"
response = requests.get(url)
img = Image.open(BytesIO(response.content)).convert("RGB")

processor_id = 'depth_zoe'
processor = Processor(processor_id)

processed_image = processor(img, to_pil=True)

TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int64'>, <class 'numpy.int64'>]

@asomoza
Copy link
Member

asomoza commented Aug 7, 2024

this is a numpy known problem, the only fix right now is to downgrade numpy to a < 2.0 version

@sanerone695
Copy link
Author

The current numpy version is 1.26.2

@asomoza
Copy link
Member

asomoza commented Aug 7, 2024

I can't reproduce your error then, with just a copy & paste of your exact code and with numpy 1.26.4 it works without any issue.

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

No branches or pull requests

2 participants