Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,38 +1,3 @@
|
|
1 |
-
import
|
2 |
-
from diffusers import (
|
3 |
-
StableDiffusionXLPipeline,
|
4 |
-
KDPM2AncestralDiscreteScheduler,
|
5 |
-
AutoencoderKL
|
6 |
-
)
|
7 |
|
8 |
-
|
9 |
-
vae = AutoencoderKL.from_pretrained(
|
10 |
-
"madebyollin/sdxl-vae-fp16-fix",
|
11 |
-
torch_dtype=torch.float16
|
12 |
-
)
|
13 |
-
|
14 |
-
# Configure the pipeline
|
15 |
-
pipe = StableDiffusionXLPipeline.from_pretrained(
|
16 |
-
"Corcelio/mobius",
|
17 |
-
vae=vae,
|
18 |
-
torch_dtype=torch.float16
|
19 |
-
)
|
20 |
-
pipe.scheduler = KDPM2AncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
21 |
-
pipe.to('cuda')
|
22 |
-
|
23 |
-
# Define prompts and generate image
|
24 |
-
prompt = "mystery"
|
25 |
-
negative_prompt = ""
|
26 |
-
|
27 |
-
image = pipe(
|
28 |
-
prompt,
|
29 |
-
negative_prompt=negative_prompt,
|
30 |
-
width=1024,
|
31 |
-
height=1024,
|
32 |
-
guidance_scale=7,
|
33 |
-
num_inference_steps=50,
|
34 |
-
clip_skip=3
|
35 |
-
).images[0]
|
36 |
-
|
37 |
-
|
38 |
-
image.save("generated_image.png")
|
|
|
1 |
+
from diffusers import DiffusionPipeline
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
pipeline = DiffusionPipeline.from_pretrained("Corcelio/mobius")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|