What's the most efficient way of loading controlnet models? #9020
Unanswered
AbhinavGopal
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys, I've tried the following two scripts:
and
In both scripts, the model takes about 35-40s to load.
In the first script, a long amount of time (21s) is spent here https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L747-L753, for the unet model loading.
In the 2nd script, a long amount of time (23s) is spent here https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_loading_utils.py#L700, where the load method is ModelMixIn.from_pretrained for a of <class 'diffusers.models.unets.unet_2d_condition.UNet2DConditionModel'> object.
Is there any way to increase this efficiency? Open to caching options too.
Beta Was this translation helpful? Give feedback.
All reactions