lunarflu HF Staff commited on
Commit
7b9201c
·
1 Parent(s): 313dffd

[dfif] await react1234(emoji_list, combined_image_dfif)

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -204,7 +204,11 @@ def inference(prompt):
204
  prompt, negative_prompt, seed, number_of_images, guidance_scale, custom_timesteps_1, number_of_inference_steps, api_name='/generate64')
205
 
206
  return [stage_1_results, stage_1_param_path, stage_1_result_path]
207
- #----------------------------------------------------------------------------------------------------------------------------------------------
 
 
 
 
208
  # Stage 1 ❌
209
  @bot.command()
210
  async def deepfloydif(ctx, *, prompt: str):
@@ -286,11 +290,8 @@ async def deepfloydif(ctx, *, prompt: str):
286
  combined_image_dfif = await thread.send(f'{ctx.author.mention}React with the image number you want to upscale!', file=discord.File(
287
  f, f'{partialpath}{dfif_command_message_id}.png')) # named something like: tmpgtv4qjix1111269940599738479.png
288
 
289
- async def react1234(emoji, combined_image_dfif):
290
- for emoji in ['1️⃣', '2️⃣', '3️⃣', '4️⃣']:
291
- await combined_image_dfif.add_reaction(emoji)
292
-
293
- await react1234(emoji, combined_image_dfif)
294
 
295
  ''' individual images
296
  if png_files:
 
204
  prompt, negative_prompt, seed, number_of_images, guidance_scale, custom_timesteps_1, number_of_inference_steps, api_name='/generate64')
205
 
206
  return [stage_1_results, stage_1_param_path, stage_1_result_path]
207
+ #----------------------------------------------------------------------------------------------------------------------------------------------
208
+ async def react1234(reaction_emojis, combined_image_dfif):
209
+ for emoji in reaction_emojis:
210
+ await combined_image_dfif.add_reaction(emoji)
211
+ #----------------------------------------------------------------------------------------------------------------------------------------------
212
  # Stage 1 ❌
213
  @bot.command()
214
  async def deepfloydif(ctx, *, prompt: str):
 
290
  combined_image_dfif = await thread.send(f'{ctx.author.mention}React with the image number you want to upscale!', file=discord.File(
291
  f, f'{partialpath}{dfif_command_message_id}.png')) # named something like: tmpgtv4qjix1111269940599738479.png
292
 
293
+ emoji_list = ['1️⃣', '2️⃣', '3️⃣', '4️⃣']
294
+ await react1234(emoji_list, combined_image_dfif)
 
 
 
295
 
296
  ''' individual images
297
  if png_files: