hsuwill000 commited on
Commit
3587027
·
verified ·
1 Parent(s): 9aa7705

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -14,7 +14,7 @@ from diffusers import EulerAncestralDiscreteScheduler, LCMScheduler, DDIMSchedul
14
  #EulerAncestralDiscreteScheduler 很不錯chatgpt推薦
15
 
16
 
17
- model_id = "hsuwill000/Koji_v2.1_diffusers-openvino"
18
 
19
  #model_id = "spamsoms/LCM-anything-v5-openvino2"
20
  #adapter_id = "latent-consistency/lcm-lora-sdv1-5"
@@ -29,8 +29,7 @@ pipe = OVStableDiffusionPipeline.from_pretrained(
29
  model_id,
30
  compile = False,
31
  ov_config = {"CACHE_DIR":""},
32
- #torch_dtype=torch.int8, #快
33
- torch_dtype=torch.bfloat16, #中
34
  #variant="fp16",
35
  #torch_dtype=torch.IntTensor, #慢,
36
  safety_checker=None,
@@ -38,7 +37,7 @@ pipe = OVStableDiffusionPipeline.from_pretrained(
38
  )
39
  print(pipe.scheduler.compatibles)
40
  #pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
41
- pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
42
 
43
  #pipe.load_lora_weights(adapter_id)
44
  #pipe.fuse_lora()
@@ -65,8 +64,8 @@ def infer(prompt,negative_prompt):
65
  negative_prompt = negative_prompt,
66
  width = WIDTH,
67
  height = HIGH,
68
- guidance_scale=7.5,
69
- num_inference_steps=20,
70
  num_images_per_prompt=1,
71
  ).images[0]
72
 
 
14
  #EulerAncestralDiscreteScheduler 很不錯chatgpt推薦
15
 
16
 
17
+ model_id = "hsuwill000/AbsoluteReality-openvino-8bit"
18
 
19
  #model_id = "spamsoms/LCM-anything-v5-openvino2"
20
  #adapter_id = "latent-consistency/lcm-lora-sdv1-5"
 
29
  model_id,
30
  compile = False,
31
  ov_config = {"CACHE_DIR":""},
32
+ torch_dtype=torch.uint8,
 
33
  #variant="fp16",
34
  #torch_dtype=torch.IntTensor, #慢,
35
  safety_checker=None,
 
37
  )
38
  print(pipe.scheduler.compatibles)
39
  #pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
40
+ #pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
41
 
42
  #pipe.load_lora_weights(adapter_id)
43
  #pipe.fuse_lora()
 
64
  negative_prompt = negative_prompt,
65
  width = WIDTH,
66
  height = HIGH,
67
+ guidance_scale=1.0,
68
+ num_inference_steps=6,
69
  num_images_per_prompt=1,
70
  ).images[0]
71