Spaces:
Running
on
Zero
Running
on
Zero
Minor fix for ZeroGPU
#2
by
hysts
HF staff
- opened
app.py
CHANGED
@@ -56,6 +56,7 @@ pipe = load_evo_nishikie(device)
|
|
56 |
pipe.scheduler = EulerDiscreteScheduler.from_config(
|
57 |
pipe.scheduler.config, use_karras_sigmas=True,
|
58 |
)
|
|
|
59 |
# pipe.unet.to(memory_format=torch.channels_last)
|
60 |
# pipe.controlnet.to(memory_format=torch.channels_last)
|
61 |
# pipe.vae.to(memory_format=torch.channels_last)
|
@@ -84,8 +85,6 @@ def generate(
|
|
84 |
randomize_seed: bool = False,
|
85 |
progress=gr.Progress(track_tqdm=True),
|
86 |
):
|
87 |
-
pipe.to(device)
|
88 |
-
|
89 |
lineart_image = lineart_detector(input_image, coarse=False, image_resolution=1024)
|
90 |
lineart_image_filtered = lineart_image.filter(image_filter)
|
91 |
conditioning_image = lineart_image_filtered.point(lambda p: 255 if p > BINARY_THRESHOLD else 0).convert("L")
|
@@ -159,4 +158,4 @@ with gr.Blocks(css=css) as demo:
|
|
159 |
|
160 |
出典:サンプル画像はすべて[日本古典籍データセット(国文学研究資料館蔵)『絵本玉かつら』](http://codh.rois.ac.jp/pmjt/book/200013861/)から引用しました。""")
|
161 |
|
162 |
-
demo.queue().launch()
|
|
|
56 |
pipe.scheduler = EulerDiscreteScheduler.from_config(
|
57 |
pipe.scheduler.config, use_karras_sigmas=True,
|
58 |
)
|
59 |
+
pipe.to(device=device, dtype=torch.float16)
|
60 |
# pipe.unet.to(memory_format=torch.channels_last)
|
61 |
# pipe.controlnet.to(memory_format=torch.channels_last)
|
62 |
# pipe.vae.to(memory_format=torch.channels_last)
|
|
|
85 |
randomize_seed: bool = False,
|
86 |
progress=gr.Progress(track_tqdm=True),
|
87 |
):
|
|
|
|
|
88 |
lineart_image = lineart_detector(input_image, coarse=False, image_resolution=1024)
|
89 |
lineart_image_filtered = lineart_image.filter(image_filter)
|
90 |
conditioning_image = lineart_image_filtered.point(lambda p: 255 if p > BINARY_THRESHOLD else 0).convert("L")
|
|
|
158 |
|
159 |
出典:サンプル画像はすべて[日本古典籍データセット(国文学研究資料館蔵)『絵本玉かつら』](http://codh.rois.ac.jp/pmjt/book/200013861/)から引用しました。""")
|
160 |
|
161 |
+
demo.queue().launch()
|