File size: 529 Bytes
4dcb901 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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() |