lllyasviel / lllyasviel/sd-forge-layerdiffuse
Doesn't work in newer ver of sd webui forge
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.1k
- Forks
- 352
- PR merge metrics
- No merged PRs in 30d
Description
It says that `'StableDiffusionXL' object has no attribute 'network_layer_mapping'` when using animagineXL model.
ERROR:scripts.incant_utils.module_hooks:AttributeError in get_modules
Traceback (most recent call last):
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\extensions\sd-webui-incantations\scripts\incant_utils\module_hooks.py", line 65, in get_modules
nlm = m.network_layer_mapping
AttributeError: 'StableDiffusionXL' object has no attribute 'network_layer_mapping'
Stack (most recent call last):
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\launch.py", line 54, in
main()
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\launch.py", line 50, in main
start()
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\modules\launch_utils.py", line 554, in start
main_thread.loop()
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\modules_forge\main_thread.py", line 48, in loop
task.work()
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\modules_forge\main_thread.py", line 30, in work
self.result = self.func(*self.args, **self.kwargs)
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\modules\img2img.py", line 248, in img2img_function
processed = process_images(p)
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\modules\processing.py", line 842, in process_images
res = process_images_inner(p)
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\modules\processing.py", line 960, in process_images_inner
p.scripts.process_batch(p, batch_number=n, prompts=p.prompts, seeds=p.seeds, subseeds=p.subseeds)
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\modules\scripts.py", line 884, in process_batch
script.process_batch(p, *script_args, **kwargs)
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\extensions\sd-webui-incantations\scripts\incantation_base.py", line 105, in process_batch
m.module.process_batch(p, *self.m_args(m, *args), **kwargs)
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\extensions\sd-webui-incantations\scripts\smoothed_energy_guidance.py", line 96, in process_batch
self.seg_process_batch(p, *args, **kwargs)
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\extensions\sd-webui-incantations\scripts\smoothed_energy_guidance.py", line 101, in seg_process_batch
self.remove_all_hooks()
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\extensions\sd-webui-incantations\scripts\smoothed_energy_guidance.py", line 166, in remove_all_hooks
self_attn_modules = self.get_cross_attn_modules()
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\extensions\sd-webui-incantations\scripts\smoothed_energy_guidance.py", line 232, in get_cross_attn_modules
return self.get_middle_block_modules()
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\extensions\sd-webui-incantations\scripts\smoothed_energy_guidance.py", line 223, in get_middle_block_modules
middle_block_modules = module_hooks.get_modules(
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\extensions\sd-webui-incantations\scripts\incant_utils\module_hooks.py", line 75, in get_modules
logger.exception("AttributeError in get_modules", stack_info=True)
ERROR:scripts.incant_utils.module_hooks:AttributeError in get_modules
Traceback (most recent call last):
File "E:\Code\Python\Diffusions\stable-diffusion-webui-forge\extensions\sd-webui-incantations\scripts\incant_utils\module_hooks.py", line 65, in get_modules
nlm = m.network_layer_mapping
AttributeError: 'StableDiffusionXL' object has no attribute 'network_layer_mapping'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in scripts/incant_utils/module_hooks.py at get_modules, where the traceback shows access to network_layer_mapping, and trace the call from scripts/smoothed_energy_guidance.py. Compare the behavior with newer Forge versions and the animagineXL model; done means processing no longer raises this AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100