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

[Enhancement]Use scripts.basedir() than prompt_gallery_name.json #20

Closed
leohu1 opened this issue Jan 15, 2023 · 2 comments
Closed

[Enhancement]Use scripts.basedir() than prompt_gallery_name.json #20

leohu1 opened this issue Jan 15, 2023 · 2 comments

Comments

@leohu1
Copy link

leohu1 commented Jan 15, 2023

Use scripts.basedir() than prompt_gallery_name.json
I think it's simpler, don't you?

@dr413677671
Copy link
Owner

No it points to the rootpath of webui

>scripts.basedir()
>'xxxxx\\stable-diffusion-webui'

@dr413677671 dr413677671 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2023
@leohu1
Copy link
Author

leohu1 commented Jan 17, 2023

No, you shoud not use it in function.
But like this:

extension_dir = scripts.basedir()

def on_app_started(demo: Optional[gr.Blocks], app: FastAPI):
    app.mount('/prompt_gallery', StaticFiles(directory=extension_dir,html=True))	

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