Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
brkirch committed Feb 4, 2023
1 parent 1b8af15 commit 4306659
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions modules/mac_specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
from packaging import version


device = None


# has_mps is only available in nightly pytorch (for now) and macOS 12.3+.
# check `getattr` and try it for compatibility
def check_for_mps() -> bool:
Expand Down
3 changes: 0 additions & 3 deletions modules/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@
(devices.cpu if any(y in cmd_opts.use_cpu for y in [x, 'all']) else devices.get_optimal_device() for x in ['sd', 'interrogate', 'gfpgan', 'esrgan', 'codeformer'])

device = devices.device
if sys.platform == "darwin":
from modules import mac_specific
mac_specific.device = device
weight_load_location = None if cmd_opts.lowram else "cpu"

batch_cond_uncond = cmd_opts.always_batch_cond_uncond or not (cmd_opts.lowvram or cmd_opts.medvram)
Expand Down

0 comments on commit 4306659

Please sign in to comment.