ford442 commited on
Commit
b74b8c1
·
verified ·
1 Parent(s): 6b7a148

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -227,24 +227,25 @@ def generate_30(
227
  seed = random.randint(0, MAX_SEED)
228
  generator = torch.Generator(device='cuda').manual_seed(seed)
229
  if latent_file is not None: # Check if a latent file is provided
230
- sd_image_a = Image.open(latent_file.name)
 
231
  if latent_file_2 is not None: # Check if a latent file is provided
232
- sd_image_b = Image.open(latent_file_2.name)
233
  sd_image_b.resize((height,width), Image.LANCZOS)
234
  else:
235
  sd_image_b = None
236
  if latent_file_3 is not None: # Check if a latent file is provided
237
- sd_image_c = Image.open(latent_file_3.name)
238
  sd_image_c.resize((height,width), Image.LANCZOS)
239
  else:
240
  sd_image_c = None
241
  if latent_file_4 is not None: # Check if a latent file is provided
242
- sd_image_d = Image.open(latent_file_4.name)
243
  sd_image_d.resize((height,width), Image.LANCZOS)
244
  else:
245
  sd_image_d = None
246
  if latent_file_5 is not None: # Check if a latent file is provided
247
- sd_image_e = Image.open(latent_file_5.name)
248
  sd_image_e.resize((height,width), Image.LANCZOS)
249
  else:
250
  sd_image_e = None
 
227
  seed = random.randint(0, MAX_SEED)
228
  generator = torch.Generator(device='cuda').manual_seed(seed)
229
  if latent_file is not None: # Check if a latent file is provided
230
+ sd_image_a = Image.open(latent_file.name).convert('RGB')
231
+ sd_image_a.resize((height,width), Image.LANCZOS)
232
  if latent_file_2 is not None: # Check if a latent file is provided
233
+ sd_image_b = Image.open(latent_file_2.name).convert('RGB')
234
  sd_image_b.resize((height,width), Image.LANCZOS)
235
  else:
236
  sd_image_b = None
237
  if latent_file_3 is not None: # Check if a latent file is provided
238
+ sd_image_c = Image.open(latent_file_3.name).convert('RGB')
239
  sd_image_c.resize((height,width), Image.LANCZOS)
240
  else:
241
  sd_image_c = None
242
  if latent_file_4 is not None: # Check if a latent file is provided
243
+ sd_image_d = Image.open(latent_file_4.name).convert('RGB')
244
  sd_image_d.resize((height,width), Image.LANCZOS)
245
  else:
246
  sd_image_d = None
247
  if latent_file_5 is not None: # Check if a latent file is provided
248
+ sd_image_e = Image.open(latent_file_5.name).convert('RGB')
249
  sd_image_e.resize((height,width), Image.LANCZOS)
250
  else:
251
  sd_image_e = None