hsuwill000
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ model_id = "hsuwill000/AngelBreed-v4-openvino-8bit"
|
|
10 |
|
11 |
#只有512x512 否則一直重畫
|
12 |
HIGH = 512
|
13 |
-
WIDTH =
|
14 |
|
15 |
batch_size = -1 # Or set it to a specific positive integer if needed
|
16 |
-
|
17 |
class CustomOVModelVaeDecoder(OVModelVaeDecoder):
|
18 |
def __init__(
|
19 |
self, model: ov.Model, parent_model: OVBaseModel, ov_config: Optional[Dict[str, str]] = None, model_dir: str = None,
|
@@ -21,7 +21,7 @@ class CustomOVModelVaeDecoder(OVModelVaeDecoder):
|
|
21 |
super(OVModelVaeDecoder, self).__init__(model, parent_model, ov_config, "vae_decoder", model_dir)
|
22 |
|
23 |
|
24 |
-
|
25 |
|
26 |
examples = [
|
27 |
"(Digital art, highres, best quality, 8K, masterpiece, anime screencap, perfect eyes:1.4, ultra detailed:1.5),1girl,flat chest,short messy pink hair,blue eyes,tall,thick thighs,light blue hoodie,collar,light blue shirt,black sport shorts,bulge,black thigh highs,femboy,okoto no ko,smiling,blushing,looking at viewer,inside,livingroom,sitting on couch,nighttime,dark,hand_to_mouth,",
|
@@ -44,7 +44,7 @@ pipe = OVStableDiffusionPipeline.from_pretrained(
|
|
44 |
#pipe.scheduler = KDPM2DiscreteScheduler.from_config(pipe.scheduler.config)
|
45 |
|
46 |
|
47 |
-
|
48 |
taesd_dir = snapshot_download(repo_id="deinferno/taesd-openvino")
|
49 |
|
50 |
pipe.vae_decoder = CustomOVModelVaeDecoder(model = OVBaseModel.load_model(f"{taesd_dir}/vae_decoder/openvino_model.xml"),
|
@@ -53,7 +53,7 @@ pipe.vae_decoder = CustomOVModelVaeDecoder(model = OVBaseModel.load_model(f"{tae
|
|
53 |
|
54 |
|
55 |
)
|
56 |
-
|
57 |
print(pipe.scheduler.compatibles)
|
58 |
|
59 |
pipe.reshape(batch_size=batch_size, height=HIGH, width=WIDTH, num_images_per_prompt=2)
|
|
|
10 |
|
11 |
#只有512x512 否則一直重畫
|
12 |
HIGH = 512
|
13 |
+
WIDTH = 512
|
14 |
|
15 |
batch_size = -1 # Or set it to a specific positive integer if needed
|
16 |
+
|
17 |
class CustomOVModelVaeDecoder(OVModelVaeDecoder):
|
18 |
def __init__(
|
19 |
self, model: ov.Model, parent_model: OVBaseModel, ov_config: Optional[Dict[str, str]] = None, model_dir: str = None,
|
|
|
21 |
super(OVModelVaeDecoder, self).__init__(model, parent_model, ov_config, "vae_decoder", model_dir)
|
22 |
|
23 |
|
24 |
+
|
25 |
|
26 |
examples = [
|
27 |
"(Digital art, highres, best quality, 8K, masterpiece, anime screencap, perfect eyes:1.4, ultra detailed:1.5),1girl,flat chest,short messy pink hair,blue eyes,tall,thick thighs,light blue hoodie,collar,light blue shirt,black sport shorts,bulge,black thigh highs,femboy,okoto no ko,smiling,blushing,looking at viewer,inside,livingroom,sitting on couch,nighttime,dark,hand_to_mouth,",
|
|
|
44 |
#pipe.scheduler = KDPM2DiscreteScheduler.from_config(pipe.scheduler.config)
|
45 |
|
46 |
|
47 |
+
|
48 |
taesd_dir = snapshot_download(repo_id="deinferno/taesd-openvino")
|
49 |
|
50 |
pipe.vae_decoder = CustomOVModelVaeDecoder(model = OVBaseModel.load_model(f"{taesd_dir}/vae_decoder/openvino_model.xml"),
|
|
|
53 |
|
54 |
|
55 |
)
|
56 |
+
|
57 |
print(pipe.scheduler.compatibles)
|
58 |
|
59 |
pipe.reshape(batch_size=batch_size, height=HIGH, width=WIDTH, num_images_per_prompt=2)
|