lllyasviel / Paints-UNDO

Understand Human Behavior to Align True Needs
Apache License 2.0
3.49k stars 310 forks source link

src is not a numpy array, neither a scalar #63

Open Cokeheart opened 4 months ago

Cokeheart commented 4 months ago

Traceback (most recent call last): File "C:\Users\josep.conda\envs\paints_undo\lib\site-packages\gradio\queueing.py", line 528, in process_events response = await route_utils.call_process_api( File "C:\Users\josep.conda\envs\paints_undo\lib\site-packages\gradio\route_utils.py", line 270, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\josep.conda\envs\paints_undo\lib\site-packages\gradio\blocks.py", line 1908, in process_api result = await self.call_function( File "C:\Users\josep.conda\envs\paints_undo\lib\site-packages\gradio\blocks.py", line 1485, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\josep.conda\envs\paints_undo\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "C:\Users\josep.conda\envs\paints_undo\lib\site-packages\anyio_backends_asyncio.py", line 2177, in run_sync_in_worker_thread return await future File "C:\Users\josep.conda\envs\paints_undo\lib\site-packages\anyio_backends_asyncio.py", line 859, in run result = context.run(func, args) File "C:\Users\josep.conda\envs\paints_undo\lib\site-packages\gradio\utils.py", line 808, in wrapper response = f(args, *kwargs) File "C:\Users\josep.conda\envs\paints_undo\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, **kwargs) File "G:\Paints-UNDO\gradio_app.py", line 124, in process fg = resize_and_center_crop(input_fg, image_width, image_height) File "G:\Paints-UNDO\diffusers_vdm\utils.py", line 13, in resize_and_center_crop resized_image = cv2.resize(image, (new_width, new_height), interpolation=interpolation) cv2.error: OpenCV(4.10.0) :-1: error: (-5:Bad argument) in function 'resize'

Overload resolution failed:

  • src is not a numpy array, neither a scalar
  • Expected Ptr for argument 'src'