Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import numpy as np
|
|
3 |
import random
|
4 |
from optimum.intel import OVStableDiffusionXLPipeline
|
5 |
import torch
|
|
|
6 |
|
7 |
model_id = "None1145/noobai-XL-Vpred-0.65s-openvino"
|
8 |
|
@@ -18,6 +19,8 @@ def reload_model(new_model_id):
|
|
18 |
try:
|
19 |
print(f"{model_id}...")
|
20 |
pipe = OVStableDiffusionXLPipeline.from_pretrained(model_id, compile=False)
|
|
|
|
|
21 |
# pipe.to("gpu")
|
22 |
pipe.reshape(batch_size=1, height=prev_height, width=prev_width, num_images_per_prompt=1)
|
23 |
pipe.compile()
|
|
|
3 |
import random
|
4 |
from optimum.intel import OVStableDiffusionXLPipeline
|
5 |
import torch
|
6 |
+
from diffusers import EulerDiscreteScheduler
|
7 |
|
8 |
model_id = "None1145/noobai-XL-Vpred-0.65s-openvino"
|
9 |
|
|
|
19 |
try:
|
20 |
print(f"{model_id}...")
|
21 |
pipe = OVStableDiffusionXLPipeline.from_pretrained(model_id, compile=False)
|
22 |
+
scheduler_args = {"prediction_type": "v_prediction", "rescale_betas_zero_snr": True}
|
23 |
+
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, **scheduler_args)
|
24 |
# pipe.to("gpu")
|
25 |
pipe.reshape(batch_size=1, height=prev_height, width=prev_width, num_images_per_prompt=1)
|
26 |
pipe.compile()
|