Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
import numpy as np
|
4 |
import spaces
|
5 |
import torch
|
6 |
-
from diffusers import AutoPipelineForText2Image, AutoencoderKL
|
7 |
|
8 |
if not torch.cuda.is_available():
|
9 |
DESCRIPTION += "\n<p>你现在运行在CPU上 但是只支持GPU.</p>"
|
@@ -14,14 +14,13 @@ MAX_IMAGE_SIZE = 4096
|
|
14 |
if torch.cuda.is_available():
|
15 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
16 |
pipe = AutoPipelineForText2Image.from_pretrained(
|
17 |
-
"
|
18 |
vae=vae,
|
19 |
torch_dtype=torch.float16,
|
20 |
use_safetensors=True,
|
21 |
add_watermarker=False
|
22 |
)
|
23 |
-
|
24 |
-
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
|
25 |
pipe.to("cuda")
|
26 |
|
27 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
|
3 |
import numpy as np
|
4 |
import spaces
|
5 |
import torch
|
6 |
+
from diffusers import AutoPipelineForText2Image, AutoencoderKL #,EulerDiscreteScheduler
|
7 |
|
8 |
if not torch.cuda.is_available():
|
9 |
DESCRIPTION += "\n<p>你现在运行在CPU上 但是只支持GPU.</p>"
|
|
|
14 |
if torch.cuda.is_available():
|
15 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
16 |
pipe = AutoPipelineForText2Image.from_pretrained(
|
17 |
+
"John6666/noobai-xl-nai-xl-epsilonpred075version-sdxl",
|
18 |
vae=vae,
|
19 |
torch_dtype=torch.float16,
|
20 |
use_safetensors=True,
|
21 |
add_watermarker=False
|
22 |
)
|
23 |
+
#pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
|
|
|
24 |
pipe.to("cuda")
|
25 |
|
26 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|