limuloo / PyDIff

[IJCAI 2023 ORAL] "Pyramid Diffusion Models For Low-light Image Enhancement" (Official Implementation)
Other
153 stars 8 forks source link

About Installation #16

Open XLR-man opened 7 months ago

XLR-man commented 7 months ago

If I am not an administrator of the server, how can I complete the installation?

BASICSR_EXT=True sudo $(which python) setup.py develop
cd ../PyDiff
pip install -r requirements.txt
BASICSR_EXT=True sudo $(which python) setup.py develop
Henry-GongZY commented 7 months ago

Just don't use sudo, that's also ok.

limuloo commented 7 months ago

@XLR-man @Henry-GongZY Thank you very much for your interest in our work! @XLR-man, you can start by trying out the suggestions made by @Henry-GongZY. @XLR-man , If you encounter any issues afterwards, please feel free to raise them in this issue again.

XLR-man commented 6 months ago

@Henry-GongZY Thank you.

By the way , Because I interrupted the training, and then I want to continue training, so I changed the path of resume state, but an error occurred, it seems that the key of iter does not exist, how to solve it?

Traceback (most recent call last):
  File "pydiff/train.py", line 11, in <module>
    train_pipeline(root_path)
  File "/home/xielangren/project/PyDIff/BasicSR-light/basicsr/train.py", line 100, in train_pipeline
    resume_state = load_resume_state(opt)
  File "/home/xielangren/project/PyDIff/BasicSR-light/basicsr/train.py", line 87, in load_resume_state
    check_resume(opt, resume_state['iter'])
KeyError: 'iter'
Traceback (most recent call last):
  File "/home/xielangren/miniconda3/envs/PyDiff/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/xielangren/miniconda3/envs/PyDiff/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/xielangren/miniconda3/envs/PyDiff/lib/python3.7/site-packages/torch/distributed/launch.py", line 260, in <module>
    main()
  File "/home/xielangren/miniconda3/envs/PyDiff/lib/python3.7/site-packages/torch/distributed/launch.py", line 256, in main
    cmd=cmd)
subprocess.CalledProcessError: Command '['/home/xielangren/miniconda3/envs/PyDiff/bin/python', '-u', 'pydiff/train.py', '--local_rank=0', '-opt', 'options/train_v2.yaml', '--launcher', 'pytorch']' returned non-zero exit status 1.

@limuloo

limuloo commented 6 months ago

@XLR-man You can modify 'pretrain_network_g' in train.yaml to read the previously saved model to continue training. https://github.com/limuloo/PyDIff/blob/99512399045a9439a34c76f4d5aab2248a5e0890/PyDiff/options/train_v1.yaml#L79