Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -93,7 +93,8 @@ styles = {
|
|
93 |
"text, error, blurry, jpeg artifacts, cropped, worst quality, low quality, normal quality, "
|
94 |
"jpeg artifacts, signature, watermark, username, artist name, (worst quality, low quality:1.4), "
|
95 |
"bad anatomy, watermark, signature, text, logo"
|
96 |
-
)
|
|
|
97 |
},
|
98 |
"Vintage Realistic": {
|
99 |
"prompt": (
|
@@ -115,7 +116,8 @@ styles = {
|
|
115 |
"glitch, deformed, mutated, ugly, disfigured, photoshopped skin, airbrushed skin, glossy skin, canvas frame, "
|
116 |
"(high contrast:1.2), (over saturated:1.2), (glossy:1.1), cartoon, 3d, disfigured, Photoshop, video game, "
|
117 |
"ugly, tiling, poorly drawn hands, 3d render, impressionism, digital art"
|
118 |
-
)
|
|
|
119 |
},
|
120 |
"Anime 90's Aesthetic": {
|
121 |
"prompt": (
|
@@ -133,7 +135,8 @@ styles = {
|
|
133 |
"text, abstract, glitch, deformed, mutated, ugly, disfigured, photoshopped skin, airbrushed skin, glossy skin, "
|
134 |
"canvas frame, (high contrast:1.2), (over saturated:1.2), (glossy:1.1), disfigured, Photoshop, video game, "
|
135 |
"ugly, tiling, poorly drawn hands, 3d render, impressionism, eyes, mouth, black skin, pale skin, hair, beard"
|
136 |
-
)
|
|
|
137 |
},
|
138 |
"Anime Style": {
|
139 |
"prompt": (
|
@@ -149,7 +152,8 @@ styles = {
|
|
149 |
"ugly, disfigured, photoshopped skin, airbrushed skin, glossy skin, canvas frame, (high contrast:1.2), "
|
150 |
"(over saturated:1.2), (glossy:1.1), cartoon, 3d, disfigured, Photoshop, video game, ugly, tiling, "
|
151 |
"poorly drawn hands, 3d render, impressionism, digital art"
|
152 |
-
)
|
|
|
153 |
},
|
154 |
"Real 70s": {
|
155 |
"prompt": (
|
@@ -170,7 +174,8 @@ styles = {
|
|
170 |
"mutated, ugly, disfigured, photoshopped skin, airbrushed skin, glossy skin, canvas frame, (high contrast:1.2), "
|
171 |
"(over saturated:1.2), (glossy:1.1), cartoon, 3d, disfigured, Photoshop, video game, ugly, tiling, "
|
172 |
"poorly drawn hands, 3d render, impressionism, digital art"
|
173 |
-
)
|
|
|
174 |
}
|
175 |
}
|
176 |
|
@@ -460,9 +465,9 @@ with gr.Blocks() as demo:
|
|
460 |
if evt.index < 0 or evt.index >= len(style_names):
|
461 |
raise ValueError(f"Invalid index: {evt.index}")
|
462 |
selected_style = style_names[evt.index]
|
463 |
-
return styles[selected_style]["prompt"], styles[selected_style]["negative_prompt"], selected_style
|
464 |
|
465 |
-
style_images_gallery.select(fn=select_style, inputs=[], outputs=[prompt, negative_prompt, selected_style])
|
466 |
|
467 |
def update_controlnet(controlnet_type):
|
468 |
status = load_controlnet_model(controlnet_type)
|
@@ -547,4 +552,4 @@ with gr.Blocks() as demo:
|
|
547 |
if __name__ == "__main__":
|
548 |
# Your Gradio interface setup here
|
549 |
demo.launch(auth=("roland", "roland"), debug=True)
|
550 |
-
clear_memory()
|
|
|
93 |
"text, error, blurry, jpeg artifacts, cropped, worst quality, low quality, normal quality, "
|
94 |
"jpeg artifacts, signature, watermark, username, artist name, (worst quality, low quality:1.4), "
|
95 |
"bad anatomy, watermark, signature, text, logo"
|
96 |
+
),
|
97 |
+
"steps": 40
|
98 |
},
|
99 |
"Vintage Realistic": {
|
100 |
"prompt": (
|
|
|
116 |
"glitch, deformed, mutated, ugly, disfigured, photoshopped skin, airbrushed skin, glossy skin, canvas frame, "
|
117 |
"(high contrast:1.2), (over saturated:1.2), (glossy:1.1), cartoon, 3d, disfigured, Photoshop, video game, "
|
118 |
"ugly, tiling, poorly drawn hands, 3d render, impressionism, digital art"
|
119 |
+
),
|
120 |
+
"steps": 30
|
121 |
},
|
122 |
"Anime 90's Aesthetic": {
|
123 |
"prompt": (
|
|
|
135 |
"text, abstract, glitch, deformed, mutated, ugly, disfigured, photoshopped skin, airbrushed skin, glossy skin, "
|
136 |
"canvas frame, (high contrast:1.2), (over saturated:1.2), (glossy:1.1), disfigured, Photoshop, video game, "
|
137 |
"ugly, tiling, poorly drawn hands, 3d render, impressionism, eyes, mouth, black skin, pale skin, hair, beard"
|
138 |
+
),
|
139 |
+
"steps": 34
|
140 |
},
|
141 |
"Anime Style": {
|
142 |
"prompt": (
|
|
|
152 |
"ugly, disfigured, photoshopped skin, airbrushed skin, glossy skin, canvas frame, (high contrast:1.2), "
|
153 |
"(over saturated:1.2), (glossy:1.1), cartoon, 3d, disfigured, Photoshop, video game, ugly, tiling, "
|
154 |
"poorly drawn hands, 3d render, impressionism, digital art"
|
155 |
+
),
|
156 |
+
"steps": 28
|
157 |
},
|
158 |
"Real 70s": {
|
159 |
"prompt": (
|
|
|
174 |
"mutated, ugly, disfigured, photoshopped skin, airbrushed skin, glossy skin, canvas frame, (high contrast:1.2), "
|
175 |
"(over saturated:1.2), (glossy:1.1), cartoon, 3d, disfigured, Photoshop, video game, ugly, tiling, "
|
176 |
"poorly drawn hands, 3d render, impressionism, digital art"
|
177 |
+
),
|
178 |
+
"steps": 40
|
179 |
}
|
180 |
}
|
181 |
|
|
|
465 |
if evt.index < 0 or evt.index >= len(style_names):
|
466 |
raise ValueError(f"Invalid index: {evt.index}")
|
467 |
selected_style = style_names[evt.index]
|
468 |
+
return styles[selected_style]["prompt"], styles[selected_style]["negative_prompt"], styles[selected_style]["steps"], selected_style
|
469 |
|
470 |
+
style_images_gallery.select(fn=select_style, inputs=[], outputs=[prompt, negative_prompt, num_inference_steps, selected_style])
|
471 |
|
472 |
def update_controlnet(controlnet_type):
|
473 |
status = load_controlnet_model(controlnet_type)
|
|
|
552 |
if __name__ == "__main__":
|
553 |
# Your Gradio interface setup here
|
554 |
demo.launch(auth=("roland", "roland"), debug=True)
|
555 |
+
clear_memory()
|