nagadomi / nunif

Misc; latest version of waifu2x; 2D video to stereo 3D video conversion
MIT License
1.58k stars 142 forks source link

update.bat - error in the work log #189

Closed cynodesmus closed 2 months ago

cynodesmus commented 3 months ago

Recently I decided to run an update script, and an error message appeared in the work log:

Download Models...
Traceback (most recent call last):
  File "runpy.py", line 187, in _run_module_as_main
  File "runpy.py", line 110, in _get_module_details
  File "D:\nunif\nunif\waifu2x\__init__.py", line 1, in <module>
    from .utils import Waifu2x
  File "D:\nunif\nunif\waifu2x\utils.py", line 3, in <module>
    import torch
  File "D:\nunif\python\lib\site-packages\torch\__init__.py", line 148, in <module>
    raise err
OSError: [WinError 126] The specified module was not found. Error loading "D:\nunif\python\lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.
Error

File fbgemm.dll is present at the specified path. The error may be related to update "torch-2.4.0+cu118"

nagadomi commented 3 months ago

Have you installed "Microsoft Visual C++ Redistributable Packages" https://aka.ms/vs/16/release/vc_redist.x64.exe ?

cynodesmus commented 3 months ago

I reinstalled VC++, but the problem persisted. vc 7 days ago, the update took place without errors. Today, after updating Torch from version 2.3.1 to version 2.4.0, this error appeared.

nagadomi commented 3 months ago

I could not reproduce this error in my nunif-windows package environment. However, a similar issue is posted in pytorch repo https://github.com/pytorch/pytorch/issues/131662

cynodesmus commented 3 months ago

In this case, I will return the old files from the backup. Probably a problem with pytorch. Should I close this incident?

nagadomi commented 3 months ago

For now, You can revert to pytorch 2.3.1 with the following steps

  1. run nunif-prompt.bat
  2. python -m pip install torch==2.3.1 torchvision==0.18.1 --index-url https://download.pytorch.org/whl/cu118

Note that if you run update.bat, the latest pytorch(2.4.0) will be installed again.

EDIT: Sorry, I fixed the error in the pip command above.


@cynodesmus No need to close this issue yet because it is possible that the same issue will be posted.

cynodesmus commented 3 months ago

Oh, thank you. pytorch rollback to version 2.3.1 was successful.

nagadomi commented 3 months ago

I have temporarily updated requirements-torch.txt to use torch==2.3.1 on Windows. I will revert this change when torch==2.4.1 is released.

nagadomi commented 2 months ago

updated to torch=2.4.1