Skip to content

error when create mask #171

@gabszap

Description

@gabszap

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```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions