apolinario commited on
Commit
63f5381
1 Parent(s): 994fab5

Update MindsEye

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -61,14 +61,14 @@ css_mt = {"margin-top": "1em"}
61
  empty = gr.outputs.HTML()
62
 
63
  with gr.Blocks() as mindseye:
64
- gr.Markdown("<h1>MindsEye Lite <small><small>run multiple text-to-image models in one place</small></small></h1><p>MindsEye Lite orchestrates multiple text-to-image Hugging Face Spaces in one convenient space, so you can try different models. This work carries the spirit of <a href='https://multimodal.art/mindseye' target='_blank'>MindsEye Beta</a>, a tool to run multiple models with a single UI, but adjusted to the current hardware limitations of Spaces. MindsEye Lite was created by <a style='color: rgb(99, 102, 241);font-weight:bold' href='https://twitter.com/multimodalart' target='_blank'>@multimodalart</a>, keep up with the <a style='color: rgb(99, 102, 241);' href='https://multimodal.art/news' target='_blank'>latest multimodal ai art news here</a> and consider <a style='color: rgb(99, 102, 241);' href='https://www.patreon.com/multimodalart' target='_blank'>supporting us on Patreon</a></div></p>")
65
- gr.Markdown("<style>.mx-auto.container .gr-form-gap {flex-direction: row; gap: calc(1rem * calc(1 - var(--tw-space-y-reverse)));} .mx-auto.container .gr-form-gap .flex-col, .mx-auto.container .gr-form-gap .gr-box{width: 100%} @media only screen and (max-width: 1000px){.mx-auto.container .gr-form-gap{flex-direction: column}}</style>")
66
- text = gr.inputs.Textbox(placeholder="Type your prompt to generate an image", label="Prompt - try adding increments to your prompt such as 'a painting of...', '...in the style of Picasso'", default="A giant mecha robot in Rio de Janeiro, oil on canvas")
67
  with gr.Column():
68
  with gr.Row():
69
  with gr.Tabs():
70
  with gr.TabItem("Latent Diffusion"):
71
- gr.Markdown("Latent Diffusion is the state of the art of open source text-to-image models, superb in text synthesis. Sometimes struggles with complex prompts")
72
  steps = gr.inputs.Slider(label="Steps - more steps can increase quality but will take longer to generate",default=45,maximum=50,minimum=1,step=1)
73
  width = gr.inputs.Slider(label="Width", default=256, step=32, maximum=256, minimum=32)
74
  height = gr.inputs.Slider(label="Height", default=256, step=32, maximum = 256, minimum=32)
@@ -76,12 +76,12 @@ with gr.Blocks() as mindseye:
76
  diversity = gr.inputs.Slider(label="Diversity scale - How different from one another you wish the images to be",default=5.0, minimum=1.0, maximum=15.0)
77
  get_image_latent = gr.Button("Generate Image",css=css_mt)
78
  with gr.TabItem("ruDALLE"):
79
- gr.Markdown("ruDALLE is a replication of DALL-E 1 in the russian language. No worries, your prompts will be translated automatically to russian. In case you see an error, try again a few times")
80
  aspect = gr.inputs.Radio(label="Aspect Ratio", choices=["Square", "Horizontal", "Vertical"],default="Square")
81
  model = gr.inputs.Dropdown(label="Model", choices=["Surrealism","Realism", "Emoji"], default="Surrealism")
82
  get_image_rudalle = gr.Button("Generate Image",css=css_mt)
83
  with gr.TabItem("VQGAN+CLIP"):
84
- gr.Markdown("VQGAN+CLIP is the most famous text-to-image generator. Can produce good artistic results")
85
  width_vq = gr.inputs.Slider(label="Width", default=256, minimum=32, step=32, maximum=512)
86
  height_vq= gr.inputs.Slider(label="Height", default=256, minimum=32, step=32, maximum=512)
87
  style = gr.inputs.Dropdown(label="Style - Hyper Fast Results is fast but compromises a bit of the quality",choices=["Default","Balanced","Detailed","Consistent Creativity","Realistic","Smooth","Subtle MSE","Hyper Fast Results"],default="Hyper Fast Results")
@@ -89,7 +89,7 @@ with gr.Blocks() as mindseye:
89
  flavor = gr.inputs.Dropdown(label="Flavor - pick a flavor for the style of the images, based on the images below",choices=["ginger", "cumin", "holywater", "zynth", "wyvern", "aaron", "moth", "juu"])
90
  get_image_vqgan = gr.Button("Generate Image",css=css_mt)
91
  with gr.TabItem("Guided Diffusion"):
92
- gr.Markdown("Guided Diffusion models produce superb quality results. V-Diffusion is its latest implementation")
93
  steps_diff = gr.inputs.Slider(label="Steps - more steps can increase quality but will take longer to generate",default=40,maximum=80,minimum=1,step=1)
94
  images_diff = gr.inputs.Slider(label="Number of images in parallel", default=2, maximum=4, minimum=1, step=1)
95
  weight = gr.inputs.Slider(label="Weight - how closely the image should resemble the prompt", default=5, maximum=15, minimum=0, step=1)
 
61
  empty = gr.outputs.HTML()
62
 
