import gradio as gr from diffusers import PNDMPipeline, PNDMScheduler scheduler = PNDMScheduler(num_train_timesteps=1100) pipeline = PNDMPipeline.from_pretrained("uripper/GIANNIS", scheduler=scheduler) def generate_img(): try: pipeline.to("cuda") except: pass images= pipeline().images im = images[0] return im iface = gr.Interface(fn=generate_img, inputs=[], outputs="image") iface.launch()