pengdaqian commited on
Commit
00c92ee
1 Parent(s): a5fe30f
Files changed (2) hide show
  1. app.py +5 -5
  2. requirements.txt +1 -3
app.py CHANGED
@@ -116,6 +116,7 @@ def infer(prompt: str, negative: str, width: int, height: int, sampler: str, ste
116
  translate_prompt = prompt
117
  translate_negative = negative
118
 
 
119
  output = replicate.run(
120
  "stability-ai/stable-diffusion:db21e45d3f7023abc2a46ee38a23973f6dce16bb082a930b0c49861f96d1e5bf",
121
  input={
@@ -395,7 +396,6 @@ with block:
395
  small stable diffusion Demo App. <br />
396
  Click <strong>Generate image</strong> Button to generate image. <br />
397
  Also Change params to have a try <br />
398
- every 512*512 image will cost about 40s. <br />
399
  more size may cost more time. <br />
400
  It's just a simplified demo, you can use more advanced features optimize image quality <br />
401
  </p>
@@ -460,9 +460,9 @@ with block:
460
  full_width=False,
461
  )
462
 
463
- gallery = gr.Image(
464
  label="Generated images", show_label=False, elem_id="gallery"
465
- ).style(height=512)
466
 
467
  # with gr.Group(elem_id="container-advanced-btns"):
468
  # # advanced_button = gr.Button("Advanced options", elem_id="advanced-btn")
@@ -487,6 +487,6 @@ with block:
487
  block.queue(concurrency_count=80,
488
  max_size=100).launch(
489
  max_threads=150,
490
- # server_port=6006,
491
- # share=True,
492
  )
 
116
  translate_prompt = prompt
117
  translate_negative = negative
118
 
119
+
120
  output = replicate.run(
121
  "stability-ai/stable-diffusion:db21e45d3f7023abc2a46ee38a23973f6dce16bb082a930b0c49861f96d1e5bf",
122
  input={
 
396
  small stable diffusion Demo App. <br />
397
  Click <strong>Generate image</strong> Button to generate image. <br />
398
  Also Change params to have a try <br />
 
399
  more size may cost more time. <br />
400
  It's just a simplified demo, you can use more advanced features optimize image quality <br />
401
  </p>
 
460
  full_width=False,
461
  )
462
 
463
+ gallery = gr.Gallery(
464
  label="Generated images", show_label=False, elem_id="gallery"
465
+ ).style()
466
 
467
  # with gr.Group(elem_id="container-advanced-btns"):
468
  # # advanced_button = gr.Button("Advanced options", elem_id="advanced-btn")
 
487
  block.queue(concurrency_count=80,
488
  max_size=100).launch(
489
  max_threads=150,
490
+ server_port=6006,
491
+ share=True,
492
  )
requirements.txt CHANGED
@@ -1,4 +1,2 @@
1
  python-dotenv
2
- replicate
3
- ftfy
4
- py-cpuinfo
 
1
  python-dotenv
2
+ replicate