63
  with gr.Blocks() as mindseye:
64
+ gr.Markdown("<h1>MindsEye Lite <small><small>run multiple text-to-image models in one place</small></small></h1><p>MindsEye Lite orchestrates multiple text-to-image models in one Spaces. This work carries the spirit of <a href='https://multimodal.art/mindseye' target='_blank'>MindsEye Beta</a>, but with simplified versions of the models due to current hardware limitations of Spaces. MindsEye Lite was created by <a style='color: rgb(99, 102, 241);font-weight:bold' href='https://twitter.com/multimodalart' target='_blank'>@multimodalart</a>, keep up with the <a style='color: rgb(99, 102, 241);' href='https://multimodal.art/news' target='_blank'>latest multimodal ai art news here</a> and consider <a style='color: rgb(99, 102, 241);' href='https://www.patreon.com/multimodalart' target='_blank'>supporting us on Patreon</a></div></p>")
65
+ gr.Markdown("<style>h1{margin-bottom:1em} .mx-auto.container .gr-form-gap {flex-direction: row; gap: calc(1rem * calc(1 - var(--tw-space-y-reverse)));} .mx-auto.container .gr-form-gap .flex-col, .mx-auto.container .gr-form-gap .gr-box{width: 100%} .svelte-1bwm9qh > .grid {grid-template-columns: repeat(3,minmax(0,1fr));} @media only screen and (max-width: 1000px){.mx-auto.container .gr-form-gap{flex-direction: column}}</style>")
66
+ text = gr.inputs.Textbox(placeholder="Type your prompt to generate an image", label="Prompt - try adding increments to your prompt such as 'a painting of', 'in the style of Picasso'", default="A giant mecha robot in Rio de Janeiro, oil on canvas")
67
  with gr.Column():
68
  with gr.Row():
69
  with gr.Tabs():
70
  with gr.TabItem("Latent Diffusion"):
71
+ gr.Markdown("<a href='https://huggingface.co/spaces/multimodalart/latentdiffusion' target='_blank'>Latent Diffusion</a> is the state of the art of open source text-to-image models, superb in text synthesis. Sometimes struggles with complex prompts")
72
  steps = gr.inputs.Slider(label="Steps - more steps can increase quality but will take longer to generate",default=45,maximum=50,minimum=1,step=1)
73
  width = gr.inputs.Slider(label="Width", default=256, step=32, maximum=256, minimum=32)
74
  height = gr.inputs.Slider(label="Height", default=256, step=32, maximum = 256, minimum=32)
 
76
  diversity = gr.inputs.Slider(label="Diversity scale - How different from one another you wish the images to be",default=5.0, minimum=1.0, maximum=15.0)
77
  get_image_latent = gr.Button("Generate Image",css=css_mt)
78
  with gr.TabItem("ruDALLE"):
79
+ gr.Markdown("<a href='https://huggingface.co/spaces/multimodalart/rudalle' target='_blank'>ruDALLE</a> is a replication of DALL-E 1 in the russian language. No worries, your prompts will be translated automatically to russian. In case you see an error, try again a few times")
80
  aspect = gr.inputs.Radio(label="Aspect Ratio", choices=["Square", "Horizontal", "Vertical"],default="Square")
81
  model = gr.inputs.Dropdown(label="Model", choices=["Surrealism","Realism", "Emoji"], default="Surrealism")
82
  get_image_rudalle = gr.Button("Generate Image",css=css_mt)
83
  with gr.TabItem("VQGAN+CLIP"):
84
+ gr.Markdown("<a href='https://huggingface.co/spaces/multimodalart/vqgan' target='_blank'>VQGAN+CLIP</a> is the most famous text-to-image generator. Can produce good artistic results")
85
  width_vq = gr.inputs.Slider(label="Width", default=256, minimum=32, step=32, maximum=512)
86
  height_vq= gr.inputs.Slider(label="Height", default=256, minimum=32, step=32, maximum=512)
87
  style = gr.inputs.Dropdown(label="Style - Hyper Fast Results is fast but compromises a bit of the quality",choices=["Default","Balanced","Detailed","Consistent Creativity","Realistic","Smooth","Subtle MSE","Hyper Fast Results"],default="Hyper Fast Results")
 
89
  flavor = gr.inputs.Dropdown(label="Flavor - pick a flavor for the style of the images, based on the images below",choices=["ginger", "cumin", "holywater", "zynth", "wyvern", "aaron", "moth", "juu"])
90
  get_image_vqgan = gr.Button("Generate Image",css=css_mt)
91
  with gr.TabItem("Guided Diffusion"):
92
+ gr.Markdown("<a href='https://huggingface.co/spaces/multimodalart/diffusion' target='_blank'>Guided Diffusion</a> models produce superb quality results. V-Diffusion is its latest implementation")
93
  steps_diff = gr.inputs.Slider(label="Steps - more steps can increase quality but will take longer to generate",default=40,maximum=80,minimum=1,step=1)
94
  images_diff = gr.inputs.Slider(label="Number of images in parallel", default=2, maximum=4, minimum=1, step=1)
95
  weight = gr.inputs.Slider(label="Weight - how closely the image should resemble the prompt", default=5, maximum=15, minimum=0, step=1)