[PR #210] Fix basicsr losses import #586

Closed
opened 2026-01-29 21:48:57 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/TencentARC/GFPGAN/pull/210

State: closed
Merged: Yes


With the most recent 1.4.0 release of BasicSR (https://github.com/XPixelGroup/BasicSR/releases), some basicSR module imports in GFPGAN may have to be reconfigured as some of the changes include updates to some directories such as the basicsr.losses directory.
The only error I came across was in the gfpgan_model.py module, where I had to change "from basicsr.losses.losses import r1_penalty" to "from basicsr.losses.gan_loss import r1_penalty". This was the only import error that occurred during execution of my script but there may be several other module imports that may have to be double checked.

**Original Pull Request:** https://github.com/TencentARC/GFPGAN/pull/210 **State:** closed **Merged:** Yes --- With the most recent 1.4.0 release of BasicSR (https://github.com/XPixelGroup/BasicSR/releases), some basicSR module imports in GFPGAN may have to be reconfigured as some of the changes include updates to some directories such as the basicsr.losses directory. The only error I came across was in the gfpgan_model.py module, where I had to change "from basicsr.losses.losses import r1_penalty" to "from basicsr.losses.gan_loss import r1_penalty". This was the only import error that occurred during execution of my script but there may be several other module imports that may have to be double checked.
claunia added the pull-request label 2026-01-29 21:48:57 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#586