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

Can I have a similar checkpoint loader shared but for other models? #113

Open
leonnn1 opened this issue Jun 1, 2024 · 5 comments
Open

Comments

@leonnn1
Copy link

leonnn1 commented Jun 1, 2024

I would like to, besides the checkpoint, be able to cache other models, for instance, the IP adapters, controlnets, loras, etc... I tried to code it but my lack of coding skills broke the inspire pack.... Can anyone help me create other nodes for the other models?

@ltdrdata
Copy link
Owner

ltdrdata commented Jun 1, 2024

Inspire's shared checkpointer loader is specialized for checkpointing the backend cache functionality. Due to its frequent usage pattern, separate nodes were created for ease of use. By utilizing backend cache nodes, all data can be shared.

https://youtu.be/7wfe1DBAkoA?feature=shared

Since there have been updates after the video was posted, check out the documentation in the Backend Cache section in README page as well.

@leonnn1
Copy link
Author

leonnn1 commented Jun 2, 2024

Thank you very much for your answer, your nodes are really great. I actually coded 3 new nodes(with my limited skills), they are all working I just needed to do one extra one for the IP adapter, but now after I watched your video I will try to implement it in that way.
thank you again, my little project will run way better thanks to you

@leonnn1
Copy link
Author

leonnn1 commented Jun 2, 2024

I guess I managed to do it even without the impact pack since I only needed the IPadapter, I will leave it here if someone needs for future reference and I will also leave the code if its useful to you, its probably bad because I can't code, but it seems to work.

So I just stored the ipapter as a number key:

image

Then I retrieved the key and connected to the ipadapter:

image

Is this the right way?

About the code its this, I just changed the backend support file, again I dont code and I don't know if this is done as it should but if it may be helpful here it is, on it there are 3 new nodes, one for the upscale model, one for the controlnet mode, one for the clip model (FOR NOOBS LIKE ME: just backup the original file and put this one on the same folder and fix the name for it to work.)

backend_suppor - Clip.zip

@ltdrdata
Copy link
Owner

ltdrdata commented Jun 2, 2024

NumberKey is provided for IDs generated at runtime, and if you're using a fixed key, it's better for readability to use a text key instead of NumberKey.

@leonnn1
Copy link
Author

leonnn1 commented Jun 2, 2024

NumberKey is provided for IDs generated at runtime, and if you're using a fixed key, it's better for readability to use a text key instead of NumberKey.

I will change it for that, thank you very much!

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

No branches or pull requests

2 participants