lunarflu HF Staff commited on
Commit
68e144d
·
1 Parent(s): 048abc6

[decorators] seed = 1

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -55,7 +55,8 @@ async def deepfloydif(ctx, *, prompt: str):
55
  random.seed(current_time)
56
 
57
  negative_prompt = ''
58
- seed = random.randint(0, 2**32 - 1)
 
59
  number_of_images = 4
60
  guidance_scale = 7
61
  custom_timesteps_1 = 'smart50'
@@ -70,7 +71,6 @@ async def deepfloydif(ctx, *, prompt: str):
70
  try:
71
  stage_1_results, stage_1_param_path, stage_1_result_path = df.predict(
72
  prompt, negative_prompt, seed, number_of_images, guidance_scale, custom_timesteps_1, number_of_inference_steps, api_name='/generate64')
73
- png_files = [f for f in os.listdir(stage_1_results) if f.endswith('.png')]
74
  except Exception as e:
75
  print(f"Error: {e}")
76
  await ctx.reply('stage 1 error -> during generation')
@@ -78,6 +78,8 @@ async def deepfloydif(ctx, *, prompt: str):
78
 
79
  try:
80
  await thread.send(f'{ctx.author.mention}Generating images in thread, can take ~1 minute...')
 
 
81
 
82
  if png_files:
83
  for i, png_file in enumerate(png_files):
 
55
  random.seed(current_time)
56
 
57
  negative_prompt = ''
58
+ #seed = random.randint(0, 2**32 - 1)
59
+ seed = 1
60
  number_of_images = 4
61
  guidance_scale = 7
62
  custom_timesteps_1 = 'smart50'
 
71
  try:
72
  stage_1_results, stage_1_param_path, stage_1_result_path = df.predict(
73
  prompt, negative_prompt, seed, number_of_images, guidance_scale, custom_timesteps_1, number_of_inference_steps, api_name='/generate64')
 
74
  except Exception as e:
75
  print(f"Error: {e}")
76
  await ctx.reply('stage 1 error -> during generation')
 
78
 
79
  try:
80
  await thread.send(f'{ctx.author.mention}Generating images in thread, can take ~1 minute...')
81
+
82
+ png_files = [f for f in os.listdir(stage_1_results) if f.endswith('.png')]
83
 
84
  if png_files:
85
  for i, png_file in enumerate(png_files):