mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
ZLUDA patch torch only with --use-zluda
This commit is contained in:
+6
-5
@@ -594,11 +594,12 @@ def check_torch():
|
||||
if not installed('torch', quiet=True):
|
||||
log.debug(f'Installing torch: {torch_command}')
|
||||
install(torch_command, 'torch torchvision')
|
||||
try:
|
||||
from modules.zluda_installer import patch as patch_torch
|
||||
patch_torch()
|
||||
except Exception as e:
|
||||
log.warning(f'ZLUDA: failed to automatically patch torch: {e}')
|
||||
if args.use_zluda:
|
||||
try:
|
||||
from modules.zluda_installer import patch as patch_torch
|
||||
patch_torch()
|
||||
except Exception as e:
|
||||
log.warning(f'ZLUDA: failed to automatically patch torch: {e}')
|
||||
else:
|
||||
try:
|
||||
import torch
|
||||
|
||||
Reference in New Issue
Block a user