Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def imwrite_unicode(path, img, params=None):
root, ext = os.path.splitext(path)
if not ext:
ext = ".png"
result, encoded_img = cv2.imencode(ext, img, params if params else [])
result, encoded_img = cv2.imencode(f".{ext}", img, params if params is not None else [])
result, encoded_img = cv2.imencode(ext, img, params if params is not None else [])
if result:
encoded_img.tofile(path)
return True
return False
11 changes: 9 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ psutil==5.9.8
tk==0.1.0
customtkinter==5.2.2
pillow==11.1.0
pygrabber==0.1.4

# Torch with CUDA for Windows/Linux and CPU-only fallback for macOS
torch==2.5.1+cu118; sys_platform != 'darwin'
torch==2.5.1; sys_platform == 'darwin'

torchvision==0.20.1; sys_platform != 'darwin'
torchvision==0.20.1; sys_platform == 'darwin'
onnxruntime-silicon==1.16.3; sys_platform == 'darwin' and platform_machine == 'arm64'
onnxruntime-gpu==1.17; sys_platform != 'darwin'

# Use only GPU-accelerated ONNX runtime
onnxruntime-gpu==1.16.3

tensorflow; sys_platform != 'darwin'

opennsfw2==0.10.2
protobuf==4.23.2