adpro commited on
Commit
a737e20
·
1 Parent(s): 6c43380

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -90,7 +90,7 @@ css = '''
90
  random_seed = random.randint(0, 2147483647)
91
 
92
  with gr.Blocks(css=css) as demo:
93
- gr.Markdown("# Stable Diffusion Inference Demo Side-by-Side")
94
  gr.Markdown(md)
95
 
96
  with gr.Tab("Text-to-Image"):
@@ -101,11 +101,13 @@ with gr.Blocks(css=css) as demo:
101
  seed = gr.inputs.Slider(0, 2147483647, label='Seed', default=random_seed, step=1)
102
  guidance_scale = gr.inputs.Slider(1.0, 20.0, label='Guidance Scale - how much the prompt will influence the results', default=7.5, step=0.1)
103
  txt2img_button = gr.Button("Generate Image")
 
 
104
 
105
  with gr.Column():
106
- result_image_1 = gr.Image(label="4th Gen Intel Xeon Scalable Processors (SPR)").style(height='1', rounded=True)
107
- result_image_2 = gr.Image(label="3rd Gen Intel Xeon Scalable Processors (ICX)").style(height='100', rounded=False)
108
-
109
  with gr.Tab("Image-to-Image text-guided generation"):
110
  with gr.Row() as image_to_image:
111
  with gr.Column():
@@ -114,12 +116,11 @@ with gr.Blocks(css=css) as demo:
114
  inference_steps_2 = gr.inputs.Slider(1, 100, label='Inference Steps - increase the steps for better quality (e.g., avoiding black image) ', default=20, step=1)
115
  seed_2 = gr.inputs.Slider(0, 2147483647, label='Seed', default=random_seed, step=1)
116
  guidance_scale_2 = gr.inputs.Slider(1.0, 20.0, label='Guidance Scale - how much the prompt will influence the results', default=7.5, step=0.1)
117
- strength = gr.inputs.Slider(0.0, 1.0, label='Strength - adding more noise to it the larger the strength', default=0.25, step=0.01)
118
  img2img_button = gr.Button("Generate Image")
119
  url_SPR = gr.Textbox(label='url_SPR', value="http://34.229.166.42:80", visible=False)
120
  url_CLX = gr.Textbox(label='url_CLX', value="http://54.221.56.4:80", visible=False)
121
 
122
-
123
  with gr.Column():
124
  result_image_3 = gr.Image(label="Result01", elem_id="img_3")
125
  result_image_4 = gr.Image(label="Result02", elem_id="img_4")
 
90
  random_seed = random.randint(0, 2147483647)
91
 
92
  with gr.Blocks(css=css) as demo:
93
+ gr.Markdown("# Stable Diffusion Inference Demo Comparison")
94
  gr.Markdown(md)
95
 
96
  with gr.Tab("Text-to-Image"):
 
101
  seed = gr.inputs.Slider(0, 2147483647, label='Seed', default=random_seed, step=1)
102
  guidance_scale = gr.inputs.Slider(1.0, 20.0, label='Guidance Scale - how much the prompt will influence the results', default=7.5, step=0.1)
103
  txt2img_button = gr.Button("Generate Image")
104
+ url_SPR_txt = gr.Textbox(label='url_SPR_txt', value="http://34.229.166.42:80", visible=False)
105
+ url_CLX_txt = gr.Textbox(label='url_CLX_txt', value="http://54.221.56.4:80", visible=False)
106
 
107
  with gr.Column():
108
+ result_image_1 = gr.Image(label="4th Gen Intel Xeon Scalable Processors (SPR)", elem_id="img_1")
109
+ result_image_2 = gr.Image(label="3rd Gen Intel Xeon Scalable Processors (ICX)", elem_id="img_2")
110
+
111
  with gr.Tab("Image-to-Image text-guided generation"):
112
  with gr.Row() as image_to_image:
113
  with gr.Column():
 
116
  inference_steps_2 = gr.inputs.Slider(1, 100, label='Inference Steps - increase the steps for better quality (e.g., avoiding black image) ', default=20, step=1)
117
  seed_2 = gr.inputs.Slider(0, 2147483647, label='Seed', default=random_seed, step=1)
118
  guidance_scale_2 = gr.inputs.Slider(1.0, 20.0, label='Guidance Scale - how much the prompt will influence the results', default=7.5, step=0.1)
119
+ strength = gr.inputs.Slider(0.0, 1.0, label='Strength - adding more noise to it the larger the strength', default=0.75, step=0.01)
120
  img2img_button = gr.Button("Generate Image")
121
  url_SPR = gr.Textbox(label='url_SPR', value="http://34.229.166.42:80", visible=False)
122
  url_CLX = gr.Textbox(label='url_CLX', value="http://54.221.56.4:80", visible=False)
123
 
 
124
  with gr.Column():
125
  result_image_3 = gr.Image(label="Result01", elem_id="img_3")
126
  result_image_4 = gr.Image(label="Result02", elem_id="img_4")