about configfile

#16
by obtion - opened

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.

Segmind org
β€’
edited Oct 27, 2023

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

Segmind org

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.

Segmind org

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

Segmind org

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

obtion changed discussion status to closed

Sign up or log in to comment