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

[Feature Request]: Custom directory path for wildcards base. #454

Open
LLKoder opened this issue May 25, 2023 · 13 comments
Open

[Feature Request]: Custom directory path for wildcards base. #454

LLKoder opened this issue May 25, 2023 · 13 comments
Labels
enhancement New feature or request

Comments

@LLKoder
Copy link

LLKoder commented May 25, 2023

It would be nice if user can to choose in settings the path where the wildcards database is located (+subdirrectorys).

@akx
Copy link
Collaborator

akx commented May 25, 2023

For the time being, you should be able to replace the wildcards/ directory with a symlink pointing elsewhere.

@akx akx added the enhancement New feature or request label May 25, 2023
@LLKoder
Copy link
Author

LLKoder commented May 25, 2023

@akx, also does this work for Windows?

@akx
Copy link
Collaborator

akx commented May 25, 2023

@LLKoder
Copy link
Author

LLKoder commented May 25, 2023

Thanks a lot!

@brknsoul
Copy link

brknsoul commented May 26, 2023

mklink /d Link Target

example:
mklink /d wildcards c:\automatic\extensions\sd-dynamic-prompts\wildcards
will create a link wildcards in your current directory that points to c:\automatic\extensions\sd-dynamic-prompts\wildcards

(/d creates a directory link rather than a file link. Note that you can substitute /d with /j for a directory junction. Junctions are resolved server-side, rather than client-side; useful for some applications running over a network.)

@tscott65
Copy link

tscott65 commented Jun 8, 2023

Doesn't this already work according to the documentation:

WILDCARDS:
The extension looks for wildcard files in WILDCARD_DIR. The default location is /path/to/stable-diffusion-webui/extensions/sd-dynamic-prompts/wildcards. It can also be manually defined in the main webui config.json under wildcard_dir. When in doubt, the help text for the extension in the webui lists the full path to WILDCARD_DIR

@LLKoder
Copy link
Author

LLKoder commented Jun 11, 2023

If I'm being honest I didn't know that, I found that options in Settings of WebUI and then I wrote:

It would be nice if user can to choose in settings the path where the wildcards database is located (+subdirrectorys).

I mean WebUI either.

@YannJun
Copy link

YannJun commented Aug 11, 2023

Doesn't this already work according to the documentation:

WILDCARDS: The extension looks for wildcard files in WILDCARD_DIR. The default location is /path/to/stable-diffusion-webui/extensions/sd-dynamic-prompts/wildcards. It can also be manually defined in the main webui config.json under wildcard_dir. When in doubt, the help text for the extension in the webui lists the full path to WILDCARD_DIR

Don't think so, I set wild_card (upper+lower case) in config.json with multiple restart of WebUI, the path is still hardcoded to the extension one.
图片
图片

@akx
Copy link
Collaborator

akx commented Aug 14, 2023

@YannJun wildcar is not wildcard.

@YannJun
Copy link

YannJun commented Aug 14, 2023

@YannJun wildcar is not wildcard.

indeed, too blind to see it.

@clarencestephen
Copy link

clarencestephen commented Jun 22, 2024

So @YannJun did adding "wildcard_dir": "your-path" work?

@ryankhart
Copy link

ryankhart commented Sep 8, 2024

So @YannJun did adding "wildcard_dir": "your-path" work?

I can indeed confirm that it must be all lowercase. All caps did not work for me, even though the README.md said to use all caps.

This works for me:
"wildcard_dir": "E:\\AI\\SD\\models\\_wildcards",

This did not work for me:
"WILDCARD_DIR": "E:\\AI\\SD\\models\\_wildcards",

Also, I found the like of code where this is defined here:

wildcard_dir = getattr(opts, "wildcard_dir", None)

(side note, I prefaced my most frequently modified folders in my models folder with an underscore so that they all get sorted to the top so I don't have to scroll to find them.)

@Talk2Giuseppe
Copy link

That's a great tip @ryankhart! It works wonders when adding new resources such as models and loras. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants