mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
Merge branch 'master' into dev
This commit is contained in:
@@ -66,10 +66,10 @@ Additional models will be added as they become available and there is public int
|
||||
- *nVidia* GPUs using **CUDA** libraries on both *Windows and Linux*
|
||||
- *AMD* GPUs using **ROCm** libraries on *Linux*.
|
||||
Support will be extended to *Windows* once AMD releases ROCm for Windows
|
||||
- Any GPU compatibile with *DirectX* on *Windows* using **DirectML** libraries.
|
||||
This includes support for AMD GPUs that are not supported by native ROCm libraries
|
||||
- *Intel Arc* GPUs using **OneAPI** with *IPEX XPU* libraries on both *Windows and Linux*
|
||||
- *Intel* GPUs using **OpenVINO** libraries on both *Windows and Linux*
|
||||
- Any GPU compatible with *DirectX* on *Windows* using **DirectML** libraries.
|
||||
This includes support for AMD GPUs that are not supported by native ROCm libraries
|
||||
- Any GPU compatible with **OpenVINO** libraries on both *Windows and Linux*
|
||||
- *Apple M1/M2* on *OSX* using built-in support in Torch with **MPS** optimizations
|
||||
|
||||
## Install & Run
|
||||
|
||||
+1
Submodule extensions-builtin/sd-dynamic-thresholding added at 55ca687fb8
+1
-1
@@ -419,7 +419,7 @@ def check_torch():
|
||||
elif allow_openvino and args.use_openvino:
|
||||
#Remove this after 2.1.0 releases
|
||||
log.info('Using OpenVINO')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', '--pre torch==2.1.0.dev20230726+cpu torchvision==0.16.0.dev20230726+cpu -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', '--pre torch==2.1.0.dev20230820+cpu torchvision==0.16.0.dev20230820+cpu -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html')
|
||||
else:
|
||||
machine = platform.machine()
|
||||
if sys.platform == 'darwin':
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import sys
|
||||
import torch
|
||||
from openvino.frontend import FrontEndManager
|
||||
from openvino.frontend.pytorch.fx_decoder import TorchFXPythonDecoder
|
||||
@@ -13,6 +14,25 @@ from hashlib import sha256
|
||||
import functools
|
||||
from modules import shared, devices
|
||||
|
||||
def BUILD_MAP_UNPACK(self, inst):
|
||||
items = self.popn(inst.argval)
|
||||
# ensure everything is a dict
|
||||
items = [BuiltinVariable(dict).call_function(self, [x], {}) for x in items] # noqa: F821
|
||||
result = dict()
|
||||
for x in items:
|
||||
assert isinstance(x, ConstDictVariable) # noqa: F821
|
||||
result.update(x.items)
|
||||
self.push(
|
||||
ConstDictVariable( # noqa: F821
|
||||
result,
|
||||
dict,
|
||||
mutable_local=MutableLocal(), # noqa: F821
|
||||
**VariableTracker.propagate(items), # noqa: F821
|
||||
)
|
||||
)
|
||||
tmp_torch = sys.modules["torch"]
|
||||
tmp_torch.BUILD_MAP_UNPACK_WITH_CALL = BUILD_MAP_UNPACK
|
||||
|
||||
compiled_cache = {}
|
||||
max_openvino_partitions = 0
|
||||
partitioned_modules = {}
|
||||
@@ -65,10 +85,6 @@ def get_device():
|
||||
shared.log.warning("OpenVINO: No compatible GPU detected!")
|
||||
os.environ.setdefault('OPENVINO_TORCH_BACKEND_DEVICE', device)
|
||||
shared.log.debug(f"OpenVINO Device: {device}")
|
||||
if shared.opts.cuda_compile_errors and device not in core.available_devices:
|
||||
shared.log.error(f"OpenVINO: Specified device {device} is not in the list of OpenVINO Available Devices")
|
||||
assert device in core.available_devices, f"OpenVINO: Specified device {device} is not in the list of OpenVINO Available Devices"
|
||||
|
||||
return device
|
||||
|
||||
def cache_root_path():
|
||||
|
||||
Reference in New Issue
Block a user