-
Notifications
You must be signed in to change notification settings - Fork 6k
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
add model cache after loaded #3605
Conversation
1b1569d
to
55048c4
Compare
comfy/sd.py
Outdated
model_cache.cache_vae(ckpt_path, vae) | ||
if clipvision: | ||
logging.debug(f"cache clipvision of : {ckpt_path}") | ||
model_cache.cache_clipvision(ckpt_path, clipvision) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bug here
model_cache.cache_clipvision
needs to be changed to model_cache.cache_clip_vision
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to cache clipVision model also within CLIPVisionLoader
When use ip adapter every time will need to load CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors
Use model cache can directly copy it each time from cpu memory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy that.
Add model cache after loaded
looks great ! how to use it? |
You can try with this repo repository |
Hi can you keep your fork up to date please? I want to test this. |
Welcome to test it. It has been updated. Hope to know your feedback. It is recommended to add |
Sorry for asking a silly question. I couldn't find the definition of the variable 'ckpt_path' in the function 'load_state_dict_guess_config' within the sd.py file, and PyCharm is reporting a compilation error: 'Unresolved reference 'ckpt_path''. |
Sorry,that's my mistake, the latest version of comfyui remove the parameter of Actually I'm ready to close this PR because it's not really helpful in most cases. So I closed this thanks you guys. |
I think it is very useful, I hope you can continue to update, thank you, cool |
Here is a gif example to show it, and it's really amazing.
Fully tested on openart template workflows. -> https://openart.ai/workflows/templates