-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Closed
Labels
bugSomething isn't workingSomething isn't workingstaleIssues that haven't received updatesIssues that haven't received updates
Description
Describe the bug
Loading a diffusion model broke suddenly.
I've already tried pip reinstalling diffusers (from pip as well as this github repo)
Reproduction
from diffusers import DiffusionPipeline
import torch
model_id = "runwayml/stable-diffusion-v1-5"
ref_pipe = DiffusionPipeline.from_pretrained(
model_id,
# revision=revision,
custom_pipeline="stable_diffusion_reference",
torch_dtype=torch.float16,
use_auth_token=True,
cache_dir="./AI/StableDiffusion"
)
Logs
─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ C:\Users\Nagol\AppData\Local\Temp\ipykernel_68840\2161590897.py:6 in <module> │
│ │
│ [Errno 2] No such file or directory: │
│ 'C:\\Users\\Nagol\\AppData\\Local\\Temp\\ipykernel_68840\\2161590897.py' │
│ │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipelines\pip │
│ eline_utils.py:884 in from_pretrained │
│ │
│ 881 │ │ # 1. Download the checkpoints and configs │
│ 882 │ │ # use snapshot download here to get it working from from_pretrained │
│ 883 │ │ if not os.path.isdir(pretrained_model_name_or_path): │
│ ❱ 884 │ │ │ cached_folder = cls.download( │
│ 885 │ │ │ │ pretrained_model_name_or_path, │
│ 886 │ │ │ │ cache_dir=cache_dir, │
│ 887 │ │ │ │ resume_download=resume_download, │
│ │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipelines\pip │
│ eline_utils.py:1265 in download │
│ │
│ 1262 │ │ │ ] │
│ 1263 │ │ │ │
│ 1264 │ │ │ # retrieve passed components that should not be downloaded │
│ ❱ 1265 │ │ │ pipeline_class = _get_pipeline_class( │
│ 1266 │ │ │ │ cls, config_dict, custom_pipeline=custom_pipeline, cache_dir=cache_dir, │
│ 1267 │ │ │ ) │
│ 1268 │ │ │ expected_components, _ = cls._get_signature_keys(pipeline_class) │
│ │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipelines\pip │
│ eline_utils.py:336 in _get_pipeline_class │
│ │
│ 333 │ │ else: │
│ 334 │ │ │ file_name = CUSTOM_PIPELINE_FILE_NAME │
│ 335 │ │ │
│ ❱ 336 │ │ return get_class_from_dynamic_module( │
│ 337 │ │ │ custom_pipeline, module_file=file_name, cache_dir=cache_dir, revision=revisi │
│ 338 │ │ ) │
│ 339 │
│ │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\utils\dynamic │
│ _modules_utils.py:445 in get_class_from_dynamic_module │
│ │
│ 442 │ cls = get_class_from_dynamic_module("sgugger/my-bert-model", "modeling.py", "MyBertM │
│ 443 │ """ │
│ 444 │ # And lastly we get the class inside our newly created module │
│ ❱ 445 │ final_module = get_cached_module_file( │
│ 446 │ │ pretrained_model_name_or_path, │
│ 447 │ │ module_file, │
│ 448 │ │ cache_dir=cache_dir, │
│ │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\utils\dynamic │
│ _modules_utils.py:264 in get_cached_module_file │
│ │
│ 261 │ │ resolved_module_file = module_file_or_url │
│ 262 │ │ submodule = "local" │
│ 263 │ elif pretrained_model_name_or_path.count("/") == 0: │
│ ❱ 264 │ │ available_versions = get_diffusers_versions() │
│ 265 │ │ # cut ".dev0" │
│ 266 │ │ latest_version = "v" + ".".join(__version__.split(".")[:3]) │
│ 267 │
│ │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\utils\dynamic │
│ _modules_utils.py:46 in get_diffusers_versions │
│ │
│ 43 def get_diffusers_versions(): │
│ 44 │ url = "https://pypi.org/pypi/diffusers/json" │
│ 45 │ releases = json.loads(request.urlopen(url).read())["releases"].keys() │
│ ❱ 46 │ return sorted(releases, key=StrictVersion) │
│ 47 │
│ 48 │
│ 49 def init_hf_modules(): │
│ │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\v │
│ ersion.py:54 in __init__ │
│ │
│ 51 │ │
│ 52 │ def __init__(self, vstring=None): │
│ 53 │ │ if vstring: │
│ ❱ 54 │ │ │ self.parse(vstring) │
│ 55 │ │ warnings.warn( │
│ 56 │ │ │ "distutils Version classes are deprecated. " │
│ 57 │ │ │ "Use packaging.version instead.", │
│ │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\v │
│ ersion.py:157 in parse │
│ │
│ 154 │ def parse(self, vstring): │
│ 155 │ │ match = self.version_re.match(vstring) │
│ 156 │ │ if not match: │
│ ❱ 157 │ │ │ raise ValueError("invalid version number '%s'" % vstring) │
│ 158 │ │ │
│ 159 │ │ (major, minor, patch, prerelease, prerelease_num) = match.group(1, 2, 4, 5, 6) │
│ 160 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: invalid version number '0.17.0rc0'System Info
windows+python3.10
SomaNonaka, ghunkins, kasima and ShylockGao
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstaleIssues that haven't received updatesIssues that haven't received updates