Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Restore the photos with scratches" section fails with **"FileNotFoundError: [Errno 2] No such file or directory: '/content/photo_restoration/Global/checkpoints/detection/FT_Epoch_latest.pt'"** #295

Open
jareilly opened this issue Apr 21, 2024 · 1 comment

Comments

@jareilly
Copy link

I am trying to run on Google Colab, using a Connected T4 hosted runtime.

The "Restore the photos with scratches" section fails with "FileNotFoundError: [Errno 2] No such file or directory: '/content/photo_restoration/Global/checkpoints/detection/FT_Epoch_latest.pt'"

  1. Colab runs this:
    !rm -rf /content/photo_restoration/output/*
    !python run.py --input_folder /content/photo_restoration/test_images/old_w_scratch/ --output_folder /content/photo_restoration/output/ --GPU 0 --with_scratch

  2. Output is this:
    Running Stage 1: Overall restoration
    initializing the dataloader
    Traceback (most recent call last):
    File "/content/photo_restoration/Global/detection.py", line 178, in
    main(config)
    File "/content/photo_restoration/Global/detection.py", line 92, in main
    checkpoint = torch.load(checkpoint_path, map_location="cpu")
    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 998, in load
    with _open_file_like(f, 'rb') as opened_file:
    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 445, in _open_file_like
    return _open_file(name_or_buffer, mode)
    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 426, in init
    super().init(open(name, mode))
    FileNotFoundError: [Errno 2] No such file or directory: '/content/photo_restoration/Global/checkpoints/detection/FT_Epoch_latest.pt'
    You are using NL + Res
    ./checkpoints/restoration/VAE_A_quality/latest_net_G.pth not exists yet!
    ./checkpoints/restoration/VAE_B_scratch/latest_net_G.pth not exists yet!
    ./checkpoints/restoration/mapping_scratch/latest_net_mapping_net.pth not exists yet!
    Traceback (most recent call last):
    File "/content/photo_restoration/Global/test.py", line 114, in
    input_loader = os.listdir(opt.test_input)
    FileNotFoundError: [Errno 2] No such file or directory: '/content/photo_restoration/output/stage_1_restore_output/masks/input'

@Xadoy
Copy link

Xadoy commented May 9, 2024

It's likely caused by the same issue of #252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants