import gradio as gr from anything2image.api import Anything2Image anything2img = Anything2Image(imagebind_download_dir='checkpoints') with gr.Blocks() as demo: gr.HTML( """

Anything To Image

Generate image from anything with ImageBind's unified latent space and stable-diffusion-2-1-unclip.

https://github.com/Zeqiang-Lai/Anything2Image

""") gr.Interface(fn=anything2img, inputs=[gr.Text(placeholder="Enter a prompt in addition to the audio, image, text condition below", label="Prompt (Could be empty)"), "audio", "image", "text" ], outputs="image", examples=[['', 'assets/wav/dog_audio.wav', None, None], ['A painting', 'assets/wav/cat.wav', None, None], ['', 'assets/wav/wave.wav', 'assets/image/bird.png', None], ['', None, 'assets/image/bird_image.jpg', None], ['', None, None, 'A sunset over the ocean.'], ], cache_examples=True, ) demo.queue(1).launch()