FileNotFoundError: [Errno 2] No such file or directory: '/content/GFPGAN/results/restored_imgs' #557
Replies: 7 comments 2 replies
-
Hello @Easietorun03 the error is because of the same problem described here: You need to execute next command, to change file degradations.py: |
Beta Was this translation helpful? Give feedback.
-
That didn't work, I put the command as you told me, and the error still
appears.
El mar, 9 jul 2024, 11:44 p. m., LexLuthorX ***@***.***>
escribió:
… Hello @Easietorun03 <https://github.com/Easietorun03> the error is
because of the same problem described here:
AUTOMATIC1111/stable-diffusion-webui#13985
<AUTOMATIC1111/stable-diffusion-webui#13985>
You need to execute next command, to change file degradations.py:
sed -i 's/torchvision.transforms.functional_tensor
import/torchvision.transforms.functional import/'
/usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py
—
Reply to this email directly, view it on GitHub
<#557 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIR5BEJPGJ7PB2XM3X4NKV3ZLRKTRAVCNFSM6AAAAABJYSILTWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBQGMYDCMA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If I use google colab
El mié, 10 jul 2024, 9:55 p. m., LexLuthorX ***@***.***>
escribió:
… Are you using Cloud colab.research.google.com or have you installed it in
your computer?
If using Colab, like that sample here:
https://colab.research.google.com/drive/1vNp4qllFQgTyyQragmucllIy4K-EGt0X
you should put that line at he end of step 2, after the wget command:
!sed -i 's/torchvision.transforms.functional_tensor
import/torchvision.transforms.functional import/'
/usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py
If using in your computer, the sed command should change the line in
/usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py file,
you should test that the line:
from torchvision.transforms.functional_tensor import rgb_to_grayscale
changed to:
from torchvision.transforms.functional import rgb_to_grayscale
—
Reply to this email directly, view it on GitHub
<#557 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIR5BEMGV4ONAZ4RSANTOELZLWGSTAVCNFSM6AAAAABJYSILTWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBRGM4TQNY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Oh my god, it's been solved, thank you very much man, you don't know the
frustration I had trying to solve this AI, thank you very much.
El mié, 10 jul 2024, 10:01 p. m., Easier To Run ***@***.***>
escribió:
… If I use google colab
El mié, 10 jul 2024, 9:55 p. m., LexLuthorX ***@***.***>
escribió:
> Are you using Cloud colab.research.google.com or have you installed it
> in your computer?
>
> If using Colab, like that sample here:
> https://colab.research.google.com/drive/1vNp4qllFQgTyyQragmucllIy4K-EGt0X
> you should put that line at he end of step 2, after the wget command:
> !sed -i 's/torchvision.transforms.functional_tensor
> import/torchvision.transforms.functional import/'
> /usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py
>
> If using in your computer, the sed command should change the line in
> /usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py file,
> you should test that the line:
> from torchvision.transforms.functional_tensor import rgb_to_grayscale
> changed to:
> from torchvision.transforms.functional import rgb_to_grayscale
>
> —
> Reply to this email directly, view it on GitHub
> <#557 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BIR5BEMGV4ONAZ4RSANTOELZLWGSTAVCNFSM6AAAAABJYSILTWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBRGM4TQNY>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
Previously I had the same error as you, but with that change it's working fine for me: After play of step 2, the last grep command should print that line: And finally the step 3 should be working with no error. |
Beta Was this translation helpful? Give feedback.
-
I was able to solve it, thank you very much.
El mié, 10 jul 2024, 10:10 p. m., LexLuthorX ***@***.***>
escribió:
… Previously I had the same error as you, but with that change it's working
fine for me:
2024-07-10.22_04_33.png (view on web)
<https://github.com/TencentARC/GFPGAN/assets/175162848/d0163340-8fc1-4933-97ac-46266f74dffd>
After play of step 2, the last grep command should print that line:
2024-07-10.22_07_36.png (view on web)
<https://github.com/TencentARC/GFPGAN/assets/175162848/4d396523-dfb8-4acf-8048-47f346e87417>
And finally the step 3 should be working with no error.
—
Reply to this email directly, view it on GitHub
<#557 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIR5BELZLEQ3LTN3W6SKQWLZLWIKVAVCNFSM6AAAAABJYSILTWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBRGQYDQMI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello bro, I need your help to see if you can solve this problem, it
is a different AI but in Google Colab, and the truth is when I try to
activate the last block of this AI I get this error:
…---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-9-29f0b9317eb2> <https://localhost:8080/#> in <cell
line: 12>() 10
clean_file=f"{base_path}/{clean_file_name(input_video_path)}" 11
shutil.copy(input_video_path,clean_file)
---> 12 save_path=upscale_video(clean_file) 13 successful() 14
from google.colab import files
------------------------------
1 frames
------------------------------
<ipython-input-5-b1b260f65c0b> <https://localhost:8080/#> in
make_video() 49 processedVideoOutputPath =
f'{base_path}/output' 50
create_directory(processedVideoOutputPath)
---> 51 dir_list = os.listdir(restoredFramesPath) 52
dir_list.sort() 53
FileNotFoundError: [Errno 2] No such file or directory:
'/content/GFPGAN/results/restored_imgs/'
I wait your answer:)
El mié, 10 jul 2024, 10:13 p. m., LexLuthorX ***@***.***>
escribió:
Very happy for you, and for all people having problems using that great
piece of software :)
—
Reply to this email directly, view it on GitHub
<#557 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIR5BEMGEMN2EPQO2NV6TB3ZLWIUZAVCNFSM6AAAAABJYSILTWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBRGQYDSNI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Traceback (most recent call last):
File "/content/GFPGAN/inference_gfpgan.py", line 7, in
from basicsr.utils import imwrite
File "/usr/local/lib/python3.10/dist-packages/basicsr/init.py", line 4, in
from .data import *
File "/usr/local/lib/python3.10/dist-packages/basicsr/data/init.py", line 22, in
_dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
File "/usr/local/lib/python3.10/dist-packages/basicsr/data/init.py", line 22, in
_dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.10/dist-packages/basicsr/data/realesrgan_dataset.py", line 11, in
from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
File "/usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py", line 8, in
from torchvision.transforms.functional_tensor import rgb_to_grayscale
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'
FileNotFoundError Traceback (most recent call last)
in <cell line: 61>()
59 fps = 30
60
---> 61 create_video_from_frames(frames_folder, output_path, fps)
62
63 get_ipython().system('rm -r /content/GFPGAN/results')
in create_video_from_frames(frames_folder, output_path, fps)
36 def create_video_from_frames(frames_folder, output_path, fps):
37
---> 38 image_files = sorted([f for f in os.listdir(frames_folder) if f.endswith(".jpg")], key=ordenar_por_numero)
39
40 image_path = os.path.join(frames_folder, image_files[0])
FileNotFoundError: [Errno 2] No such file or directory: '/content/GFPGAN/results/restored_imgs'
I had this problem months ago and without being able to solve it, it tells me that the results folder along with the restored_imgs folder were not created in the GFP GAN folder, I tried to create the folders, but once starting the improvement process, it automatically throws me out The error you are seeing, deleted the folders that I created.
I have also tried to install some things with the help of Chatgtp, but in the end the problem keeps appearing, and I no longer know what to do to fix this problem.
I need help to solve this problem please, and thank you for your attention, I await your answers.
Beta Was this translation helpful? Give feedback.
All reactions