mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: audit fixes for cross-platform correctness
- Fix NameError in restore.py: face enhancement loop used undefined variable `i`, now uses enumerate() - Fix gpu.py ONNX fallback: previous smoke-test with empty bytes always raised, making GPU detection unreachable via the ONNX path. Now uses nvidia-smi hardware check after confirming CUDA EP is compiled in — works on Linux, Windows, and gracefully fails on macOS - Fix cpu_fallback_packages stripping CUDA-specific index URLs when replacing paddlepaddle-gpu with paddlepaddle for CPU-only systems Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -331,7 +331,7 @@ def enhance_faces(img_bgr, fidelity=0.7):
|
||||
result = img_bgr.copy()
|
||||
faces_enhanced = 0
|
||||
|
||||
for face_box in face_boxes:
|
||||
for i, face_box in enumerate(face_boxes):
|
||||
x = face_box["x"]
|
||||
y = face_box["y"]
|
||||
w = face_box["w"]
|
||||
|
||||
Reference in New Issue
Block a user