lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.56k stars 842 forks source link

Regional Prompt extension dissappeared from UI #940

Open alexdisablo opened 3 months ago

alexdisablo commented 3 months ago

After the recent update Regional prompt dissapeared from UI.
UPDATE: I found the error in logs.

[-] ADetailer initialized. version: 24.8.0, num models: 28
*** Error loading script: attention.py
    Traceback (most recent call last):
      File "D:\Stable Diffusion Forge\webui\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\Stable Diffusion Forge\webui\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "D:\Stable Diffusion Forge\webui\extensions\sd-webui-regional-prompter\scripts\attention.py", line 3, in <module>
        import ldm.modules.attention as atm
    ModuleNotFoundError: No module named 'ldm'

---
*** Error loading script: latent.py
    Traceback (most recent call last):
      File "D:\Stable Diffusion Forge\webui\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\Stable Diffusion Forge\webui\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "D:\Stable Diffusion Forge\webui\extensions\sd-webui-regional-prompter\scripts\latent.py", line 11, in <module>
        import scripts.attention as att
      File "D:\Stable Diffusion Forge\webui\extensions\sd-webui-regional-prompter\scripts\attention.py", line 3, in <module>
        import ldm.modules.attention as atm
    ModuleNotFoundError: No module named 'ldm'

---
*** Error loading script: rp.py
    Traceback (most recent call last):
      File "D:\Stable Diffusion Forge\webui\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\Stable Diffusion Forge\webui\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "D:\Stable Diffusion Forge\webui\extensions\sd-webui-regional-prompter\scripts\rp.py", line 15, in <module>
        import scripts.attention
      File "D:\Stable Diffusion Forge\webui\extensions\sd-webui-regional-prompter\scripts\attention.py", line 3, in <module>
        import ldm.modules.attention as atm
    ModuleNotFoundError: No module named 'ldm'

image image

da1barker commented 3 months ago

same, please fix

alcarinque-istar commented 3 months ago

https://github.com/CompVis/stable-diffusion/issues/488 This seems related

alexdisablo commented 3 months ago

CompVis/stable-diffusion#488 This seems related

This doesn't really help. I'm not dev, I can't follow random git commands in comments. The issue appeared after one of latest patches (like 1-2 last days). It was working before and after I've updated the client - stopped. So it's in Forge's code. And it need to be fixed in forged code.

alexdisablo commented 3 months ago

The best solution I found so far - is to download old forge client and work there :D No memory leaks, generation works faster, UI is not lagging, extenstions are not crashing or dissappearing. Reccomend)

ricky469469 commented 3 months ago

To revert to this version (7eb5cba) fix that error

MBurneracc commented 3 months ago

Having the same problem, whatever has been happening lately broke both regional prompter but also the negpip extension as well with the same exact error.

*** Error loading script: negpip.py Traceback (most recent call last): File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\extensions\sd-webui-negpip\scripts\negpip.py", line 5, in import ldm.modules.attention as atm ModuleNotFoundError: No module named 'ldm'

da1barker commented 3 months ago

@MBurneracc check the readme Forge is "Under Construction" : "WebUI Forge is under a week of major revision right now between 2024 Aug 1 and Aug 10. To join the test, just update to the latest unstable version."

MBurneracc commented 3 months ago

@MBurneracc check the readme Forge is "Under Construction" : "WebUI Forge is under a week of major revision right now between 2024 Aug 1 and Aug 10. To join the test, just update to the latest unstable version."

Just because the thing is under construction doesn't mean it isn't helpful to point out when something breaks. If they removed something and caused this issue but still haven't replaced what broke they might not know otherwise they'd even broken something since it only seems to impact these two particular extensions as far as I know and leaves everything else functional.

da1barker commented 3 months ago

@MBurneracc You said "whatever has been happening lately" I was just providing context, not trying to shut you down. I am also here because I want broken things fixed.

shadersguy commented 2 months ago

Solution seems to be to go here

https://github.com/CompVis/stable-diffusion/tree/main

clone or download the repository, then copy the "ldm" folder to your Forge/Webui folder

regional prompter seems to show up after that

Capture

MBurneracc commented 2 months ago

Solution seems to be to go here

Close but doesn't seem to quite go far enough to fully solve the issue. It resolves getting the initial error messages when starting up and properly shows everything in the UI but once you go and try generating an image it just throw up new errors for Regional prompter and Negpip

** Error running postprocess: I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\extensions\sd-webui-regional-prompter\scripts\rp.py Traceback (most recent call last): File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\modules\scripts.py", line 900, in postprocess script.postprocess(p, processed, script_args) File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\extensions\sd-webui-regional-prompter\scripts\rp.py", line 600, in postprocess unloader(self, p) File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\extensions\sd-webui-regional-prompter\scripts\rp.py", line 621, in unloader unloadlorafowards(p) File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\extensions\sd-webui-regional-prompter\scripts\latent.py", line 573, in unloadlorafowards emb_db = sd_hijack.model_hijack.embedding_db AttributeError: 'StableDiffusionModelHijack' object has no attribute 'embedding_db'

Error running process_batch: I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\extensions\sd-webui-negpip\scripts\negpip.py Traceback (most recent call last): File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\modules\scripts.py", line 884, in process_batch script.process_batch(p, script_args, kwargs) File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5\extensions\sd-webui-negpip\scripts\negpip.py", line 120, in process_batch tokenizer = shared.sd_model.conditioner.embedders[0].tokenize_line if self.isxl else shared.sd_model.cond_stage_model.tokenize_line AttributeError: 'NoneType' object has no attribute 'tokenize_line'

alebeard commented 2 months ago

showed back up but trying to use.. Moving model(s) has taken 0.03 seconds ** Error running postprocess: C:\webforge_old_working\webui\extensions\sd-webui-regional-prompter\scripts\rp.py Traceback (most recent call last): File "C:\webforge_old_working\webui\modules\scripts.py", line 900, in postprocess script.postprocess(p, processed, script_args) File "C:\webforge_old_working\webui\extensions\sd-webui-regional-prompter\scripts\rp.py", line 600, in postprocess unloader(self, p) File "C:\webforge_old_working\webui\extensions\sd-webui-regional-prompter\scripts\rp.py", line 621, in unloader unloadlorafowards(p) File "C:\webforge_old_working\webui\extensions\sd-webui-regional-prompter\scripts\latent.py", line 573, in unloadlorafowards emb_db = sd_hijack.model_hijack.embedding_db AttributeError: 'StableDiffusionModelHijack' object has no attribute 'embedding_db'

On Mon, Aug 26, 2024 at 7:22 PM MBurneracc @.***> wrote:

Solution seems to be to go here

Close but doesn't seem to quite go far enough to fully solve the issue. It resolves getting the initial error messages when starting up and properly shows everything in the UI but once you go and try generating an image it just throw up new errors for Regional prompter and Negpip

** Error running postprocess: I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5 https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3 \extensions\sd-webui-regional-prompter\scripts\rp.py Traceback (most recent call last): File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5 https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3\modules\scripts.py", line 900, in postprocess script.postprocess(p, processed, script_args) File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5 https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3\extensions\sd-webui-regional-prompter\scripts\rp.py", line 600, in postprocess unloader(self, p) File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5 https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3\extensions\sd-webui-regional-prompter\scripts\rp.py", line 621, in unloader unloadlorafowards(p) File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5 https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3\extensions\sd-webui-regional-prompter\scripts\latent.py", line 573, in unloadlorafowards emb_db = sd_hijack.model_hijack.embedding_db AttributeError: 'StableDiffusionModelHijack' object has no attribute 'embedding_db'

