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

error when create mask #171

Open
gabszap opened this issue Feb 6, 2025 · 0 comments
Open

error when create mask #171

gabszap opened this issue Feb 6, 2025 · 0 comments

Comments

@gabszap
Copy link

gabszap commented Feb 6, 2025

same as title, how to fix it?

log error:

Traceback (most recent call last):
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\route_utils.py", line 285, in call_process_api
    output = await app.get_blocks().process_api(
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\blocks.py", line 1923, in process_api
    result = await self.call_function(
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\blocks.py", line 1508, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\utils.py", line 818, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\user\Downloads\Forge\webui\extensions\sd-webui-inpaint-anything\ia_threading.py", line 125, in wrapper
    res = func(*args, **kwargs)
  File "C:\Users\user\Downloads\Forge\webui\extensions\sd-webui-inpaint-anything\scripts\inpaint_anything.py", line 223, in select_mask
    mask = sam_image["mask"][:, :, 0:1]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
Traceback (most recent call last):
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\route_utils.py", line 285, in call_process_api
    output = await app.get_blocks().process_api(
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\blocks.py", line 1923, in process_api
    result = await self.call_function(
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\blocks.py", line 1508, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\user\Downloads\Forge\system\python\lib\site-packages\gradio\utils.py", line 818, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\user\Downloads\Forge\webui\extensions\sd-webui-inpaint-anything\ia_threading.py", line 125, in wrapper
    res = func(*args, **kwargs)
  File "C:\Users\user\Downloads\Forge\webui\extensions\sd-webui-inpaint-anything\scripts\inpaint_anything.py", line 223, in select_mask
    mask = sam_image["mask"][:, :, 0:1]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices```

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

1 participant