solitarycodefinement commited on
Commit
c620232
·
1 Parent(s): 940e039

christmas models

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -265,12 +265,6 @@ with blocks:
265
  "<h4 style='font-size: 110%;margin-top:.5em'>Usage</h4><div>Upload an image of your face, pick your desired output styles, and apply StyleGAN-based editing.</div>"
266
  "<div>Choose the edit image tab to create static images in all chosen styles. Choose the video tab in order to interpolate between all chosen styles</div><div>(To make it easier on the servers, we've limited video length. If you add too many styles (we recommend no more than 3!), they'll pass in the blink of an eye! 🤗)</div>"
267
  )
268
- gr.Markdown(
269
- "For more information about the paper and code for training your own models (with text or images), please visit our <a href='https://stylegan-nada.github.io/' target='_blank'>project page</a> or the <a href='https://github.com/rinongal/StyleGAN-nada' target='_blank'>official repository</a>."
270
- )
271
-
272
- gr.Markdown("<h4 style='font-size: 110%;margin-top:.5em'>A note on social impact</h4><div>This model relies on StyleGAN and CLIP, both of which are prone to biases inherited from their training data and their architecture. These may include (but are not limited to) poor representation of minorities or the perpetution of societal biases, such as gender norms. In particular, StyleGAN editing may induce undesired changes in skin tones. Moreover, generative models can, and have been used to create deep fake imagery which may assist in the spread of propaganda. However, <a href='https://github.com/NVlabs/stylegan3-detector' target='_blank'>tools are available</a> for identifying StyleGAN generated imagery, and any 'realistic' results produced by this model should be easily identifiable through such tools.</div>")
273
-
274
  with gr.Row():
275
  with gr.Column():
276
  input_img = gr.inputs.Image(type="filepath", label="Input image")
@@ -278,8 +272,6 @@ with blocks:
278
  with gr.Column():
279
  style_choice = gr.inputs.CheckboxGroup(choices=editor.get_style_list(), type="value", label="Choose your styles!")
280
 
281
- editing_type_choice = gr.Radio(choices=["None", "InterFaceGAN", "StyleCLIP"], label="Choose latent space editing option. For InterFaceGAN and StyleCLIP, set the options below:")
282
-
283
  with gr.Row():
284
  with gr.Column():
285
  with gr.Tabs():
@@ -313,7 +305,7 @@ with blocks:
313
  ig_edit_choices = [pose_slider, smile_slider, gender_slider, age_slider, hair_slider]
314
 
315
 
316
- edit_inputs = [editing_type_choice] + ig_edit_choices
317
  img_button.click(fn=editor.edit_image, inputs=edit_inputs + [input_img, style_choice], outputs=img_output)
318
  vid_button.click(fn=editor.edit_video, inputs=edit_inputs + [input_img, style_choice, loop_styles], outputs=vid_output)
319
 
 
265
  "<h4 style='font-size: 110%;margin-top:.5em'>Usage</h4><div>Upload an image of your face, pick your desired output styles, and apply StyleGAN-based editing.</div>"
266
  "<div>Choose the edit image tab to create static images in all chosen styles. Choose the video tab in order to interpolate between all chosen styles</div><div>(To make it easier on the servers, we've limited video length. If you add too many styles (we recommend no more than 3!), they'll pass in the blink of an eye! 🤗)</div>"
267
  )
 
 
 
 
 
 
268
  with gr.Row():
269
  with gr.Column():
270
  input_img = gr.inputs.Image(type="filepath", label="Input image")
 
272
  with gr.Column():
273
  style_choice = gr.inputs.CheckboxGroup(choices=editor.get_style_list(), type="value", label="Choose your styles!")
274
 
 
 
275
  with gr.Row():
276
  with gr.Column():
277
  with gr.Tabs():
 
305
  ig_edit_choices = [pose_slider, smile_slider, gender_slider, age_slider, hair_slider]
306
 
307
 
308
+ edit_inputs = ["InterFaceGAN"] + ig_edit_choices
309
  img_button.click(fn=editor.edit_image, inputs=edit_inputs + [input_img, style_choice], outputs=img_output)
310
  vid_button.click(fn=editor.edit_video, inputs=edit_inputs + [input_img, style_choice, loop_styles], outputs=vid_output)
311