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

Need advice to setup to get a local working model of Stablediffusion #14

Open
cercatore opened this issue Mar 31, 2024 · 3 comments
Open

Comments

@cercatore
Copy link

cercatore commented Mar 31, 2024

Hello
This looks like a promising app and i like very much your effort in this.
I am trying to develop a full app included frontend for a project of mine using vLogger.
That is quite challenging
However i ran into some issues
I am unable to get a local copy of stablediffusion model
Tried several ways with python

https://chat.openai.com/share/94d052f4-5b87-4848-b347-1982307917e7

This code works for OpenClip and showMaker, fails for sd-v1-5
Do you know any workaround for this?
Thanks

@zhuangshaobin
Copy link
Collaborator

Sorry, I can't open the link in your question. It prompts me to enter my account and password.

@cercatore
Copy link
Author

cercatore commented Apr 3, 2024

hello thanks for the reply
my code is this

from transformers import AutoModel, AutoTokenizer

model_id = "openai/stablediffusion-v1-4"  # ID of the Stable Diffusion model

# Download tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModel.from_pretrained(model_id)

# Save the tokenizer and model
tokenizer.save_pretrained("/cache/tokenizer")
model.save_pretrained("/cache/model")

@zhuangshaobin
Copy link
Collaborator

zhuangshaobin commented Apr 11, 2024

If you want to call ip-adapter directly on the stable diffusion model, then you need to query the interface of ip-adapter in diffusers:
https://huggingface.co/docs/diffusers/api/loaders/ip_adapter

The reason for the incompatibility may be that in order to add STEB, I rewrote the model code in the models folder, which may cause the code to be inconsistent with the interface in diffusers.

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