Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

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

Open
Lyntai opened this issue Sep 1, 2022 · 6 comments
Assignees

Comments

@Lyntai
Copy link

Lyntai commented Sep 1, 2022

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
@flysqu
Copy link

flysqu commented Sep 1, 2022

I am also having this issue

@altryne altryne self-assigned this Sep 1, 2022
@altryne
Copy link
Owner

altryne commented Sep 1, 2022

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

@altryne
Copy link
Owner

altryne commented Sep 3, 2022

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

@flysqu
Copy link

flysqu commented Sep 3, 2022

Hey tried it just now and still having the same issue

@altryne
Copy link
Owner

altryne commented Sep 3, 2022

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

@scottincrypto
Copy link

scottincrypto commented Sep 4, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants