CoolFace
Apppublic

CasualTomes/CloudDeploymentTest

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
diff.py17 linesDownload Raw Back to root
1import gradio as gr2 3from diffusers import StableDiffusionPipeline4import torch5 6model_id = "runwayml/stable-diffusion-v1-5"7pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)8pipe = pipe.to("cuda")9 10def notation_2_note(input_text):11    image = pipe(input_text).images[0]  12    return image13 14demo = gr.Interface(notation_2_note, "text", gr.Image())15demo.launch()16 17# No. Too much memory required