Skip to content

Cannot run inference script #4

@jerafs

Description

@jerafs

After setting up the environment as per the instructions in the readme and downloading the pre-trained weights, I still cannot run inference. Calling the infer.py script produces:

Repository Not Found for url: https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/scheduler/scheduler_config.json.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jer/repos/swiftedit/infer.py", line 94, in <module>
    aux_model = AuxiliaryModel()
                ^^^^^^^^^^^^^^^^
  File "/home/jer/repos/swiftedit/models.py", line 107, in __init__
    self.noise_scheduler = DDPMScheduler.from_pretrained(model_name, subfolder="scheduler")
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jer/.local/src/miniconda/envs/swift/lib/python3.12/site-packages/diffusers/schedulers/scheduling_utils.py", line 140, in from_pretrained
    config, kwargs, commit_hash = cls.load_config(
                                  ^^^^^^^^^^^^^^^^
  File "/home/jer/.local/src/miniconda/envs/swift/lib/python3.12/site-packages/diffusers/configuration_utils.py", line 384, in load_config
    raise EnvironmentError(
OSError: stabilityai/stable-diffusion-2-1-base is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo with `use_auth_token` or log in with `huggingface-cli login`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions