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]: Unable to 'apply current' on Chrome: Failed to execute 'drawImage' on 'CanvasRenderingContext2D' #259

Open
Kadah opened this issue Aug 27, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Kadah
Copy link

Kadah commented Aug 27, 2023

What happened?

There appears to be a bug with the recent "+ Button Updates Prompt" update under Chrome.

Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or OffscreenCanvas or SVGImageElement or VideoFrame)'.
    at CanvasRenderingContext2D.value [as drawImage] (layers.js?v=26b7436:73:30)
    at subtractBackground (util.js?v=379aef7:499:8)
    at Image.<anonymous> (dream.js?v=95bd3f0:562:14)
value @ layers.js?v=26b7436:73
subtractBackground @ util.js?v=379aef7:499
(anonymous) @ dream.js?v=95bd3f0:562
load (async)
applyImg @ dream.js?v=95bd3f0:543

Steps to reproduce the problem

This is the minimal repo I've been able to find. There may be an additional different and longer unknown repo that I've hit during regular use that does not require step 3.

  1. Have image on canvas
  2. Draw mask and do img2img
  3. Modify prompt, "+ Button Updates Prompt" being enabled or not has no effect
  4. Hit + / Generate More
  5. Pick any gen and attempt to Y / Apply Current
  6. Img2img is not applied, error in console

What should have happened?

Gen should be applied

Commit where the problem happens

b60b4fc

What platforms do you use to access openOutpaint?

Linux

What browsers do you use to access the UI ?

Google Chrome

Browser Extensions/Addons

Chrome: 116.0.5845.110

uBlock Origin, inactive, localhost exempted
Tampermonkey, nothing active on localhost
No others that are active in Incognito Mode

AUTOMATIC1111 webUI Commandline Arguments

--no-half-vae --api --opt-split-attention --cors-allow-origins=http://127.0.0.1:7860,http://127.0.0.1:3456 --no-download-sd-mode

Additional information

Unable to repo on 5abf591

Unable to repo on Firefox

@Kadah Kadah added the bug Something isn't working label Aug 27, 2023
@Kadah
Copy link
Author

Kadah commented Aug 28, 2023

Gah, just got repo on 5abf591 again without touching the prompt. Gonna have to switch back to Firefox already, oh well.

Scratch that, instantly got repo on Firefox in a private session. Seems maybe this also occurs with larger img2img area, getting it every time on an 576x1472 gen. The odd thing is that it gens and displays just find, but throws the follow area when trying to apply it back.

Uncaught TypeError: CanvasRenderingContext2D.drawImage: Argument 1 could not be converted to any of: HTMLImageElement, SVGImageElement, HTMLCanvasElement, HTMLVideoElement, OffscreenCanvas, ImageBitmap.
    value http://127.0.0.1:3456/js/lib/layers.js?v=26b7436:73
    subtractBackground http://127.0.0.1:3456/js/lib/util.js?v=379aef7:499
    applyImg http://127.0.0.1:3456/js/ui/tool/dream.js?v=c97af5b:562

Edit2: Subtract background / Remove Identical/GB Pixels appears to be the cause. Turning it off stops this repo. Untested on the original repo steps/version.

@zero01101
Copy link
Owner

i can't really say i'm too surprised that it's broken lol, background carving barely functions as is and for the amount of time i wasted implementing it, i think i've used it once... but yeah, confirmed that it screws things up with the prompt editing, will see if i can wrap my head around what i did there...

@Kadah
Copy link
Author

Kadah commented Sep 2, 2023

I think I turned it on for the first time the night before to see what it would do then forgot I had done that the next day. xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants