Open wsysl1989 opened 2 years ago
git clone https://github.com/TencentARC/GFPGAN.git
cd GFPGAN
git checkout bc3f0c4
pip install basicsr==1.3.5
update basicsr to the latest version v1.4.0
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Denis Malimonov @.> Sent: Wednesday, July 13, 2022 11:00:40 PM To: TencentARC/GFPGAN @.> Cc: Subscribed @.***> Subject: Re: [TencentARC/GFPGAN] No module named 'basicsr.losses.gan_loss' (Issue #215)
git clone https://github.com/TencentARC/GFPGAN.git cd GFPGAN git checkout bc3f0c4 pip install basicsr==1.3.5
— Reply to this email directly, view it on GitHubhttps://github.com/TencentARC/GFPGAN/issues/215#issuecomment-1183335332, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEFDHV6STNZ6YYFMT2LRFO3VT3KZRANCNFSM53PANWGQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Still unsolved.
Installing collected packages: basicsr Attempting uninstall: basicsr Found existing installation: basicsr 1.3.5 Uninstalling basicsr-1.3.5: Successfully uninstalled basicsr-1.3.5 Successfully installed basicsr-1.4.1
downgrading from 1.4.1 to 1.3.5 works for me
change GFPGAN-master\gfpgan\models\gfpgan_model.py
line: from basicsr.losses.gan_loss import r1_penalty to from basicsr.losses.losses import r1_penalty
change GFPGAN-master\gfpgan\models\gfpgan_model.py
line: from basicsr.losses.gan_loss import r1_penalty to from basicsr.losses.losses import r1_penalty
thanks,but another problem occurs,can not go on again.
Traceback (most recent call last):
File "N:\python\GFPGAN1.34\GFPGAN-master\inference_gfpgan.py", line 155, in
TypeError: init() got an unexpected keyword argument 'use_parse'
update basicsr to the version v1.4.2, and update facexlib to 0.2.5 works for me. No need to change gfpgan_model.py
TypeError: init() got an unexpected keyword argument 'use_parse'
update basicsr to the version v1.4.2, and update facexlib to 0.2.5 works for me. No need to change gfpgan_model.py
thanks,update basicsr to the version v1.4.2, and update facexlib to 0.2.5 ,still change back " from basicsr.losses.gan_loss import r1_penalty".now,it works for me.
change GFPGAN-master\gfpgan\models\gfpgan_model.py
line: from basicsr.losses.gan_loss import r1_penalty to from basicsr.losses.losses import r1_penalty
This also appears to work in stable-diffusion-krita-plugin though the py script is in a different location.
for my python 3.10.x and basicsr 1.4.2 change to : from basicsr.losses.gan_loss import r1_penalty works for me.
D:\Python\python.exe N:/python/GFPGAN1.34/GFPGAN-master/inference_gfpgan.py Traceback (most recent call last): File "N:\python\GFPGAN1.34\GFPGAN-master\inference_gfpgan.py", line 9, in
from gfpgan import GFPGANer
File "N:\python\GFPGAN1.34\GFPGAN-master\gfpgan__init.py", line 4, in
from .models import *
File "N:\python\GFPGAN1.34\GFPGAN-master\gfpgan\models\ init.py", line 10, in
_model_modules = [importlib.import_module(f'gfpgan.models.{file_name}') for file_name in model_filenames]
File "N:\python\GFPGAN1.34\GFPGAN-master\gfpgan\models\ init.py", line 10, in
_model_modules = [importlib.import_module(f'gfpgan.models.{file_name}') for file_name in model_filenames]
File "D:\Python\lib\importlib\ init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "N:\python\GFPGAN1.34\GFPGAN-master\gfpgan\models\gfpgan_model.py", line 6, in
from basicsr.losses.gan_loss import r1_penalty
ModuleNotFoundError: No module named 'basicsr.losses.gan_loss'