ford442 commited on
Commit
dc41f11
·
verified ·
1 Parent(s): 64912f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -285,7 +285,7 @@ def generate_30(
285
  ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
286
  seed = int(randomize_seed_fn(seed, randomize_seed))
287
  generator = torch.Generator(device='cuda').manual_seed(seed)
288
- if latent_file: # Check if a latent file is provided
289
  #sd_image_a = torch.load(latent_file.name) # Load the latent
290
  sd_image_a = Image.open(latent_file.name)
291
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
@@ -339,7 +339,7 @@ def generate_60(
339
  ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
340
  seed = int(randomize_seed_fn(seed, randomize_seed))
341
  generator = torch.Generator(device='cuda').manual_seed(seed)
342
- if latent_file: # Check if a latent file is provided
343
  #sd_image_a = torch.load(latent_file.name) # Load the latent
344
  sd_image_a = Image.open(latent_file.name)
345
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
@@ -393,7 +393,7 @@ def generate_90(
393
  ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
394
  seed = int(randomize_seed_fn(seed, randomize_seed))
395
  generator = torch.Generator(device='cuda').manual_seed(seed)
396
- if latent_file: # Check if a latent file is provided
397
  #sd_image_a = torch.load(latent_file.name) # Load the latent
398
  sd_image_a = Image.open(latent_file.name)
399
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
 
285
  ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
286
  seed = int(randomize_seed_fn(seed, randomize_seed))
287
  generator = torch.Generator(device='cuda').manual_seed(seed)
288
+ if latent_file.any(): # Check if a latent file is provided
289
  #sd_image_a = torch.load(latent_file.name) # Load the latent
290
  sd_image_a = Image.open(latent_file.name)
291
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
 
339
  ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
340
  seed = int(randomize_seed_fn(seed, randomize_seed))
341
  generator = torch.Generator(device='cuda').manual_seed(seed)
342
+ if latent_file.any(): # Check if a latent file is provided
343
  #sd_image_a = torch.load(latent_file.name) # Load the latent
344
  sd_image_a = Image.open(latent_file.name)
345
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
 
393
  ip_model = IPAdapterXL(pipe, local_folder, ip_ckpt, device)
394
  seed = int(randomize_seed_fn(seed, randomize_seed))
395
  generator = torch.Generator(device='cuda').manual_seed(seed)
396
+ if latent_file.any(): # Check if a latent file is provided
397
  #sd_image_a = torch.load(latent_file.name) # Load the latent
398
  sd_image_a = Image.open(latent_file.name)
399
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")