Lauri Gates
e57116de68
feat: add GPEN-BFR 256 and 512 ONNX face enhancers
...
Add two new face enhancement processors using GPEN-BFR ONNX models
at 256x256 and 512x512 resolutions. Models auto-download on first
use from GitHub releases. Integrates into existing frame processor
pipeline alongside GFPGAN enhancer with UI toggle switches.
- modules/paths.py: Shared path constants module
- modules/processors/frame/_onnx_enhancer.py: ONNX enhancement utilities
- modules/processors/frame/face_enhancer_gpen256.py: GPEN-BFR 256 processor
- modules/processors/frame/face_enhancer_gpen512.py: GPEN-BFR 512 processor
- modules/core.py: Add GPEN choices to --frame-processor CLI arg
- modules/globals.py: Add GPEN entries to fp_ui toggle dict
- modules/ui.py: Add GPEN toggle switches and processing integration
Closes #1663
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-22 19:39:12 +02:00
Lauri Gates
ca6cba9311
perf(ui): decouple face detection from swap in live webcam pipeline
...
Add a dedicated detection thread that runs face detection continuously
on the latest captured frame and publishes results to a shared dict.
The processing/swap thread reads cached detection results instead of
running detection inline, so it never blocks on the 15-30ms detection
cost.
Architecture change: 2 threads → 3 threads
Before: capture → [detect + swap] → display
After: capture → swap (uses cached detections) → display
↘ detect (async, writes to shared cache) ↗
Also replaces the blocking while/ROOT.update() display loop with
ROOT.after()-based scheduling, which avoids Tk event loop re-entrancy
issues and UI freezes.
Closes #1664
2026-02-22 18:41:47 +02:00
Lauri Gates
a1722c7b2e
fix(ui): patch CTkOptionMenu for Tk 9.0 compatibility
...
In Tk 9.0, Menu.index("end") returns "" instead of raising TclError
on empty menus. CustomTkinter's DropdownMenu._add_menu_commands
doesn't handle this case, causing a crash when creating CTkOptionMenu
widgets (e.g., the camera selector dropdown).
Add a monkey-patch that guards against the empty-string return value.
2026-02-22 11:59:51 +02:00
Kenneth Estanislao
f0ec0744f7
GPU Accelerated OpenCV
2026-02-12 19:44:04 +08:00
Kenneth Estanislao
36b6ea0019
Update ui.py
...
DETECT_EVERY_N = 2 reuses cached face positions on alternate frames
2026-02-12 18:54:18 +08:00
Kenneth Estanislao
523ee53c34
Update ui.py
...
Separate capture and processing threads with queue.Queue, dropping frames when queues are full
2026-02-12 18:50:40 +08:00
Kenneth Estanislao
df8e8b427e
Adds Poisson blending
...
- adds poisson blending on the face to make a seamless blending of the face and the swapped image removing the "frame"
- adds the switch on the UI
Advance Merry Christmas everyone!
2025-12-15 04:54:42 +08:00
Dung Le
a007db2ffa
fix: fix typos which cause "No faces found in target" issue
2025-11-09 15:51:14 +07:00
Kenneth Estanislao
ae2d21456d
Version 2.0c Release!
...
Sharpness and some other improvements added!
2025-10-12 22:33:09 +08:00
Gordon Böer
bdbd7dcfbc
fix typos in ui.py
2025-05-07 13:23:31 +02:00
Kenneth Estanislao
28c4b34db1
Merge pull request #911 from nimishgautam/main
...
Fix cv2 size errors on first run in ui.py
2025-02-05 12:51:39 +08:00
Soul Lee
513e413956
fix: typo souce_target_map → source_target_map
2025-02-03 20:33:44 +09:00
Nimish Gåtam
ccc04983cf
Update ui.py
...
removed unnecessary code as per AI code review (which is a thing now because of course it is)
2025-02-01 12:38:37 +01:00
Nimish Gåtam
2506c5a261
Update ui.py
...
Some checks for first run when models are missing, so it doesn't error out with inv_scale_x > 0 in cv2
2025-02-01 11:52:49 +01:00
qitian
6e29e4061b
merge from the source and little change
2025-01-07 13:46:17 +08:00
Makaru
d07d4a6a26
Update ui.py
...
I pushed it to premain
2025-01-07 01:15:05 +08:00
Kenneth Estanislao
b38831dfdf
Revert "Merge pull request #868 from kier007/main"
...
This reverts commit c03f697729 , reversing
changes made to d8a5cdbc19 .
2025-01-06 14:14:21 +08:00
Kenneth Estanislao
b518f4337d
Revert "Merge pull request #869 from kier007/patch-1"
...
This reverts commit b38ef62447 , reversing
changes made to c03f697729 .
2025-01-06 14:14:04 +08:00
Makaru
a3469b7bd4
Update ui.py
...
Added:
- If you happen to turn off the map faces switch while the Source x Target Mapper window is open, the Source x Target Mapper window will close.
2025-01-06 00:10:53 +08:00
Makaru
742bcab130
Update ui.py
...
Added:
- try-finally Block: This makes sure the camera.release() is called no matter how the while loops end.
- Resource Cleanup: The finally block takes care of cleaning up resources to keep the application stable.
2025-01-05 20:19:36 +08:00
Makaru
22940d1b99
Update ui.py
...
The following changes have been implemented:
-A "clear" button has been incorporated.
-The Source x Target Mapper window has been retained following the submission of data via the "submit" button.
2025-01-05 18:29:01 +08:00
KRSHH
8be7368949
Added URL to official website
2024-12-30 15:51:46 +05:30
KRSHH
77c19d1073
FaceTime Camera Index to 0
2024-12-23 14:58:43 +05:30
KRSHH
5ce991651d
Formatting
...
Moved Windows only modules, to top too.
2024-12-23 09:46:59 +05:30
KRSHH
432984b3b6
Mac Fix
...
Pygrabber Module import only on windows
2024-12-23 09:41:17 +05:30
KRSHH
a9e8f27360
Pygrabber only for Windows
2024-12-16 18:41:39 +05:30
KRSHH
c72582506d
Adding Pygrabber as Cam manager
2024-12-13 19:49:11 +05:30
theogbob
916c2f82d8
Fix ui.py
...
Add command to "mouth_mask": modules.globals.mouth_mask which fixes the error "SyntaxError: invalid syntax. Perhaps you forgot a comma?"
2024-10-26 14:40:03 -04:00
KRSHH
80f6ea9e65
Save Mouth Mask Switch states
2024-10-26 17:54:45 +05:30
KRSHH
29c9c119d3
Add Mouth Mask Feature
2024-10-25 20:59:30 +05:30
KRSHH
ab26413ce8
on/off enhancer during inference and improve FPS counter
2024-10-13 13:16:21 +05:30
KRSHH
53d473164b
remember/save switch states
2024-10-09 19:51:04 +05:30
KRSHH
88164c6303
Show FPS Switch
2024-10-05 17:39:41 +05:30
KRSHH
a49d3fc6e5
Face Mapping fix
2024-10-05 15:00:00 +05:30
KRSHH
5812ef3cc9
Webcam selection
2024-10-05 01:37:19 +08:00
KRSHH
75decc5838
Hotswap Source image - switch faces without closing live
2024-10-04 18:17:22 +05:30
Kenneth Estanislao
f38ebb485a
Update ui.py
...
removed opacity, will work on it later to optimize
2024-10-04 15:39:08 +08:00
Kenneth Estanislao
95742c8fd5
Merge pull request #686 from GhoulBoii/main
...
BOUNTY - Webcam Merged (tested)
2024-10-04 14:46:06 +08:00
Kenneth Estanislao
60e27f4755
Revert "Merge pull request #685 from KRSHH/main"
...
This reverts commit d4e5b8078d , reversing
changes made to c08bec22e3 .
2024-10-03 14:51:38 +08:00
KRSHH
61b51fc5d4
Move the slider from live to root
2024-10-02 14:37:19 +05:30
KRSHH
f19e425143
Update ui.py
2024-10-02 14:20:56 +05:30
KRSHH
12c0a7ac86
Faceswap live opacity slider
2024-10-02 13:23:39 +05:30
KRSHH
dff6cec2f9
Comment Indention fix
2024-09-27 20:59:48 +05:30
KRSHH
4d1d2c86af
Preview video Frame by Frame using left and right arrow keys
2024-09-27 20:40:32 +05:30
KRSHH
6d1238212a
New Fixed UI
2024-09-25 17:36:50 +05:30
Kenneth Estanislao
fd4e3f546d
reverted to the old version
...
fixing the issue #597
2024-09-19 17:38:02 +08:00
Kenneth Estanislao
5bcd6dabde
Update ui.py
2024-09-19 15:54:57 +08:00
KRSHH
4067d24c26
Fix Popup Live width
2024-09-17 20:18:59 +08:00
Kenneth Estanislao
ea7bbd49fe
Revert "Merge pull request #592 from KRSHH/main"
...
This reverts commit 2f29d323d9 .
2024-09-16 23:34:35 +08:00
Kenneth Estanislao
2f29d323d9
Merge pull request #592 from KRSHH/main
...
Better UI
2024-09-16 23:32:39 +08:00