Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance 5/6] Prevent unnecessary extra networks bias backup #15816

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

huchenlei
Copy link
Contributor

@huchenlei huchenlei commented May 16, 2024

Description

According to lllyasviel/stable-diffusion-webui-forge#716 (comment) , 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:

328731939-e0634017-9265-49ee-918d-6b3802ff9305

Checklist:

@AG-w
Copy link

AG-w commented May 16, 2024

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

@huchenlei
Copy link
Contributor Author

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?

@AG-w
Copy link

AG-w commented May 17, 2024

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

@altoiddealer
Copy link

Whoa baby, I am SO looking forward to Forge speeds + ability to use loractl extension.

Absolutely amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants