-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Pr/1189 #1275
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
base: main
Are you sure you want to change the base?
Pr/1189 #1275
Conversation
- Use models_dir instead of abs_dir for download path - Create models directory if it doesn't exist - Fix Hugging Face download URL by using /resolve/ instead of /blob/
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Reviewer's GuideThe PR refines the face_swapper’s pre_check by redirecting downloads to the models directory, ensuring that directory exists with permission handling, and correcting the Hugging Face URL for direct downloads. File-Level Changes
Possibly linked issues
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 @padawan40 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: 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.
logging.error(f"Failed to create directory {download_directory_path} due to permission error: {e}") | ||
return False | ||
|
||
# Use the direct download URL from Hugging Face | ||
conditional_download( |
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.
suggestion (bug_risk): Handle conditional_download failures
Capture conditional_download
’s return value and return False on failure; otherwise pre_check
returns True even if the download fails.
Summary by Sourcery
Update the face_swapper pre-check to use the correct models directory, ensure its creation with permission error handling, and fix the model download URL to the direct Hugging Face link.
Bug Fixes:
Enhancements: