lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.44k stars 825 forks source link

Module not found error, No module named "ldm" #2169

Closed Fretag closed 2 weeks ago

Fretag commented 3 weeks ago

I've seen this error come and go. Is it something to do with the current update?

(Module not found error, No module named "ldm")

*** Error loading script: attention.py Traceback (most recent call last): File "F:\SD Forge Manual\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "F:\SD Forge Manual\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 "F:\SD Forge Manual\extensions\sd-webui-regional-prompter\scripts\attention.py", line 3, in import ldm.modules.attention as atm ModuleNotFoundError: No module named 'ldm'


*** Error loading script: latent.py Traceback (most recent call last): File "F:\SD Forge Manual\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "F:\SD Forge Manual\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 "F:\SD Forge Manual\extensions\sd-webui-regional-prompter\scripts\latent.py", line 11, in import scripts.attention as att File "F:\SD Forge Manual\extensions\sd-webui-regional-prompter\scripts\attention.py", line 3, in import ldm.modules.attention as atm ModuleNotFoundError: No module named 'ldm'


*** Error loading script: rp.py Traceback (most recent call last): File "F:\SD Forge Manual\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "F:\SD Forge Manual\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 "F:\SD Forge Manual\extensions\sd-webui-regional-prompter\scripts\rp.py", line 15, in import scripts.attention File "F:\SD Forge Manual\extensions\sd-webui-regional-prompter\scripts\attention.py", line 3, in import ldm.modules.attention as atm ModuleNotFoundError: No module named 'ldm'

DenOfEquity commented 3 weeks ago

ldm modules are no longer part of Forge, so extensions like that one need updates. There is an updated fork of the regional prompter extension: https://github.com/jessearodriguez/sd-forge-regional-prompter And an alternative: https://github.com/Haoming02/sd-forge-couple

Fretag commented 3 weeks ago

Thank you for that. If it's no longer part of Forge, ie. the sd-webui-regional-prompter, Do I need it then? Can I just delete it from the extension folder?

DenOfEquity commented 2 weeks ago

Yes, extension uninstallation is simply deleting the folder. Or you could disable it in the Extensions tab.