LEv145 / --sd-webui-ar-plus

Select img aspect ratio from presets in sd-webui
52 stars 6 forks source link

`arc_get_image_dim` button dont work in Gradio 4.0 [FORGE] #28

Open LEv145 opened 2 months ago

LEv145 commented 2 months ago

изображение

Error

Traceback (most recent call last):
  File "D:\0_AI\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "D:\0_AI\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\route_utils.py", line 285, in call_process_api
    output = await app.get_blocks().process_api(
  File "D:\0_AI\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\blocks.py", line 1923, in process_api
    result = await self.call_function(
  File "D:\0_AI\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\blocks.py", line 1508, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "D:\0_AI\stable-diffusion-webui-forge\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "D:\0_AI\stable-diffusion-webui-forge\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "D:\0_AI\stable-diffusion-webui-forge\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "D:\0_AI\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\utils.py", line 818, in wrapper
    response = f(*args, **kwargs)
  File "D:\0_AI\stable-diffusion-webui-forge\extensions\--sd-webui-ar-plus\scripts\sd-webui-ar.py", line 442, in get_dims
    width = img.size[0]
AttributeError: 'str' object has no attribute 'size'
LEv145 commented 2 months ago

Maybe this will fix the problem

https://github.com/LEv145/--sd-webui-ar-plus/tree/f06348ad6ff5501556a52b3e229e0c363c4d65f4 изображение