Error with the new model #49

Closed
opened 2026-01-29 21:39:41 +00:00 by claunia · 3 comments
Owner

Originally created by @GOZARCK on GitHub (Aug 17, 2021).

$ python inference_gfpgan.py --upscale_factor 1 --model_path experiments/pretrained_models/GFPGANCleanv1-NoCE-C2.pth --test_path inputs/whole_imgs --paste_back Traceback (most recent call last): File "E:\IA\GFPGAN\inference_gfpgan.py", line 9, in <module> from gfpgan import GFPGANer File "E:\IA\GFPGAN\gfpgan\__init__.py", line 6, in <module> from .version import __gitsha__, __version__ ModuleNotFoundError: No module named 'gfpgan.version'

Originally created by @GOZARCK on GitHub (Aug 17, 2021). ` $ python inference_gfpgan.py --upscale_factor 1 --model_path experiments/pretrained_models/GFPGANCleanv1-NoCE-C2.pth --test_path inputs/whole_imgs --paste_back Traceback (most recent call last): File "E:\IA\GFPGAN\inference_gfpgan.py", line 9, in <module> from gfpgan import GFPGANer File "E:\IA\GFPGAN\gfpgan\__init__.py", line 6, in <module> from .version import __gitsha__, __version__ ModuleNotFoundError: No module named 'gfpgan.version' `
Author
Owner

@xinntao commented on GitHub (Aug 18, 2021):

Follow the instruction: https://github.com/TencentARC/GFPGAN#installation

run python setup.py develop before inference.

@xinntao commented on GitHub (Aug 18, 2021): Follow the instruction: https://github.com/TencentARC/GFPGAN#installation run `python setup.py develop` before inference.
Author
Owner

@GOZARCK commented on GitHub (Aug 18, 2021):

Thank you Works Perfect here the result!

python inference_gfpgan.py --upscale 2 --test_path inputs/whole_imgs --save_root results
100%|##########| 64.0M/64.0M [00:03<00:00, 18.7MB/s]
C:\Users\Gozarck\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at ..\c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
C:\Users\Gozarck\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\functional.py:3657: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and now uses scale_factor directly, instead of relying on the computed output size. If you wish to restore the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details.
warnings.warn(
Downloading: "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth" to C:\Users\Gozarck\AppData\Local\Programs\Python\Python39\lib\site-packages\realesrgan\weights\RealESRGAN_x2plus.pth

Processing 00.jpg ...
Tile 1/20
Tile 2/20
Tile 3/20
Tile 4/20
Tile 5/20
Tile 6/20
Tile 7/20
Tile 8/20
Tile 9/20
Tile 10/20
Tile 11/20
Tile 12/20
Tile 13/20
Tile 14/20
Tile 15/20
Tile 16/20
Tile 17/20
Tile 18/20
Tile 19/20
Tile 20/20
Processing 10045.png ...
Tile 1/6
Tile 2/6
Tile 3/6
Tile 4/6
Tile 5/6
Tile 6/6
Processing Blake_Lively.jpg ...
Tile 1/4
Tile 2/4
Tile 3/4
Tile 4/4
Results are in the [results] folder.

@GOZARCK commented on GitHub (Aug 18, 2021): Thank you Works Perfect here the result! > python inference_gfpgan.py --upscale 2 --test_path inputs/whole_imgs --save_root results > 100%|##########| 64.0M/64.0M [00:03<00:00, 18.7MB/s] > C:\Users\Gozarck\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at ..\c10/core/TensorImpl.h:1156.) > return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode) > C:\Users\Gozarck\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\functional.py:3657: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and now uses scale_factor directly, instead of relying on the computed output size. If you wish to restore the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details. > warnings.warn( > Downloading: "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth" to C:\Users\Gozarck\AppData\Local\Programs\Python\Python39\lib\site-packages\realesrgan\weights\RealESRGAN_x2plus.pth > > Processing 00.jpg ... > Tile 1/20 > Tile 2/20 > Tile 3/20 > Tile 4/20 > Tile 5/20 > Tile 6/20 > Tile 7/20 > Tile 8/20 > Tile 9/20 > Tile 10/20 > Tile 11/20 > Tile 12/20 > Tile 13/20 > Tile 14/20 > Tile 15/20 > Tile 16/20 > Tile 17/20 > Tile 18/20 > Tile 19/20 > Tile 20/20 > Processing 10045.png ... > Tile 1/6 > Tile 2/6 > Tile 3/6 > Tile 4/6 > Tile 5/6 > Tile 6/6 > Processing Blake_Lively.jpg ... > Tile 1/4 > Tile 2/4 > Tile 3/4 > Tile 4/4 > Results are in the [results] folder.
Author
Owner

@xinntao commented on GitHub (Aug 18, 2021):

😄

@xinntao commented on GitHub (Aug 18, 2021): 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#49