Spaces:
Paused
Paused
MacBook pro
commited on
Commit
·
be08742
1
Parent(s):
23a52ba
fix(pipeline): indent codeformer_error; chore(video): add placeholder diagnostic logging
Browse files- swap_pipeline.py +1 -1
- webrtc_server.py +5 -0
swap_pipeline.py
CHANGED
|
@@ -74,7 +74,7 @@ class FaceSwapPipeline:
|
|
| 74 |
self.codeformer = None
|
| 75 |
self.codeformer_fidelity = float(os.getenv('MIRAGE_CODEFORMER_FIDELITY', '0.75'))
|
| 76 |
self.codeformer_loaded = False
|
| 77 |
-
|
| 78 |
# Debug verbosity for swap decisions
|
| 79 |
self.swap_debug = os.getenv('MIRAGE_SWAP_DEBUG', '0').lower() in ('1','true','yes','on')
|
| 80 |
# Brightness compensation configuration
|
|
|
|
| 74 |
self.codeformer = None
|
| 75 |
self.codeformer_fidelity = float(os.getenv('MIRAGE_CODEFORMER_FIDELITY', '0.75'))
|
| 76 |
self.codeformer_loaded = False
|
| 77 |
+
self.codeformer_error: str | None = None
|
| 78 |
# Debug verbosity for swap decisions
|
| 79 |
self.swap_debug = os.getenv('MIRAGE_SWAP_DEBUG', '0').lower() in ('1','true','yes','on')
|
| 80 |
# Brightness compensation configuration
|
webrtc_server.py
CHANGED
|
@@ -562,6 +562,11 @@ class OutboundVideoTrack(VideoStreamTrack):
|
|
| 562 |
if self._placeholder_active and time.time() > self._placeholder_timeout:
|
| 563 |
self._placeholder_active = False
|
| 564 |
placeholder_active = self._placeholder_active
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 565 |
try:
|
| 566 |
# Color bars
|
| 567 |
num_bars = 6
|
|
|
|
| 562 |
if self._placeholder_active and time.time() > self._placeholder_timeout:
|
| 563 |
self._placeholder_active = False
|
| 564 |
placeholder_active = self._placeholder_active
|
| 565 |
+
if placeholder_active and (self._frame_count % 15) == 0:
|
| 566 |
+
try:
|
| 567 |
+
logger.warning(f"[video-placeholder] still active fc={self._frame_count} src={'set' if self._source else 'none'} timeout_in={int(self._placeholder_timeout-time.time())}")
|
| 568 |
+
except Exception:
|
| 569 |
+
pass
|
| 570 |
try:
|
| 571 |
# Color bars
|
| 572 |
num_bars = 6
|