Spaces:
Sleeping
Sleeping
File size: 427 Bytes
72137e7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import gradio as gr
from diffusers import StableDiffusionPipeline
import torch
model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
def notation_2_note(input_text):
image = pipe(input_text).images[0]
return image
demo = gr.Interface(notation_2_note, "text", gr.Image())
demo.launch()
# No. Too much memory required |