File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 26
26
import numpy as np
27
27
import torch
28
28
from diffusers .configuration_utils import ConfigMixin
29
- from diffusers .models .autoencoders .vae import DiagonalGaussianDistribution
30
29
from diffusers .pipelines import (
31
30
AutoPipelineForImage2Image ,
32
31
AutoPipelineForInpainting ,
52
51
from transformers .modeling_outputs import ModelOutput
53
52
54
53
import onnxruntime as ort
54
+ from optimum .utils import check_if_diffusers_greater
55
55
56
56
from ..exporters .onnx import main_export
57
57
from ..onnx .utils import _get_model_external_data_paths
73
73
)
74
74
75
75
76
+ if check_if_diffusers_greater ("0.25.0" ):
77
+ from diffusers .models .autoencoders .vae import DiagonalGaussianDistribution
78
+ else :
79
+ from diffusers .models .vae import DiagonalGaussianDistribution
80
+
81
+
76
82
logger = logging .getLogger (__name__ )
77
83
78
84
You can’t perform that action at this time.
0 commit comments