if not "Error: 400 Bad Request (error code: 50035): Invalid Form Body" in ignorecheck:
Browse files
app.py
CHANGED
@@ -292,7 +292,9 @@ async def fullqueue(e, thread):
|
|
292 |
await thread.send("Queue is full! Please try again.")
|
293 |
elif "local variable 'stage_1_results' referenced before assignment" in error_message:
|
294 |
await thread.send("Queue is full! Please try again.")
|
295 |
-
#----------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
296 |
# deepfloydif stage 1 generation ✅
|
297 |
def inference(prompt):
|
298 |
negative_prompt = ''
|
@@ -353,13 +355,15 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
353 |
|
354 |
except Exception as e:
|
355 |
print(f"Error: {e}")
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
|
|
|
|
363 |
#generation✅-------------------------------------------------------
|
364 |
try:
|
365 |
#stage_1_results, stage_1_param_path, stage_1_result_path = df.predict(
|
@@ -481,7 +485,6 @@ async def dfif2(index: int, stage_1_result_path, thread, dfif_command_message_id
|
|
481 |
parent_channel = thread.parent
|
482 |
dfif_command_message = await parent_channel.fetch_message(dfif_command_message_id)
|
483 |
await dfif_command_message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
484 |
-
await dfif_command_message.add_reaction('<:disagree:1098628957521313892>') # in case we get the over 100 characters error
|
485 |
await dfif_command_message.add_reaction('<:agree:1098629085955113011>')
|
486 |
await thread.edit(archived=True)
|
487 |
|
|
|
292 |
await thread.send("Queue is full! Please try again.")
|
293 |
elif "local variable 'stage_1_results' referenced before assignment" in error_message:
|
294 |
await thread.send("Queue is full! Please try again.")
|
295 |
+
#----------------------------------------------------------------------------------------------------------------------------------------------
|
296 |
+
|
297 |
+
|
298 |
# deepfloydif stage 1 generation ✅
|
299 |
def inference(prompt):
|
300 |
negative_prompt = ''
|
|
|
355 |
|
356 |
except Exception as e:
|
357 |
print(f"Error: {e}")
|
358 |
+
ignorecheck = str(e)
|
359 |
+
if not "Error: 400 Bad Request (error code: 50035): Invalid Form Body" in ignorecheck:
|
360 |
+
if thread is None:
|
361 |
+
thread = await ctx.message.create_thread(name=f'DFIF1 Error')
|
362 |
+
await thread.send(f"{ctx.author.mention} Error before stage 1 generation, {e}")
|
363 |
+
await fullqueue(e, thread)
|
364 |
+
await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
365 |
+
await ctx.message.add_reaction('<:disagree:1098628957521313892>')
|
366 |
+
await thread.edit(archived=True)
|
367 |
#generation✅-------------------------------------------------------
|
368 |
try:
|
369 |
#stage_1_results, stage_1_param_path, stage_1_result_path = df.predict(
|
|
|
485 |
parent_channel = thread.parent
|
486 |
dfif_command_message = await parent_channel.fetch_message(dfif_command_message_id)
|
487 |
await dfif_command_message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
|
|
488 |
await dfif_command_message.add_reaction('<:agree:1098629085955113011>')
|
489 |
await thread.edit(archived=True)
|
490 |
|