Skip to content

Commit

Permalink
fix bug on resume when face swap is None, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
numz committed Sep 22, 2023
1 parent 2c8f2ae commit 7525c40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ It's an all-in-one solution: just choose a video and a speech file (wav or mp3),

## 🚀 Updates
**2023.09.13**
- 👪 Introduced face swap: roop integration (See Usage section) **this feature is under experimental**.
- 👪 Introduced face swap: facefusion integration (See Usage section) **this feature is under experimental**.

**2023.08.22**
- 👄 Introduced [bark](https://github.com/suno-ai/bark/) (See Usage section), **this feature is under experimental**.
Expand Down Expand Up @@ -68,7 +68,8 @@ It's an all-in-one solution: just choose a video and a speech file (wav or mp3),
## 💻 Installation

1. Launch Automatic1111
2. In the extensions tab, enter the following URL in the "Install from URL" field and click "Install":
2. Face Swap : On Windows, download and install [Visual Studio](https://visualstudio.microsoft.com/fr/downloads/). During the install, make sure to include the Python and C++ packages.
3. In the extensions tab, enter the following URL in the "Install from URL" field and click "Install":

![Illustration](https://user-images.githubusercontent.com/800903/258115646-22b4b363-c363-4fc8-b316-c162b61b5d15.png)

Expand Down Expand Up @@ -135,6 +136,7 @@ It's an all-in-one solution: just choose a video and a speech file (wav or mp3),
3. Using a value below 0.5 is not advised. Adjust this setting to achieve optimal results. Starting with a value of 0.75 is recommended.
13. **Active debug**: This will create step-by-step images in the debug folder.
14. Click on the "Generate" button.
15. ⚠ "resume" button can be use if face swap and wav2lip step have been done, then you can adjust "mouth mask dilate", "face mask erode", "mask blur" and change "restoration model" without regenerate face swap and wav2lip.

## 👄 Note on the bark Fidelity

Expand Down Expand Up @@ -172,7 +174,7 @@ This extension operates in several stages to improve the quality of Wav2Lip-gene
- Ensure there is a face on each frame of the video. If the face is not detected, process will stop.

## ⚠ Noted Constraints
- The model may struggle with beards.
- for speed up process try to keep resolution under 1000x1000px, so use resize factor and upscaling after process.
- If the initial phase is excessively lengthy, consider using the "resize factor" to decrease the video's dimensions.
- While there's no strict size limit for videos, larger videos will require more processing time. It's advisable to employ the "resize factor" to minimize the video size and then upscale the video once processing is complete.

Expand All @@ -194,7 +196,7 @@ We welcome contributions to this project. When submitting pull requests, please
- [Wav2Lip](https://github.com/Rudrabha/Wav2Lip)
- [CodeFormer](https://github.com/sczhou/CodeFormer)
- [bark](https://github.com/suno-ai/bark/)
- [roop](https://github.com/s0md3v/sd-webui-roop)
- [facefusion](https://github.com/facefusion/facefusion)

## ☕ Support Wav2lip Studio

Expand Down
5 changes: 2 additions & 3 deletions scripts/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ def generate(video, face_swap_img, face_index, audio, checkpoint, face_restore_m
w2l.execute()

w2luhq = Wav2LipUHQ(video, face_restore_model, mouth_mask_dilatation, erode_face_mask, mask_blur,
only_mouth, face_swap_img,
resize_factor, code_former_weight, active_debug)
only_mouth, face_swap_img, resize_factor, code_former_weight, active_debug)

return w2luhq.execute()

Expand All @@ -172,7 +171,7 @@ def resume(video,face_swap_img, face_restore_model, only_mouth, resize_factor, m
face_swap = FaceSwap()
video = face_swap.resume()
w2luhq = Wav2LipUHQ(video, face_restore_model, mouth_mask_dilatation, erode_face_mask, mask_blur,
only_mouth, resize_factor, code_former_weight, active_debug)
only_mouth, face_swap_img, resize_factor, code_former_weight, active_debug)

return w2luhq.execute(True)

Expand Down

0 comments on commit 7525c40

Please sign in to comment.