about configfile
Could you please provide some guidance on how to resolve this issue? I have already downloaded the entire SSD-1B file:
OSError: /data/models/SSD-1B does not appear to have a file named config.json. Checkout 'https://huggingface.co//data/models/SSD-1B/main' for available files.
Could you please use the loading given in the usage section in the model card and get back?
this is code:
from diffusers import StableDiffusionXLPipeline
import torch
import numpy as np
pipe = StableDiffusionXLPipeline.from_pretrained("/data/models/SSD-1B", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
pipe.to("cuda")
if using torch < 2.0
pipe.enable_xformers_memory_efficient_attention()
prompt = "An astronaut riding a green horse" # Your prompt here
neg_prompt = "ugly, blurry, poor quality" # Negative prompt here
image = pipe(prompt=prompt, negative_prompt=neg_prompt).images[0]
import numpy as np
letters = np.array(list(string.ascii_letters))
random_letters = ''.join(np.random.choice(letters, 6))
image.save("static/{}.png".format(random_letters))
Issue occurred when using from_pretrained:
pipe = StableDiffusionXLPipeline.from_pretrained("/data/models/SSD-1B", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
Could you please use the loading given in the usage section in the model card and get back?
I use the code from model card
Issue occurred when using from_pretrained:
pipe = StableDiffusionXLPipeline.from_pretrained("/data/models/SSD-1B", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")v
I'll look into it. Thanks for letting us know!
I'll look into it. Thanks for letting us know!
Excuse me
Can this issue be reproduced? Do you know why this issue occurred?
pipe = StableDiffusionXLPipeline.from_pretrained("/data/models/SSD-1B", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
File "/home/anaconda3/envs/stable-diffusion/lib/python3.10/site-packages/diffusers-0.22.0.dev0-py3.10.egg/diffusers/pipelines/pipeline_utils.py", line 1249, in from_pretrained
loaded_sub_model = load_sub_model(
File "/home/anaconda3/envs/stable-diffusion/lib/python3.10/site-packages/diffusers-0.22.0.dev0-py3.10.egg/diffusers/pipelines/pipeline_utils.py", line 505, in load_sub_model
loaded_sub_model = load_method(cached_folder, **loading_kwargs)
File "/home/anaconda3/envs/stable-diffusion/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2662, in from_pretrained
config, model_kwargs = cls.config_class.from_pretrained(
File "/home/anaconda3/envs/stable-diffusion/lib/python3.10/site-packages/transformers/models/clip/configuration_clip.py", line 133, in from_pretrained
config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/home/anaconda3/envs/stable-diffusion/lib/python3.10/site-packages/transformers/configuration_utils.py", line 620, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/home/anaconda3/envs/stable-diffusion/lib/python3.10/site-packages/transformers/configuration_utils.py", line 675, in _get_config_dict
resolved_config_file = cached_file(
File "/home/anaconda3/envs/stable-diffusion/lib/python3.10/site-packages/transformers/utils/hub.py", line 400, in cached_file
raise EnvironmentError(
OSError: /data/models/SSD-1B does not appear to have a file named config.json. Checkout 'https://huggingface.co//data/models/SSD-1B/main' for available files.
Sorry for the delay! Could you just use "segmind/SSD-1B" instead of "/data/models/SSD-1B"? Unless you've already downloaded the whole folder?
Sorry for the delay! Could you just use "segmind/SSD-1B" instead of "/data/models/SSD-1B"? Unless you've already downloaded the whole folder?
I have downloaded the entire folder instead of downloading specific files through the program, and all files have been downloaded to /data/models/SSD-1B
The following is the directory of the downloaded folder:
βββ model_index.json
βββ README.md
βββ scheduler
β βββ scheduler_config.json
βββ SSD-1B-modelspec.safetensors
βββ SSD-1B.safetensors
βββ text_encoder
β βββ config.json
β βββ model.fp16.safetensors
β βββ model.safetensors
βββ text_encoder2
β βββ config.json
β βββ model.fp16.safetensors
β βββ model.safetensors
βββ tokenizer
β βββ merges.txt
β βββ special_tokens_map.json
β βββ tokenizer_config.json
β βββ vocab.json
βββ tokenizer_2
β βββ merges.txt
β βββ special_tokens_map.json
β βββ tokenizer_config.json
β βββ vocab.json
βββ unet
β βββ config.json
β βββ diffusion_pytorch_model.fp16.safetensors
β βββ diffusion_pytorch_model.safetensors
βββ vae
βββ config.json
βββ diffusion_pytorch_model.fp16.safetensors
βββ diffusion_pytorch_model.safetensors
I have watched it multiple times and did not find any missing downloads
Could you use "./data/models/SSD-1B" instead?
Could you use "./data/models/SSD-1B" instead?
/data and /home are at the same level, and /data is where my hanging disk is located
I can try this method, putting the model in the same directory as the project