Nick088 commited on
Commit
72f6034
·
verified ·
1 Parent(s): b3925d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ MAX_SEED = np.iinfo(np.int32).max
21
 
22
 
23
  # Initialize the pipeline and download the sd3 medium model
24
- pipe = StableDiffusion3Pipeline.from_pretrained(model_path, torch_dtype=torch.float16)
25
  pipe.to(device)
26
 
27
  # superprompt-v1
@@ -30,7 +30,7 @@ model = T5ForConditionalGeneration.from_pretrained("roborovski/superprompt-v1",
30
  model.to(device)
31
 
32
  # Define the image generation function
33
- @spaces.GPU(duration=60 * 2)
34
  def generate_image(prompt, enhance_prompt, negative_prompt, num_inference_steps, height, width, guidance_scale, seed, num_images_per_prompt):
35
  if seed == 0:
36
  seed = random.randint(1, 2**32-1)
 
21
 
22
 
23
  # Initialize the pipeline and download the sd3 medium model
24
+ pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16)
25
  pipe.to(device)
26
 
27
  # superprompt-v1
 
30
  model.to(device)
31
 
32
  # Define the image generation function
33
+ @spaces.GPU(duration=90)
34
  def generate_image(prompt, enhance_prompt, negative_prompt, num_inference_steps, height, width, guidance_scale, seed, num_images_per_prompt):
35
  if seed == 0:
36
  seed = random.randint(1, 2**32-1)