sd-webui-colab icon indicating copy to clipboard operation
sd-webui-colab copied to clipboard

(Img2Img) RuntimeError: The size of tensor a (128) must match the size of tensor b (64) at non-singleton dimension 3

Open Lyntai opened this issue 2 years ago • 6 comments

Img2Img local:

File "scripts/webui.py", line 1194, in sample
    xi = x0 + noise
RuntimeError: The size of tensor a (128) must match the size of tensor b (64) at non-singleton dimension 3

Img2Img Colab:


Iteration: 1/1
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gradio/routes.py", line 247, in run_predict
    output = await app.blocks.process_api(
  File "/usr/local/lib/python3.8/site-packages/gradio/blocks.py", line 641, in process_api
    predictions, duration = await self.call_function(fn_index, processed_input)
  File "/usr/local/lib/python3.8/site-packages/gradio/blocks.py", line 556, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/content/stable-diffusion/scripts/webui.py", line 1288, in img2img
    output_images, seed, info, stats = process_images(
  File "/content/stable-diffusion/scripts/webui.py", line 819, in process_images
    samples_ddim = func_sample(init_data=init_data, x=x, conditioning=c, unconditional_conditioning=uc, sampler_name=sampler_name)
  File "/content/stable-diffusion/scripts/webui.py", line 1194, in sample
    xi = x0 + noise
RuntimeError: The size of tensor a (128) must match the size of tensor b (64) at non-singleton dimension 3

Lyntai avatar Sep 01 '22 06:09 Lyntai

I am also having this issue

flysqu avatar Sep 01 '22 13:09 flysqu

Yeah this was fixed on main branch, I need to wait until it's stable and update the colab fork.

altryne avatar Sep 01 '22 19:09 altryne

@Lop010 please try the latest version, and let me know?

altryne avatar Sep 03 '22 02:09 altryne

Hey tried it just now and still having the same issue

flysqu avatar Sep 03 '22 08:09 flysqu

can you uncheck this and try? CleanShot 2022-09-03 at 15 15 16@2x

altryne avatar Sep 03 '22 21:09 altryne

can you uncheck this and try? CleanShot 2022-09-03 at 15 15 16@2x

Hey, just tried this - different error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gradio/routes.py", line 247, in run_predict
    output = await app.blocks.process_api(
  File "/usr/local/lib/python3.8/site-packages/gradio/blocks.py", line 639, in process_api
    processed_input = self.preprocess_data(fn_index, raw_input, state)
  File "/usr/local/lib/python3.8/site-packages/gradio/blocks.py", line 543, in preprocess_data
    processed_input.append(block.preprocess(raw_input[i]))
  File "/usr/local/lib/python3.8/site-packages/gradio/components.py", line 1546, in preprocess
    x, mask = x["image"], x["mask"]
TypeError: string indices must be integers

scottincrypto avatar Sep 04 '22 04:09 scottincrypto