va1shn9v / PromptIR

PromptIR: Prompting for All-in-One Blind Image Restoration [NeurIPS 2023]
https://arxiv.org/abs/2306.13090
Other
297 stars 22 forks source link

Error with Demo #32

Closed munib94 closed 2 months ago

munib94 commented 2 months ago

Hi

I am having issues when I try to execute the following:

python demo.py --test_path './test/demo/image.png' --output_path './output/demo/'

My error is:

Traceback (most recent call last):
  File "demo.py", line 108, in <module>
    net  = PromptIRModel().load_from_checkpoint(ckpt_path).to(device)
  File "/home/user/.pyenv/versions/promptir/lib/python3.8/site-packages/lightning/pytorch/utilities/model_helpers.py", line 121, in wrapper
    raise TypeError(
TypeError: The classmethod `PromptIRModel.load_from_checkpoint` cannot be called on an instance. Please call it on the class type and make sure the return value is used.

I did not make any modifications to the code. Help with this issue is much appreciated.

munib94 commented 2 months ago

Nevermind, I downgraded my lightning package to match the version in the env.yml file. This solved the issue.