kadirnar commited on
Commit
02d7f3f
1 Parent(s): ff4440d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +127 -127
app.py CHANGED
@@ -45,135 +45,135 @@ with app:
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)
 
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)