Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -45,135 +45,135 @@ with app:
|
|
45 |
with gr.Column():
|
46 |
output_image = gr.Image(label='Image')
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
|
179 |
-
app.launch(debug=True)
|
|
|
45 |
with gr.Column():
|
46 |
output_image = gr.Image(label='Image')
|
47 |
|
48 |
+
text2image_app['predict'].click(
|
49 |
+
fn = stable_diffusion_text2img,
|
50 |
+
inputs = [
|
51 |
+
text2image_app['model_path'],
|
52 |
+
text2image_app['prompt'],
|
53 |
+
text2image_app['negative_prompt'],
|
54 |
+
text2image_app['guidance_scale'],
|
55 |
+
text2image_app['num_inference_step'],
|
56 |
+
text2image_app['height'],
|
57 |
+
text2image_app['width'],
|
58 |
+
],
|
59 |
+
outputs = [output_image],
|
60 |
+
)
|
61 |
|
62 |
+
img2img_app['predict'].click(
|
63 |
+
fn = stable_diffusion_img2img,
|
64 |
+
inputs = [
|
65 |
+
img2img_app['image_path'],
|
66 |
+
img2img_app['model_path'],
|
67 |
+
img2img_app['prompt'],
|
68 |
+
img2img_app['negative_prompt'],
|
69 |
+
img2img_app['guidance_scale'],
|
70 |
+
img2img_app['num_inference_step'],
|
71 |
+
],
|
72 |
+
outputs = [output_image],
|
73 |
+
)
|
74 |
|
75 |
+
inpaint_app['predict'].click(
|
76 |
+
fn = stable_diffusion_inpaint,
|
77 |
+
inputs = [
|
78 |
+
inpaint_app['image_path'],
|
79 |
+
inpaint_app['model_path'],
|
80 |
+
inpaint_app['prompt'],
|
81 |
+
inpaint_app['negative_prompt'],
|
82 |
+
inpaint_app['guidance_scale'],
|
83 |
+
inpaint_app['num_inference_step'],
|
84 |
+
],
|
85 |
+
outputs = [output_image],
|
86 |
+
)
|
87 |
|
88 |
+
controlnet_canny_app['predict'].click(
|
89 |
+
fn = stable_diffusion_controlnet_canny,
|
90 |
+
inputs = [
|
91 |
+
controlnet_canny_app['image_path'],
|
92 |
+
controlnet_canny_app['model_path'],
|
93 |
+
controlnet_canny_app['prompt'],
|
94 |
+
controlnet_canny_app['negative_prompt'],
|
95 |
+
controlnet_canny_app['guidance_scale'],
|
96 |
+
controlnet_canny_app['num_inference_step'],
|
97 |
+
],
|
98 |
+
outputs = [output_image],
|
99 |
+
)
|
100 |
|
101 |
+
controlnet_hed_app['predict'].click(
|
102 |
+
fn = stable_diffusion_controlnet_hed,
|
103 |
+
inputs = [
|
104 |
+
controlnet_hed_app['image_path'],
|
105 |
+
controlnet_hed_app['model_path'],
|
106 |
+
controlnet_hed_app['prompt'],
|
107 |
+
controlnet_hed_app['negative_prompt'],
|
108 |
+
controlnet_hed_app['guidance_scale'],
|
109 |
+
controlnet_hed_app['num_inference_step'],
|
110 |
+
],
|
111 |
+
outputs = [output_image],
|
112 |
+
)
|
113 |
+
|
114 |
+
controlnet_mlsd_app['predict'].click(
|
115 |
+
fn = stable_diffusion_controlnet_mlsd,
|
116 |
+
inputs = [
|
117 |
+
controlnet_mlsd_app['image_path'],
|
118 |
+
controlnet_mlsd_app['model_path'],
|
119 |
+
controlnet_mlsd_app['prompt'],
|
120 |
+
controlnet_mlsd_app['negative_prompt'],
|
121 |
+
controlnet_mlsd_app['guidance_scale'],
|
122 |
+
controlnet_mlsd_app['num_inference_step'],
|
123 |
+
],
|
124 |
+
outputs = [output_image],
|
125 |
+
)
|
126 |
+
|
127 |
+
controlnet_depth_app['predict'].click(
|
128 |
+
fn = stable_diffusion_controlnet_seg,
|
129 |
+
inputs = [
|
130 |
+
controlnet_depth_app['image_path'],
|
131 |
+
controlnet_depth_app['model_path'],
|
132 |
+
controlnet_depth_app['prompt'],
|
133 |
+
controlnet_depth_app['negative_prompt'],
|
134 |
+
controlnet_depth_app['guidance_scale'],
|
135 |
+
controlnet_depth_app['num_inference_step'],
|
136 |
+
],
|
137 |
+
outputs = [output_image],
|
138 |
+
)
|
139 |
+
|
140 |
+
controlnet_pose_app['predict'].click(
|
141 |
+
fn = stable_diffusion_controlnet_depth,
|
142 |
+
inputs = [
|
143 |
+
controlnet_pose_app['image_path'],
|
144 |
+
controlnet_pose_app['model_path'],
|
145 |
+
controlnet_pose_app['prompt'],
|
146 |
+
controlnet_pose_app['negative_prompt'],
|
147 |
+
controlnet_pose_app['guidance_scale'],
|
148 |
+
controlnet_pose_app['num_inference_step'],
|
149 |
+
],
|
150 |
+
outputs = [output_image],
|
151 |
+
)
|
152 |
+
|
153 |
+
controlnet_scribble_app['predict'].click(
|
154 |
+
fn = stable_diffusion_controlnet_scribble,
|
155 |
+
inputs = [
|
156 |
+
controlnet_scribble_app['image_path'],
|
157 |
+
controlnet_scribble_app['model_path'],
|
158 |
+
controlnet_scribble_app['prompt'],
|
159 |
+
controlnet_scribble_app['negative_prompt'],
|
160 |
+
controlnet_scribble_app['guidance_scale'],
|
161 |
+
controlnet_scribble_app['num_inference_step'],
|
162 |
+
],
|
163 |
+
outputs = [output_image],
|
164 |
+
)
|
165 |
+
|
166 |
+
controlnet_seg_app['predict'].click(
|
167 |
+
fn = stable_diffusion_controlnet_pose,
|
168 |
+
inputs = [
|
169 |
+
controlnet_seg_app['image_path'],
|
170 |
+
controlnet_seg_app['model_path'],
|
171 |
+
controlnet_seg_app['prompt'],
|
172 |
+
controlnet_seg_app['negative_prompt'],
|
173 |
+
controlnet_seg_app['guidance_scale'],
|
174 |
+
controlnet_seg_app['num_inference_step'],
|
175 |
+
],
|
176 |
+
outputs = [output_image],
|
177 |
+
)
|
178 |
|
179 |
+
app.launch(debug=True)
|