Skip to content

Commit

Permalink
Enavle MPS fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
Fannovel16 committed Oct 16, 2023
1 parent 408f5b6 commit e3ac5ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ All credit & copyright goes to https://github.com/lllyasviel.
* Added support for `onnxruntime` to speed-up DWPose (see the Q&A)
* Fixed TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int64'>, <class 'numpy.int64'>] (https://github.com/Fannovel16/comfyui_controlnet_aux/issues/2) (PR: https://github.com/Fannovel16/comfyui_controlnet_aux/pull/71)
* Fixed ImageGenResolutionFromImage mishape (https://github.com/Fannovel16/comfyui_controlnet_aux/pull/74)
* Fixed LeRes and MiDaS's incomatipility with MPS device

# Q&A:
* Why some nodes doesn't appear after I installed this repo?
Expand Down
6 changes: 6 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
sys.path.insert(0, str(Path(here, "src", pkg_name).resolve()))
print(f"Registered sys.path: {sys.path}")

#Enable CPU fallback for ops not being supported by MPS like upsample_bicubic2d.out
#https://github.com/pytorch/pytorch/issues/77764
#https://github.com/Fannovel16/comfyui_controlnet_aux/issues/2#issuecomment-1763579485
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = 1


def load_nodes():
shorted_errors = []
full_error_messages = []
Expand Down

0 comments on commit e3ac5ef

Please sign in to comment.