AttributeError: module diffusers has no attribute LCMScheduler
slashdottir opened this issue · 4 comments
This was working great a week or two ago, then I ran it today, same env, no changes or updates, suddenly it has an error?
I'm not sure how that's possible
Thank you for any clues
python main.py "a beautiful apple floating in outer space, like a planet" --steps 4 --width 512 --height 512
/Users/foo/src/latent-consistency-model/venv310/lib/python3.10/site-packages/huggingface_hub/file_download.py:659: FutureWarning: 'cached_download' is the legacy way to download files from the HF hub, please consider upgrading to 'hf_hub_download'
warnings.warn(
Loading pipeline components...: 43%|████████████████████████████████████████████████████████▏ | 3/7 [00:00<00:00, 7.79it/s]
Traceback (most recent call last):
File "/Users/foo/src/latent-consistency-model/main.py", line 69, in
main()
File "/Users/foo/src/latent-consistency-model/main.py", line 45, in main
predictor = Predictor()
File "/Users/foo/src/latent-consistency-model/main.py", line 9, in init
self.pipe = self._load_model()
File "/Users/foo/src/latent-consistency-model/main.py", line 12, in _load_model
model = DiffusionPipeline.from_pretrained(
File "/Users/foo/src/latent-consistency-model/venv310/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 1105, in from_pretrained
loaded_sub_model = load_sub_model(
File "/Users/foo/src/latent-consistency-model/venv310/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 391, in load_sub_model
class_obj, class_candidates = get_class_obj_and_candidates(
File "/Users/foo/src/latent-consistency-model/venv310/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 319, in get_class_obj_and_candidates
class_obj = getattr(library, class_name)
File "/Users/foo/src/latent-consistency-model/venv310/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 677, in getattr
raise AttributeError(f"module {self.name} has no attribute {name}")
AttributeError: module diffusers has no attribute LCMScheduler. Did you mean: 'DDIMScheduler'?
You need the current version of main.py
, as well as requirements.txt
(which results in an updated diffusers
).
So do a git pull
, make sure you're within the correct virtual environment (if you're not, do a source venv/bin/activate
), and run pip install -r requirements.txt
Those are the steps I took to get myself running again.
Update your diffusers to lastest version. like:
pip install diffusers==0.23.1
This is still affecting new installs, really should be rolled into the one-click install process.
by me is
AttributeError: module 'diffusers.schedulers' has no attribute 'scheduling_lcm'. Did you mean: 'scheduling_ddim'?
anyone help?