Keltezaa commited on
Commit
e219bc9
Β·
verified Β·
1 Parent(s): 8bd568c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -442,6 +442,10 @@ def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, progress)
442
  generator = torch.Generator(device="cuda").manual_seed(seed)
443
  final_image = None # Initialize final_image
444
  with calculateDuration("Generating image"):
 
 
 
 
445
  # Generate image
446
  for img in pipe.flux_pipe_call_that_returns_an_iterable_of_images(
447
  prompt=prompt_mash,
 
442
  generator = torch.Generator(device="cuda").manual_seed(seed)
443
  final_image = None # Initialize final_image
444
  with calculateDuration("Generating image"):
445
+ # Ensure width and height are integers
446
+ width = int(width) if isinstance(width, (float, int)) else 1024
447
+ height = int(height) if isinstance(height, (float, int)) else 1024
448
+
449
  # Generate image
450
  for img in pipe.flux_pipe_call_that_returns_an_iterable_of_images(
451
  prompt=prompt_mash,