Spaces:
Runtime error
Runtime error
diffusers added
Browse files
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 |
|