Skip to content

Missing scheduler_config.json file for inference with argument --control_type 'grayscale' #84

@hazebroufe

Description

@hazebroufe

Hey, I am trying different parameter configurations and noticed that when running inference with the default parameters except --control_type 'grayscale' (instead of --control_type 'realisr' (default) ) and --pasd_model_path "runs/pasd_rrdb/checkpoint-100000" (instead of --pasd_model_path "runs/pasd_rrdb/checkpoint-100000" (default) ) (and also except the input and output folder), I got this error:

Traceback (most recent call last):
  File "/home/go69niz/Masterarbeit-Codebase/Reference-Models/PASD/test_pasd.py", line 338, in <module>
    main(args)
  File "/home/go69niz/Masterarbeit-Codebase/Reference-Models/PASD/test_pasd.py", line 193, in main
    pipeline = load_pasd_pipeline(args, accelerator, enable_xformers_memory_efficient_attention)
  File "/home/go69niz/Masterarbeit-Codebase/Reference-Models/PASD/test_pasd.py", line 44, in load_pasd_pipeline
    scheduler = UniPCMultistepScheduler.from_pretrained("/".join(args.pasd_model_path.split("/")[:-1]), subfolder="scheduler")
  File "/home/go69niz/anaconda3/envs/pasd_2023/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/go69niz/anaconda3/envs/pasd_2023/lib/python3.10/site-packages/diffusers/schedulers/scheduling_utils.py", line 152, in from_pretrained
    config, kwargs, commit_hash = cls.load_config(
  File "/home/go69niz/anaconda3/envs/pasd_2023/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/go69niz/anaconda3/envs/pasd_2023/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 377, in load_config
    raise EnvironmentError(
OSError: Error no file named scheduler_config.json found in directory runs/pasd_rrdb.

I didn't get the error with --control_type 'realisr' and all other parameters kept the same with respect to the error-case.

According to my research, the error is due to diffusers trying to load a scheduler via UniPCMultistepScheduler.from_pretrained(..., subfolder="scheduler"). This API expects a Diffusers-style directory that contains scheduler/scheduler_config.json in the given model path.
But path runs/pasd_rrdb (downloadable via the links given in this repo) does not have that, so diffusers throws the error. And in the whole GitHub directory, there is in no such file. The only one appearing in my search is the one from the StableDiffusion backbone checkpoint in checkpoints/stable-diffusion-v1-5/scheduler.

=> could the authors please upload the missing file, for pasd_rrdb as well as for pasd please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions