Error while adding drag
Closed this issue · 3 comments
Every time I try to use the Gradio UI, it throws this error. It loads the photo at the incorrect size, and I cannot add drags.
IndexError: index 697 is out of bounds for dimension 0 with size 320
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 534, in predict
output = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py", line 226, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1550, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1185, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2106, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 833, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 661, in wrapper
response = f(*args, **kwargs)
File "/workspace/DragNUWA/DragNUWA_demo.py", line 159, in run
input_drag[i][int(start_point[1])][int(start_point[0])][0] = end_point[0] - start_point[0]
IndexError: index 697 is out of bounds for dimension 0 with size 320
Please upload the image via the "Upload an Image" botton, and when you want to add a drag, you need to first click "Add a drag".
Thanks~
Earlier version of gradio doesn't seem to work make sure you are using gradio==3.50.2
I have installed updated gradio, still got same issue when running workflow.json in ComfyUI and got following error always, my GPU is 2080ti 22gb VRAM
Error occurred when executing DragNUWA Run:
index 342 is out of bounds for dimension 0 with size 320
File "D:\github\ComfyUI\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\github\ComfyUI\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\github\ComfyUI\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\github\ComfyUI\ComfyUI\custom_nodes\ComfyUI-DragNUWA\nodes.py", line 873, in run_inference
return model.run_2(image_pil, tracking_points, inference_batch_size, motion_bucket_id, use_optical_flow, directory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\github\ComfyUI\ComfyUI\custom_nodes\ComfyUI-DragNUWA\nodes.py", line 300, in run_2
input_drag[i][int(start_point[1])][int(start_point[0])][0] = end_point[0] - start_point[0]