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

[Bug]: Can't pass to, or open image to be source in img2img tab #6884

Open
1 task done
valden80 opened this issue Jan 18, 2023 · 5 comments
Open
1 task done

[Bug]: Can't pass to, or open image to be source in img2img tab #6884

valden80 opened this issue Jan 18, 2023 · 5 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@valden80
Copy link

valden80 commented Jan 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

When pressing "send to img2img", or trying to load image from disk as source image for img2img I get this error:

Traceback (most recent call last):
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "<private>/stable-diffusion-webui/modules/generation_parameters_copypaste.py", line 116, in send_image_and_dimensions
    img = image_from_url_text(x)
  File "<private>/stable-diffusion-webui/modules/generation_parameters_copypaste.py", line 62, in image_from_url_text
    filedata = base64.decodebytes(filedata.encode('utf-8'))
  File "/usr/lib/python3.10/base64.py", line 562, in decodebytes
    return binascii.a2b_base64(s)
binascii.Error: Incorrect padding

"private" - my edit of actual path (contain local username).

Steps to reproduce the problem

  1. Go to img2img tab
  2. Try to load any image.

What should have happened?

Normal image loading into img2img source.

Commit where the problem happens

a4291fe99b94899b92bcc4e7637dd106168da866

What platforms do you use to access UI ?

Linux

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--lowvram --precision full --no-half --no-half-vae --opt-split-attention --xformers --enable-console-prompts --api --deepdanbooru --use-cpu interrogate

Additional information, context and logs

No response

@valden80 valden80 added the bug-report Report of a bug, yet to be confirmed label Jan 18, 2023
@toyxyz
Copy link

toyxyz commented Jan 18, 2023

I have the same error.

@dniminenn
Copy link

Also the same error here

@atomantic
Copy link

The base64 image data has the wrong number of = at the end to pad it. Theoretically can just add excess padding characters to the end and it should truncate... haven't looked at it in the code but I had this issue with the krita api endpoint and bypassed it by adding an extra = to the end of the img2img call file data.

@atomantic
Copy link

Then again, looks like patching the image browser extension fixes this particular bug: https://github.com/yfszzx/stable-diffusion-webui-images-browser/pull/51/files

@Pytness
Copy link

Pytness commented Jan 25, 2023

Then again, looks like patching the image browser extension fixes this particular bug: https://github.com/yfszzx/stable-diffusion-webui-images-browser/pull/51/files

The correct pr, is this one: yfszzx/stable-diffusion-webui-images-browser#76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

5 participants