-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for GfpGAN and inswapper model path retrieval bug #773
Conversation
Reviewer's Guide by SourceryThe PR fixes path resolution issues for the GfpGAN and inswapper models by replacing relative path resolution with absolute path construction. The implementation uses os.path functions to reliably construct paths to the models directory, eliminating platform-specific path handling and potential path resolution errors. Class diagram for face_enhancer.py and face_swapper.py changesclassDiagram
class FaceEnhancer {
+THREAD_LOCK
+NAME
+abs_dir
+models_dir
+pre_check() bool
+get_face_enhancer() Any
}
class FaceSwapper {
+THREAD_LOCK
+NAME
+abs_dir
+models_dir
+pre_check() bool
+get_face_swapper() Any
}
note for FaceEnhancer "Updated path resolution for model_path using os.path.join"
note for FaceSwapper "Updated path resolution for model_path using os.path.join"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @NeuroDonu - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider extracting the models directory path construction logic into a shared utility function or configuration file to avoid duplication across face_enhancer.py and face_swapper.py
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
fix for GfpGAN and inswapper model path retrieval bug
Hi. not too long ago i was getting the error that is described in this issue: #770
I added a fix for this bug (it was a misconstructed path)
Summary by Sourcery
Bug Fixes: