zero01101/openOutpaint

[Bug]: Unable to 'apply current' on Chrome: Failed to execute 'drawImage' on 'CanvasRenderingContext2D'

Opened this issue · 3 comments

Kadah commented

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 commented

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.

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 commented

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