Update app.py
Browse files
app.py
CHANGED
|
@@ -22,13 +22,14 @@ OV_CONFIG = {
|
|
| 22 |
}
|
| 23 |
|
| 24 |
if BACKEND == "optimum":
|
| 25 |
-
from optimum.intel
|
| 26 |
|
| 27 |
print("Loading with Optimum-Intel...")
|
| 28 |
pipe = OVDiffusionPipeline.from_pretrained(
|
| 29 |
MODEL_PATH,
|
| 30 |
device=DEVICE,
|
| 31 |
ov_config=OV_CONFIG,
|
|
|
|
| 32 |
)
|
| 33 |
|
| 34 |
def generate(prompt, negative_prompt, num_steps, guidance_scale, seed):
|
|
|
|
| 22 |
}
|
| 23 |
|
| 24 |
if BACKEND == "optimum":
|
| 25 |
+
from optimum.intel import OVDiffusionPipeline
|
| 26 |
|
| 27 |
print("Loading with Optimum-Intel...")
|
| 28 |
pipe = OVDiffusionPipeline.from_pretrained(
|
| 29 |
MODEL_PATH,
|
| 30 |
device=DEVICE,
|
| 31 |
ov_config=OV_CONFIG,
|
| 32 |
+
safety_checker=None
|
| 33 |
)
|
| 34 |
|
| 35 |
def generate(prompt, negative_prompt, num_steps, guidance_scale, seed):
|