hsuwill000 commited on
Commit
c8e5594
·
verified ·
1 Parent(s): 3817d9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -7,6 +7,7 @@ import torch
7
  from huggingface_hub import snapshot_download
8
  import openvino.runtime as ov
9
  from typing import Optional, Dict
 
10
 
11
 
12
  model_id = "hsuwill000/anything-v5-openvino"
@@ -27,6 +28,7 @@ pipe = OVStableDiffusionPipeline.from_pretrained(
27
  #torch_dtype=torch.IntTensor, #慢,
28
  safety_checker=None,
29
  use_safetensors=False,
 
30
  )
31
 
32
 
@@ -52,8 +54,8 @@ def infer(prompt,negative_prompt):
52
  negative_prompt = negative_prompt,
53
  width = WIDTH,
54
  height = HIGH,
55
- guidance_scale=7.5,
56
- num_inference_steps=30,
57
  num_images_per_prompt=1,
58
  ).images[0]
59
 
 
7
  from huggingface_hub import snapshot_download
8
  import openvino.runtime as ov
9
  from typing import Optional, Dict
10
+ from diffusers import LCMScheduler
11
 
12
 
13
  model_id = "hsuwill000/anything-v5-openvino"
 
28
  #torch_dtype=torch.IntTensor, #慢,
29
  safety_checker=None,
30
  use_safetensors=False,
31
+ scheduler=LCMScheduler,
32
  )
33
 
34
 
 
54
  negative_prompt = negative_prompt,
55
  width = WIDTH,
56
  height = HIGH,
57
+ guidance_scale=1.0,
58
+ num_inference_steps=8,
59
  num_images_per_prompt=1,
60
  ).images[0]
61