Nick088 commited on
Commit
988a34b
·
verified ·
1 Parent(s): fc86256

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -30,7 +30,7 @@ pipe.to(device)
30
  # Define the image generation function
31
  @spaces.GPU(duration=60)
32
  def generate_image(prompt, negative_prompt, num_inference_steps, height, width, guidance_scale, num_images_per_prompt):
33
- image = pipe(
34
  prompt=prompt,
35
  negative_prompt=negative_prompt,
36
  num_inference_steps=num_inference_steps,
@@ -38,8 +38,8 @@ def generate_image(prompt, negative_prompt, num_inference_steps, height, width,
38
  width=width,
39
  guidance_scale=guidance_scale,
40
  num_images_per_prompt=num_images_per_prompt
41
- ).images[0]
42
- return image
43
 
44
  # Create the Gradio interface
45
 
@@ -62,7 +62,7 @@ interface = gr.Interface(
62
  inputs=[prompt, negative_prompt, num_inference_steps, height, width, guidance_scale, num_images_per_prompt],
63
  outputs="image",
64
  title="Stable Diffusion 3 Medium",
65
- description="Made by [Nick088](https://linktr.ee/Nick088"
66
  )
67
 
68
  # Launch the interface
 
30
  # Define the image generation function
31
  @spaces.GPU(duration=60)
32
  def generate_image(prompt, negative_prompt, num_inference_steps, height, width, guidance_scale, num_images_per_prompt):
33
+ output = pipe(
34
  prompt=prompt,
35
  negative_prompt=negative_prompt,
36
  num_inference_steps=num_inference_steps,
 
38
  width=width,
39
  guidance_scale=guidance_scale,
40
  num_images_per_prompt=num_images_per_prompt
41
+ ).images
42
+ return output
43
 
44
  # Create the Gradio interface
45
 
 
62
  inputs=[prompt, negative_prompt, num_inference_steps, height, width, guidance_scale, num_images_per_prompt],
63
  outputs="image",
64
  title="Stable Diffusion 3 Medium",
65
+ description="Made by <a href='https://linktr.ee/Nick088' target='_blank'>Nick088</a> \n Join https://discord.gg/osai to talk about Open Source AI"
66
  )
67
 
68
  # Launch the interface