Error running process_batch: I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5 https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3 \extensions\sd-webui-negpip\scripts\negpip.py Traceback (most recent call last): File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5 https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3\modules\scripts.py", line 884, in process_batch script.process_batch(p, script_args, kwargs) File "I:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge b9705c5 https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/b9705c58f66c6fd2c4a0168b26c5cf1fa6c0dde3\extensions\sd-webui-negpip\scripts\negpip.py", line 120, in process_batch tokenizer = shared.sd_model.conditioner.embedders[0].tokenize_line if self.isxl else shared.sd_model.cond_stage_model.tokenize_line AttributeError: 'NoneType' object has no attribute 'tokenize_line'

— Reply to this email directly, view it on GitHub https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/940#issuecomment-2311441830, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHN7U727K7T347U5DGFKMV3ZTPPFXAVCNFSM6AAAAABMCYKFC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJRGQ2DCOBTGA . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>

ezekiel23533 commented 2 months ago

same

fugga228 commented 2 months ago

same

InvaderX9 commented 2 months ago

still unable to get the regional prompt extension to work without downgrading SD a lot. its very useful tool for me, so i hope this gets fixed soon..

i am also getting the same error mentioned above; ModuleNotFoundError: No module named 'ldm' every time I run SD.

PanduZen commented 2 months ago

any fix?

scarlizzz commented 1 month ago

I found an easy fix for it. Just download the full repo here https://github.com/CompVis/stable-diffusion/tree/main ... then extract it after downloading.. copy ONLY the "ldm" folder and put into your forge "webui" folder. After that Regional Prompter will show up again AND works again.

InvaderX9 commented 1 month ago

I found an easy fix for it. Just download the full repo here https://github.com/CompVis/stable-diffusion/tree/main ... then extract it after downloading.. copy ONLY the "ldm" folder and put into your forge "webui" folder. After that Regional Prompter will show up again AND works again.

thank you so much!!

da1barker commented 1 month ago

I found an easy fix for it. Just download the full repo here https://github.com/CompVis/stable-diffusion/tree/main ... then extract it after downloading.. copy ONLY the "ldm" folder and put into your forge "webui" folder. After that Regional Prompter will show up again AND works again.

works, thanks king

jonk999 commented 1 month ago

I found an easy fix for it. Just download the full repo here https://github.com/CompVis/stable-diffusion/tree/main ... then extract it after downloading.. copy ONLY the "ldm" folder and put into your forge "webui" folder. After that Regional Prompter will show up again AND works again.

Another confirming it works. Thanks!

Joey-420 commented 1 month ago

I found an easy fix for it. Just download the full repo here https://github.com/CompVis/stable-diffusion/tree/main ... then extract it after downloading.. copy ONLY the "ldm" folder and put into your forge "webui" folder. After that Regional Prompter will show up again AND works again.

It appears but functionally doesn't work, at least for me. I've tested old gens I've made from months back, same settings and everything, regions aren't functioning properly and prompts are leaking over into the separate region.

DavidDickie667 commented 1 month ago

I'm a bit confused- maybe someone can tell me what I'm misunderstanding...

Solution seems to be to go here

https://github.com/CompVis/stable-diffusion/tree/main

clone or download the repository, then copy the "ldm" folder to your Forge/Webui folder

regional prompter seems to show up after that

Capture

^This solution seems to be the same as this solution:

I found an easy fix for it. Just download the full repo here https://github.com/CompVis/stable-diffusion/tree/main ... then extract it after downloading.. copy ONLY the "ldm" folder and put into your forge "webui" folder. After that Regional Prompter will show up again AND works again.

Both say to copy the "ldm" folder to forge webui folder. Yet people are saying the first post doesn't work and the second post does. But both posts say to do the same thing...

In any case, neither one works for me. Forge starts up fine. Regional prompter installs fine and shows up fine. However enabling it does NOT appear to do anything. I tested with the same prompt, model, seed etc on an older version of Forge and the new version, it is for sure NOT working correctly.

Are the people above who say it's working mistaken? Because it does appear to work, except for the fact that the resulting images don't seem to be affected at all by regional prompting.

This is the ONLY thing preventing me from updating to the new Forge.