hsuwill000
commited on
Commit
•
f5ea5bf
1
Parent(s):
07a5035
Update app.py
Browse files
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=
|
67 |
-
num_inference_steps=
|
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 |
|