Skip to content

Commit

Permalink
🐛 Uncache ip-adapter models (#2470)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Jan 15, 2024
1 parent af9c3cd commit c053213
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ def clear_control_model_cache():

@staticmethod
def load_control_model(p, unet, model):
if model in Script.model_cache:
# ip-adapter model contains embedding data, so each model is unique.
if 'ip-adapter' not in model and model in Script.model_cache:
logger.info(f"Loading model from cache: {model}")
return Script.model_cache[model]

Expand Down

0 comments on commit c053213

Please sign in to comment.