Deep-Live-Cam/modules
google-labs-jules[bot] 5db23597e9 fix: More robust handling of feathered_mask normalization
This commit provides a more robust fix for the RuntimeWarning
(invalid value encountered in divide/cast) that could occur in
the `apply_mouth_area` function within
`modules/processors/frame/face_swapper.py`.

The previous check for `feathered_mask.max() == 0` was not
sufficient for all floating point edge cases.

The updated logic now:
- Checks if `feathered_mask.max()` is less than a small epsilon (1e-6).
- If true, it logs a warning and explicitly sets `feathered_mask`
  to an all-zero `uint8` array of the correct shape.
- Otherwise, it proceeds with the normalization and casting to `uint8`.

This ensures that division by zero or by extremely small numbers is
prevented, and the `feathered_mask` is always in a valid state for
subsequent blending operations.
2025-06-23 20:45:41 +00:00
..
processors fix: More robust handling of feathered_mask normalization 2025-06-23 20:45:41 +00:00
__init__.py Update __init__.py 2025-05-13 00:14:49 +08:00
capturer.py Revert "recommit webcam option" 2024-09-11 02:49:53 +08:00
cluster_analysis.py Added ability to map faces 2024-09-10 05:40:55 +05:30
core.py add mutil language 2025-01-07 14:04:18 +08:00
face_analyser.py Fix issues 2025-06-23 20:38:28 +00:00
gettext.py add mutil language 2025-01-07 14:04:18 +08:00
globals.py fix: typo souce_target_map → source_target_map 2025-02-03 20:33:44 +09:00
metadata.py Revert "Update metadata.py" 2025-04-17 02:39:05 +08:00
predicter.py add toggle button for blueish cam fix (Force OpenCV2 BGR2RGB) 2024-08-30 22:02:23 +02:00
typing.py initial commit 2023-09-24 21:36:57 +08:00
ui.json reverted to the old version 2024-09-19 17:38:02 +08:00
ui.py fix typos in ui.py 2025-05-07 13:23:31 +02:00
utilities.py Adding Pygrabber as Cam manager 2024-12-13 19:49:11 +05:30
video_capture.py Pygrabber only for Windows 2024-12-16 18:41:39 +05:30