import gradio as gr | |
from diffusers import DiffusionPipeline | |
import torch | |
pipeline = DiffusionPipeline.from_pretrained("uripper/GIANNIS", revision="ONNX") | |
pipeline.to("cuda") | |
im = pipeline(height=1,width=1,num_channels=1, num_inference_steps=1).images[0] | |
im.show() | |
# When a user clicks button, pipeline will generate an image | |
# def pipeline_interface(): | |
# pipeline.to("cuda") | |
# return pipeline("height=100,width=100").images[0] | |
# iface = gr.Interface(fn=pipeline_interface, inputs=[], outputs="image") | |
# iface.launch() |