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

is there a way to import custom models into the program? #35

Open
Filthy420 opened this issue Mar 28, 2024 · 0 comments
Open

is there a way to import custom models into the program? #35

Filthy420 opened this issue Mar 28, 2024 · 0 comments

Comments

@Filthy420
Copy link

For example, I downloaded juggernautxlinpaint from civitai and would like to experiment with that and others.

I tried placing it into the models directory but it didn't do anything, I then tried placing it into the huggingface cache but it also didnt show up in the programs drop down menu, I found the file ia_ui_items.py and ran it but that didnt seem to change anything.

I then modified it trying to force it to rescan the cache using the following code:

from huggingface_hub import scan_cache_dir

def get_inp_model_ids():

    hf_cache_info = scan_cache_dir()
    inpaint_repos = []
    for repo in hf_cache_info.repos:
        if repo.repo_type == "model" and "inpaint" in repo.repo_id.lower() and repo.repo_id not in model_ids:
            inpaint_repos.append(repo.repo_id)
    inp_list_from_cache = sorted(inpaint_repos, reverse=True, key=lambda x: x.split("/")[-1])
    model_ids.extend(inp_list_from_cache)
    return model_ids

    return model_ids

and it seemed to run without errors, but I refreshed/relaunched and nothing changes it.

How do I add custom models to the programs?
Is there a directory in the program I need to add my own folder to? And what should it be named.

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

1 participant