from fastapi import FastAPI import gradio as gr import torch from diffusers import DiffusionPipeline import uvicorn from diffusers import AutoPipelineForImage2Image description = "Image generation with GPT-2" title = "IMAGE GENERATION MACHINE" pipeline = AutoPipelineForImage2Image.from_pretrained( "runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16, # use_safetensors=True, )#.to('cuda') gr.Interface.from_pipeline(pipeline) interface.launch(share = True)