Spaces:
Paused
Paused
Upload app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,8 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
14 |
|
15 |
taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
|
16 |
good_vae = AutoencoderKL.from_pretrained(model_id, subfolder="vae", torch_dtype=dtype).to(device)
|
17 |
-
pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=dtype, vae=taef1).to(device)
|
|
|
18 |
torch.cuda.empty_cache()
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|
@@ -76,7 +77,7 @@ with gr.Blocks(css=css) as demo:
|
|
76 |
|
77 |
result = gr.Image(label="Result", show_label=False)
|
78 |
|
79 |
-
with gr.Accordion("Advanced Settings", open=
|
80 |
sigmas = gr.Slider(
|
81 |
label="Sigmas",
|
82 |
minimum=0,
|
@@ -90,12 +91,13 @@ with gr.Blocks(css=css) as demo:
|
|
90 |
minimum=0,
|
91 |
maximum=MAX_SEED,
|
92 |
step=1,
|
93 |
-
value=
|
94 |
)
|
95 |
|
96 |
-
randomize_seed = gr.Checkbox(label="Randomize seed", value=
|
97 |
|
98 |
with gr.Row():
|
|
|
99 |
width = gr.Slider(
|
100 |
label="Width",
|
101 |
minimum=256,
|
|
|
14 |
|
15 |
taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
|
16 |
good_vae = AutoencoderKL.from_pretrained(model_id, subfolder="vae", torch_dtype=dtype).to(device)
|
17 |
+
#pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=dtype, vae=taef1).to(device)
|
18 |
+
pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=dtype, vae=good_vae).to(device)
|
19 |
torch.cuda.empty_cache()
|
20 |
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
77 |
|
78 |
result = gr.Image(label="Result", show_label=False)
|
79 |
|
80 |
+
with gr.Accordion("Advanced Settings", open=True):
|
81 |
sigmas = gr.Slider(
|
82 |
label="Sigmas",
|
83 |
minimum=0,
|
|
|
91 |
minimum=0,
|
92 |
maximum=MAX_SEED,
|
93 |
step=1,
|
94 |
+
value=42,
|
95 |
)
|
96 |
|
97 |
+
randomize_seed = gr.Checkbox(label="Randomize seed", value=False)
|
98 |
|
99 |
with gr.Row():
|
100 |
+
|
101 |
width = gr.Slider(
|
102 |
label="Width",
|
103 |
minimum=256,
|