deep-floyd / IF

Other
7.64k stars 497 forks source link

can not load "stable-diffusion-x4-upscaler" #68

Open LIU-ZHIHAO opened 1 year ago

LIU-ZHIHAO commented 1 year ago

error info:

from deepfloyd_if.modules.t5 import T5Embedder device = 'cuda:0' if_I = IFStageI('IF-I-XL-v1.0', device=device) D:\AiTools\DeepFloydIF\IF\vnev\lib\site-packages\huggingface_hub\file_download.py:1104: FutureWarning: The force_filename parameter is deprecated as a new caching system, which keeps the filenames as they are on the Hub, is now in place. warnings.warn( if_II = IFStageII('IF-II-L-v1.0', device=device) if_III = StableStageIII('stable-diffusion-x4-upscaler', device=device) Traceback (most recent call last): File "", line 1, in File "D:\AiTools\DeepFloydIF\IF\vnev\lib\site-packages\deepfloyd_if\modules\stage_III_sd_x4.py", line 34, in init self.model = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype, token=self.hf_token) File "D:\AiTools\DeepFloydIF\IF\vnev\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 884, in from_pretrained cached_folder = cls.download( File "D:\AiTools\DeepFloydIF\IF\vnev\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 1208, in download config_file = hf_hub_download( File "D:\AiTools\DeepFloydIF\IF\vnev\lib\site-packages\huggingface_hub\utils_validators.py", line 112, in _inner_fn validate_repo_id(arg_value) File "D:\AiTools\DeepFloydIF\IF\vnev\lib\site-packages\huggingface_hub\utils_validators.py", line 166, in validate_repo_id raise HFValidationError( huggingface_hub.utils.validators.HFValidationError: Repo id must use alphanumeric chars or '-', '', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'stabilityai\stable-diffusion-x4-upscaler'.

xieanbin commented 1 year ago

{your venv}\Lib\site-packages\deepfloyd_if\modules\stage_III_sd_x4.py-> line23 : change "model_id = os.path.join('stabilityai', self.dir_or_name)" to '"model_id = 'stabilityai/' + self.dir_or_name"

EvanTheBoy commented 1 year ago

I changed the code at line 23 to model_id = 'stabilityai/' + self.dir_or_name but it still didn't work for me