CasualCodes
added diff.py (warning: too much memory from dependencies)
72137e7
raw
history blame contribute delete
427 Bytes
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