hsuwill000 commited on
Commit
6747e1f
·
verified ·
1 Parent(s): 7c95a8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -5,7 +5,7 @@ from huggingface_hub import snapshot_download
5
  import openvino.runtime as ov
6
  from typing import Optional, Dict
7
 
8
- model_id = "hsuwill000/sd-turbo-openvino"
9
 
10
  #只有512x512 否則一直重畫
11
  HIGH = 512
@@ -33,7 +33,7 @@ pipe = OVStableDiffusionPipeline.from_pretrained(
33
  model_id,
34
  compile=False,
35
  ov_config={"CACHE_DIR": ""},
36
- torch_dtype=torch.bfloat16, # More standard dtype for speed
37
  safety_checker=None,
38
  use_safetensors=False,
39
  )
@@ -62,8 +62,8 @@ def infer(prompt, negative_prompt):
62
  negative_prompt=negative_prompt,
63
  width=WIDTH,
64
  height=HIGH,
65
- guidance_scale=1.0, #7.5繪製的圖 無法收斂??
66
- num_inference_steps=4,
67
  num_images_per_prompt=1,
68
  ).images[0]
69
 
 
5
  import openvino.runtime as ov
6
  from typing import Optional, Dict
7
 
8
+ model_id = "hsuwill000/AngelBreed-v4-openvino-8bit"
9
 
10
  #只有512x512 否則一直重畫
11
  HIGH = 512
 
33
  model_id,
34
  compile=False,
35
  ov_config={"CACHE_DIR": ""},
36
+ torch_dtype=torch.uint8, # More standard dtype for speed
37
  safety_checker=None,
38
  use_safetensors=False,
39
  )
 
62
  negative_prompt=negative_prompt,
63
  width=WIDTH,
64
  height=HIGH,
65
+ guidance_scale=7.5
66
+ num_inference_steps=30,
67
  num_images_per_prompt=1,
68
  ).images[0]
69