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
|
7 |
from compel import Compel, ReturnedEmbeddingsType
|
8 |
|
9 |
import re
|
@@ -226,11 +226,11 @@ MAX_IMAGE_SIZE = 4096
|
|
226 |
|
227 |
if torch.cuda.is_available():
|
228 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
229 |
-
pipe =
|
230 |
-
"
|
231 |
vae=vae,
|
232 |
-
use_safetensors=True,
|
233 |
torch_dtype=torch.float16,
|
|
|
234 |
add_watermarker=False
|
235 |
)
|
236 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
|
@@ -356,9 +356,9 @@ with gr.Blocks(css=css) as demo:
|
|
356 |
guidance_scale = gr.Slider(
|
357 |
label="Guidance Scale",
|
358 |
minimum=0.1,
|
359 |
-
maximum=
|
360 |
step=0.1,
|
361 |
-
value=
|
362 |
)
|
363 |
num_inference_steps = gr.Slider(
|
364 |
label="生成步数",
|
|
|
3 |
import numpy as np
|
4 |
import spaces
|
5 |
import torch
|
6 |
+
from diffusers import AutoPipelineForText2Image, AutoencoderKL, EulerDiscreteScheduler
|
7 |
from compel import Compel, ReturnedEmbeddingsType
|
8 |
|
9 |
import re
|
|
|
226 |
|
227 |
if torch.cuda.is_available():
|
228 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
229 |
+
pipe = AutoPipelineForText2Image.from_pretrained(
|
230 |
+
"Menyu/noobai-xl-vpred-v0_6",
|
231 |
vae=vae,
|
|
|
232 |
torch_dtype=torch.float16,
|
233 |
+
use_safetensors=True,
|
234 |
add_watermarker=False
|
235 |
)
|
236 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
|
|
|
356 |
guidance_scale = gr.Slider(
|
357 |
label="Guidance Scale",
|
358 |
minimum=0.1,
|
359 |
+
maximum=8,
|
360 |
step=0.1,
|
361 |
+
value=3.0,
|
362 |
)
|
363 |
num_inference_steps = gr.Slider(
|
364 |
label="生成步数",
|