Update handler.py
Browse files- handler.py +15 -15
handler.py
CHANGED
|
@@ -279,21 +279,21 @@ class EndpointHandler():
|
|
| 279 |
try:
|
| 280 |
task_type = task.get_type()
|
| 281 |
print("logs post: self.multi_text2image_model[model_id]", self.multi_text2image_model)
|
| 282 |
-
if task_type == TaskType.TEXT_TO_IMAGE:
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
# elif task_type == TaskType.IMAGE_TO_IMAGE:
|
| 290 |
-
# return img2img(task)
|
| 291 |
-
# elif task_type == TaskType.CANNY:
|
| 292 |
-
# return canny(task)
|
| 293 |
-
# elif task_type == TaskType.POSE:
|
| 294 |
-
# return pose(task)
|
| 295 |
-
else:
|
| 296 |
-
|
| 297 |
except Exception as e:
|
| 298 |
print(f"Error: {e}")
|
| 299 |
slack.error_alert(data, e)
|
|
|
|
| 279 |
try:
|
| 280 |
task_type = task.get_type()
|
| 281 |
print("logs post: self.multi_text2image_model[model_id]", self.multi_text2image_model)
|
| 282 |
+
# if task_type == TaskType.TEXT_TO_IMAGE:
|
| 283 |
+
# # character sheet
|
| 284 |
+
# if "character sheet" in task.get_prompt().lower():
|
| 285 |
+
# print("pose is here")
|
| 286 |
+
# # return pose(task, s3_outkey="", poses=pickPoses())
|
| 287 |
+
# else:
|
| 288 |
+
# return text2img(task, self.multi_text2image_model[model_id])
|
| 289 |
+
# # elif task_type == TaskType.IMAGE_TO_IMAGE:
|
| 290 |
+
# # return img2img(task)
|
| 291 |
+
# # elif task_type == TaskType.CANNY:
|
| 292 |
+
# # return canny(task)
|
| 293 |
+
# # elif task_type == TaskType.POSE:
|
| 294 |
+
# # return pose(task)
|
| 295 |
+
# else:
|
| 296 |
+
# raise Exception("Invalid task type")
|
| 297 |
except Exception as e:
|
| 298 |
print(f"Error: {e}")
|
| 299 |
slack.error_alert(data, e)
|