KingNish commited on
Commit
d29f160
1 Parent(s): dcb0f52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -19,7 +19,7 @@ from diffusers_patches import pixart_sigma_init_patched_inputs, PixArtSigmaPipel
19
  DESCRIPTION = """ # Instant Image
20
  ### Super fast text to Image Generator.
21
  ### <span style='color: red;'>You may change the steps from 9 to 15, if you didn't get satisfied results.
22
- ### First Image processing takes time (Because model is loading) then Lighting fast image generated.
23
  """
24
  if not torch.cuda.is_available():
25
  DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
@@ -155,7 +155,7 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
155
 
156
  @torch.no_grad()
157
  @torch.inference_mode()
158
- @spaces.GPU(duration=60)
159
  def generate(
160
  prompt: str,
161
  negative_prompt: str = "",
@@ -163,8 +163,8 @@ def generate(
163
  use_negative_prompt: bool = False,
164
  num_imgs: int = 1,
165
  seed: int = 0,
166
- width: int = 400,
167
- height: int = 400,
168
  schedule: str = 'DPM-Solver',
169
  dpms_guidance_scale: float = 3.5,
170
  dpms_inference_steps: int = 9,
@@ -287,14 +287,14 @@ with gr.Blocks(css="style.css") as demo:
287
  minimum=256,
288
  maximum=MAX_IMAGE_SIZE,
289
  step=32,
290
- value=400,
291
  )
292
  height = gr.Slider(
293
  label="Height",
294
  minimum=256,
295
  maximum=MAX_IMAGE_SIZE,
296
  step=32,
297
- value=400,
298
  )
299
  with gr.Row():
300
  dpms_guidance_scale = gr.Slider(
 
19
  DESCRIPTION = """ # Instant Image
20
  ### Super fast text to Image Generator.
21
  ### <span style='color: red;'>You may change the steps from 9 to 15, if you didn't get satisfied results.
22
+ ### First Image processing takes time then images generate faster.
23
  """
24
  if not torch.cuda.is_available():
25
  DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
 
155
 
156
  @torch.no_grad()
157
  @torch.inference_mode()
158
+ @spaces.GPU(duration=30)
159
  def generate(
160
  prompt: str,
161
  negative_prompt: str = "",
 
163
  use_negative_prompt: bool = False,
164
  num_imgs: int = 1,
165
  seed: int = 0,
166
+ width: int = 2560,
167
+ height: int = 2560,
168
  schedule: str = 'DPM-Solver',
169
  dpms_guidance_scale: float = 3.5,
170
  dpms_inference_steps: int = 9,
 
287
  minimum=256,
288
  maximum=MAX_IMAGE_SIZE,
289
  step=32,
290
+ value=2560,
291
  )
292
  height = gr.Slider(
293
  label="Height",
294
  minimum=256,
295
  maximum=MAX_IMAGE_SIZE,
296
  step=32,
297
+ value=2560,
298
  )
299
  with gr.Row():
300
  dpms_guidance_scale = gr.Slider(