Skip to content

Inpaint fix#6

Merged
huchenlei merged 2 commits intoall_perffrom
inpaint_fix
May 15, 2024
Merged

Inpaint fix#6
huchenlei merged 2 commits intoall_perffrom
inpaint_fix

Conversation

@huchenlei
Copy link
Owner

Description

According to lllyasviel/stable-diffusion-webui-forge#716 (comment) , the check of whether the model is sdxl inpaint is calling state_dict on every sampling step. state_dict is a very expensive function that costs ~40ms. This overhead is for all inference regardless of model type, which is dumb.

This PR precomputes is_sdxl_inpaint flag so that we do not call state_dict on every sampling step.

Original PR that introduce this change: AUTOMATIC1111#14390

Screenshots/videos:

image

Checklist:

@huchenlei huchenlei merged commit f38bafd into all_perf May 15, 2024
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.

1 participant