Spaces:
Runtime error
Runtime error
hsuwill000
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,13 +5,13 @@ from huggingface_hub import snapshot_download
|
|
5 |
import openvino.runtime as ov
|
6 |
from typing import Optional, Dict
|
7 |
|
8 |
-
model_id = "
|
9 |
|
10 |
HIGH = 1024
|
11 |
WIDTH = 512
|
12 |
|
13 |
batch_size = -1 # Or set it to a specific positive integer if needed
|
14 |
-
|
15 |
class CustomOVModelVaeDecoder(OVModelVaeDecoder):
|
16 |
def __init__(
|
17 |
self, model: ov.Model, parent_model: OVBaseModel, ov_config: Optional[Dict[str, str]] = None, model_dir: str = None,
|
@@ -19,6 +19,8 @@ class CustomOVModelVaeDecoder(OVModelVaeDecoder):
|
|
19 |
super(OVModelVaeDecoder, self).__init__(model, parent_model, ov_config, "vae_decoder", model_dir)
|
20 |
|
21 |
|
|
|
|
|
22 |
|
23 |
pipe = OVStableDiffusionPipeline.from_pretrained(
|
24 |
model_id,
|
@@ -28,13 +30,15 @@ pipe = OVStableDiffusionPipeline.from_pretrained(
|
|
28 |
safety_checker=None,
|
29 |
use_safetensors=False,
|
30 |
)
|
31 |
-
|
32 |
taesd_dir = snapshot_download(repo_id="deinferno/taesd-openvino")
|
33 |
|
34 |
pipe.vae_decoder = CustomOVModelVaeDecoder(model = OVBaseModel.load_model(f"{taesd_dir}/vae_decoder/openvino_model.xml"),
|
35 |
parent_model = pipe,
|
36 |
model_dir = taesd_dir
|
37 |
-
|
|
|
|
|
38 |
|
39 |
print(pipe.scheduler.compatibles)
|
40 |
|
|
|
5 |
import openvino.runtime as ov
|
6 |
from typing import Optional, Dict
|
7 |
|
8 |
+
model_id = "rupeshs/sdxs-512-0.9-openvino"
|
9 |
|
10 |
HIGH = 1024
|
11 |
WIDTH = 512
|
12 |
|
13 |
batch_size = -1 # Or set it to a specific positive integer if needed
|
14 |
+
"""
|
15 |
class CustomOVModelVaeDecoder(OVModelVaeDecoder):
|
16 |
def __init__(
|
17 |
self, model: ov.Model, parent_model: OVBaseModel, ov_config: Optional[Dict[str, str]] = None, model_dir: str = None,
|
|
|
19 |
super(OVModelVaeDecoder, self).__init__(model, parent_model, ov_config, "vae_decoder", model_dir)
|
20 |
|
21 |
|
22 |
+
"""
|
23 |
+
|
24 |
|
25 |
pipe = OVStableDiffusionPipeline.from_pretrained(
|
26 |
model_id,
|
|
|
30 |
safety_checker=None,
|
31 |
use_safetensors=False,
|
32 |
)
|
33 |
+
"""
|
34 |
taesd_dir = snapshot_download(repo_id="deinferno/taesd-openvino")
|
35 |
|
36 |
pipe.vae_decoder = CustomOVModelVaeDecoder(model = OVBaseModel.load_model(f"{taesd_dir}/vae_decoder/openvino_model.xml"),
|
37 |
parent_model = pipe,
|
38 |
model_dir = taesd_dir
|
39 |
+
|
40 |
+
"""
|
41 |
+
)
|
42 |
|
43 |
print(pipe.scheduler.compatibles)
|
44 |
|