CyberRealistic / app.py
jayparmr's picture
Create app.py
ff0e4c0
raw
history blame contribute delete
551 Bytes
import gradio as gr
import torch
from diffusers import DiffusionPipeline
# from diffusers import StableDiffusionPipeline
def generate(prompt):
# pipeline = DiffusionPipeline.from_pretrained("jayparmr/CyberRealistic", torch_dtype=torch.float16)
pipeline = DiffusionPipeline.from_pretrained("jayparmr/cyberrealistic", use_auth_token="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", torch_dtype=torch.float16)
pipeline.to("cuda")
return pipeline(prompt).images[0]
iface = gr.Interface(fn=generate, inputs="text", outputs="image")
iface.launch()