mkrzyzan commited on
Commit
ce05317
β€’
1 Parent(s): d58ac58

diffusers added

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -1,5 +1,15 @@
1
  import gradio as gr
2
 
 
 
 
 
 
 
 
 
 
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
 
1
  import gradio as gr
2
 
3
+ from diffusers import AutoPipelineForText2Image
4
+ import torch
5
+
6
+ pipeline = AutoPipelineForText2Image.from_pretrained(
7
+ "runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16, use_safetensors=True
8
+ ).to("cuda")
9
+ prompt = "peasant and dragon combat, wood cutting style, viking era, bevel with rune"
10
+
11
+ image = pipeline(prompt, num_inference_steps=25).images[0]
12
+
13
  def greet(name):
14
  return "Hello " + name + "!!"
15