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

How to add another models to generate image #76

Open
Jzz8977 opened this issue May 11, 2024 · 1 comment
Open

How to add another models to generate image #76

Jzz8977 opened this issue May 11, 2024 · 1 comment

Comments

@Jzz8977
Copy link

Jzz8977 commented May 11, 2024

Q1: How to add another models in select
Q2: ### Is it possible to turn off the automatic download function?
Reference your own local files
Or generate a custom_node folder or models folder in the project directory.

Below is the code I tried in gradio_app_sdxl_specific_id_old_version.py file
`
models_dict = {

"Juggernaut": r"D:\StoryDiffusion\data\models\Juggernaut\Juggernaut-XL_v9_RunDiffusionPhoto_v2.safetensors",

"RealVision": r"D:\StoryDiffusion\data\RealVisXL_V4.0" ,

"SDXL": r"D:\StoryDiffusion\data\stable-diffusion-xl-base-1.0" ,

"Unstable": r"D:\StoryDiffusion\data\models\sdxl-unstable-diffusers-y",

"starlightXLAnimated_v3": r"D:\StoryDiffusion\data\models\SDX\starlightXLA3.safetensors"

}`

`Running on local URL: http://0.0.0.0:7860

Traceback (most recent call last):

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\gradio\queueing.py", line 501, in call_prediction
output = await route_utils.call_process_api(

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\gradio\route_utils.py", line 258, in call_process_api
output = await app.get_blocks().process_api(

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\gradio\blocks.py", line 1710, in process_api
result = await self.call_function(

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\gradio\blocks.py", line 1262, in call_function
prediction = await utils.async_iteration(iterator)

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\gradio\utils.py", line 517, in async_iteration
return await iterator.anext()

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\gradio\utils.py", line 510, in anext
return await anyio.to_thread.run_sync(

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\anyio_backends_asyncio.py", line 2144, in run_sync_in_worker_thread
return await future

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\anyio_backends_asyncio.py", line 851, in run
result = context.run(func, *args)

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\gradio\utils.py", line 493, in run_sync_iterator_async
return next(iterator)

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\gradio\utils.py", line 676, in gen_wrapper
response = next(iterator)

File "d:\StoryDiffusion\gradio_app_sdxl_specific_id_old_version.py", line 519, in process_generation
pipe = StableDiffusionXLPipeline.from_pretrained(sd_model_path, torch_dtype=torch.float16, use_safetensors=use_safe_tensor)

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 1096, in from_pretrained
cached_folder = cls.download(

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 1656, in download
info = model_info(pretrained_model_name, token=token, revision=revision)

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\huggingface_hub\utils_validators.py", line 106, in _inner_fn
validate_repo_id(arg_value)

File "D:\Dev\Anaconda3\envs\sydd\lib\site-packages\huggingface_hub\utils_validators.py", line 160, in validate_repo_id
raise HFValidationError(

huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'D:\StoryDiffusion\data\models\SDX\starlightXLA3.safetensors'.`

@Z-YuPeng
Copy link
Collaborator

Please run python gradio_app_sdxl_specific_id_low_vram.py
And You can add your model in the config

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