Skip to content

Commit

Permalink
iw3: Move PYTORCH_ENABLE_MPS_FALLBACK=1 to __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nagadomi committed Aug 13, 2024
1 parent 463e5f1 commit 8c580e1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[flake8]
ignore = E501 W504 E731
per-file-ignores =
iw3/cli.py: E402
iw3/gui.py: E402
iw3/__init__.py: E402
waifu2x/__init__.py: E402

max_line_length = 128
Expand Down
2 changes: 2 additions & 0 deletions iw3/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import os
os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1'
2 changes: 0 additions & 2 deletions iw3/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os
os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1'
import torch
from .utils import create_parser, set_state_args, iw3_main
from . import models # noqa
Expand Down
2 changes: 0 additions & 2 deletions iw3/gui.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os
os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1'
import nunif.pythonw_fix # noqa
import locale
import sys
Expand Down

0 comments on commit 8c580e1

Please sign in to comment.