Spaces:
Running
on
Zero
Running
on
Zero
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 |
from compel import Compel, ReturnedEmbeddingsType
|
8 |
|
9 |
import re
|
@@ -233,6 +233,7 @@ if torch.cuda.is_available():
|
|
233 |
use_safetensors=True,
|
234 |
add_watermarker=False
|
235 |
)
|
|
|
236 |
pipe.scheduler.register_to_config(
|
237 |
prediction_type="v_prediction",
|
238 |
rescale_betas_zero_snr=True,
|
@@ -311,7 +312,7 @@ with gr.Blocks(css=css) as demo:
|
|
311 |
prompt = gr.Text(
|
312 |
label="关键词",
|
313 |
show_label=False,
|
314 |
-
max_lines=
|
315 |
placeholder="输入你要的图片关键词",
|
316 |
container=False,
|
317 |
)
|
|
|
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
|
|
|
233 |
use_safetensors=True,
|
234 |
add_watermarker=False
|
235 |
)
|
236 |
+
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
|
237 |
pipe.scheduler.register_to_config(
|
238 |
prediction_type="v_prediction",
|
239 |
rescale_betas_zero_snr=True,
|
|
|
312 |
prompt = gr.Text(
|
313 |
label="关键词",
|
314 |
show_label=False,
|
315 |
+
max_lines=5,
|
316 |
placeholder="输入你要的图片关键词",
|
317 |
container=False,
|
318 |
)
|