Spaces:
Runtime error
Runtime error
nroggendorff
commited on
Commit
β’
43352bf
1
Parent(s):
8037ea1
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,11 @@ import spaces
|
|
4 |
import torch
|
5 |
from diffusers import StableDiffusionXLPipeline
|
6 |
|
7 |
-
pipeline = StableDiffusionXLPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0")
|
8 |
pipeline.load_lora_weights("nroggendorff/zelda-lora")
|
9 |
|
|
|
|
|
10 |
@spaces.GPU
|
11 |
def generate(prompt, negative_prompt, width, height, sample_steps):
|
12 |
return pipeline(prompt=prompt, negative_prompt=negative_prompt, width=width, height=height, num_inference_steps=sample_steps).images[0]
|
|
|
4 |
import torch
|
5 |
from diffusers import StableDiffusionXLPipeline
|
6 |
|
7 |
+
pipeline = StableDiffusionXLPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0")
|
8 |
pipeline.load_lora_weights("nroggendorff/zelda-lora")
|
9 |
|
10 |
+
pipeline.to("cuda")
|
11 |
+
|
12 |
@spaces.GPU
|
13 |
def generate(prompt, negative_prompt, width, height, sample_steps):
|
14 |
return pipeline(prompt=prompt, negative_prompt=negative_prompt, width=width, height=height, num_inference_steps=sample_steps).images[0]
|