mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
move initialization of onnx pipelines & create onnx folder automatically
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
from typing import Any, Dict, Optional
|
||||
import torch
|
||||
import diffusers
|
||||
@@ -142,9 +143,14 @@ def initialize():
|
||||
return
|
||||
|
||||
from modules import devices
|
||||
from modules.paths import models_path
|
||||
from . import pipelines
|
||||
from .execution_providers import ExecutionProvider, TORCH_DEVICE_TO_EP
|
||||
|
||||
onnx_dir = os.path.join(models_path, "ONNX")
|
||||
if not os.path.isdir(onnx_dir):
|
||||
os.mkdir(onnx_dir)
|
||||
|
||||
if devices.backend == "rocm":
|
||||
TORCH_DEVICE_TO_EP["cuda"] = ExecutionProvider.ROCm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user