eideehi / sd-webui-better-styles

Stable Diffusion web UI extension that provides a better UI for managing styles.
MIT License
20 stars 5 forks source link

[BUG]: Doesn't work with Vlad fork because localization object is not defined. #3

Closed Aptronymist closed 1 year ago

Aptronymist commented 1 year ago

Is there an existing issue for this?

Bug Description

Refuses to load in vlad fork, gives error below in firefox. Uncaught (in promise) ReferenceError: localization is not defined Dn http://127.0.0.1:7860/file=extensions/sd-webui-better-styles/javascript/betterStyles.js?1684803623.031734:6

Corrected thanks to chatgpt. added const localization = {}; to the start of your BetterStyles.js Looking forward to trying it, hopefully that was enough to get it going.

Steps to Reproduce

Install, try to use. Doesn't show up. Error in dev console.

Screenshot (optional)

No response

Gerkinfeltser commented 1 year ago

@Aptronymist ChatGPT suggested fix did the trick for me. const localization = {}; to the start of your betterStyles.js gets the little icon to show up.

Aptronymist commented 1 year ago

In my case I now have it right after the first var, so like this: var BetterStyles=function(){"use strict";const localization = {}; and make sure to have the "hide original styles" checked in your settings, as well as having 1.2.0 selected. I don't know for sure what fixes what beyond the localization addition, but those are my current settings and it works fine.

brknsoul commented 1 year ago

Note: Egg on face time; Placing my extensions behind a symlink caused a lot of issues. Those issues vanished when I removed the symlink and copied the extension back to the main folder.

Closeable.