stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Performance 5/6] Prevent unnecessary extra networks bias backup
Description
According to https://github.com/lllyasviel/stable-diffusion-webui-forge/discussions/716#discussioncomment-9342622 , network_apply always incur some overhead on copying tensors even when no extra networks are enabled. This PR prevents this behaviour. The performance gain is about 25ms/it.
Previously unnecessary weight copy was prevented in https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12599/files . This PR is just a follow-up and apply the same approach on bias backup.
Screenshots/videos:
Checklist:
- [x] I have read contributing wiki page
- [x] I have performed a self-review of my own code
- [x] My code follows the style guidelines
- [x] My code passes tests
is it possible to make this compatible with extension that changing lora weight during sampling?
https://github.com/cheald/sd-webui-loractl https://github.com/AG-w/sd-webui-lora-block-weight
is it possible to make this compatible with extension that changing lora weight during sampling?
https://github.com/cheald/sd-webui-loractl https://github.com/AG-w/sd-webui-lora-block-weight
Do you mean that this change will cause dynamic lora weight not working?
is it possible to make this compatible with extension that changing lora weight during sampling? https://github.com/cheald/sd-webui-loractl https://github.com/AG-w/sd-webui-lora-block-weight
Do you mean that this change will cause dynamic lora weight not working?
the latest commit fixed it, thanks
Whoa baby, I am SO looking forward to Forge speeds + ability to use loractl extension.
Absolutely amazing.