Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ pipe = OVStableDiffusionPipeline.from_pretrained(
|
|
13 |
model_id,
|
14 |
compile=False,
|
15 |
ov_config={"CACHE_DIR": ""},
|
16 |
-
torch_dtype=torch.
|
17 |
safety_checker=None,
|
18 |
use_safetensors=False,
|
19 |
)
|
@@ -24,10 +24,8 @@ pipe.reshape(batch_size=batch_size, height=HIGH, width=WIDTH, num_images_per_pro
|
|
24 |
pipe.compile()
|
25 |
|
26 |
prompt = ""
|
27 |
-
negative_prompt = "EasyNegative, "
|
28 |
-
num_inference_steps = 4
|
29 |
|
30 |
-
def infer(prompt, negative_prompt, num_inference_steps):
|
31 |
image = pipe(
|
32 |
prompt=prompt,
|
33 |
negative_prompt=negative_prompt,
|
|
|
13 |
model_id,
|
14 |
compile=False,
|
15 |
ov_config={"CACHE_DIR": ""},
|
16 |
+
torch_dtype=torch.bfloat16, # More standard dtype for speed
|
17 |
safety_checker=None,
|
18 |
use_safetensors=False,
|
19 |
)
|
|
|
24 |
pipe.compile()
|
25 |
|
26 |
prompt = ""
|
|
|
|
|
27 |
|
28 |
+
def infer(prompt, negative_prompt="EasyNegative, ", num_inference_steps=4):
|
29 |
image = pipe(
|
30 |
prompt=prompt,
|
31 |
negative_prompt=negative_prompt,
|