hsuwill000 commited on
Commit
f5ea5bf
1 Parent(s): 07a5035

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -14,7 +14,7 @@ from diffusers import EulerAncestralDiscreteScheduler, LCMScheduler
14
  #EulerAncestralDiscreteScheduler 很不錯chatgpt推薦
15
 
16
 
17
- model_id = "hsuwill000/anything-v5-openvino"
18
  #adapter_id = "latent-consistency/lcm-lora-sdv1-5"
19
 
20
  #1024*512 記憶體不足
@@ -35,7 +35,7 @@ pipe = OVStableDiffusionPipeline.from_pretrained(
35
  use_safetensors=False,
36
  )
37
  print(pipe.scheduler.compatibles)
38
- pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
39
  #pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
40
 
41
  #pipe.load_lora_weights(adapter_id)
@@ -63,8 +63,8 @@ def infer(prompt,negative_prompt):
63
  negative_prompt = negative_prompt,
64
  width = WIDTH,
65
  height = HIGH,
66
- guidance_scale=7.5,
67
- num_inference_steps=30,
68
  num_images_per_prompt=1,
69
  ).images[0]
70
 
 
14
  #EulerAncestralDiscreteScheduler 很不錯chatgpt推薦
15
 
16
 
17
+ model_id = "hsuwill000/LCM-anything-v5-openvino"
18
  #adapter_id = "latent-consistency/lcm-lora-sdv1-5"
19
 
20
  #1024*512 記憶體不足
 
35
  use_safetensors=False,
36
  )
37
  print(pipe.scheduler.compatibles)
38
+ #pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
39
  #pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
40
 
41
  #pipe.load_lora_weights(adapter_id)
 
63
  negative_prompt = negative_prompt,
64
  width = WIDTH,
65
  height = HIGH,
66
+ guidance_scale=1.0,
67
+ num_inference_steps=8,
68
  num_images_per_prompt=1,
69
  ).images[0]
70