Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,10 +42,9 @@ pipe = StableDiffusionXLControlNetImg2ImgPipeline.from_pretrained(
|
|
42 |
use_safetensors=True,
|
43 |
scheduler=scheduler,
|
44 |
)
|
45 |
-
pipe.enable_xformers_memory_efficient_attention()
|
46 |
# pipe.enable_model_cpu_offload()
|
47 |
pipe.enable_vae_tiling()
|
48 |
-
apply_hidiffusion(pipe)
|
49 |
|
50 |
compel = Compel(
|
51 |
tokenizer=[pipe.tokenizer, pipe.tokenizer_2],
|
@@ -88,6 +87,7 @@ def predict(
|
|
88 |
controlnet_end=1.0,
|
89 |
progress=gr.Progress(track_tqdm=True),
|
90 |
):
|
|
|
91 |
if input_image is None:
|
92 |
raise gr.Error("Please upload an image.")
|
93 |
padded_image = pad_image(input_image).resize((1024, 1024)).convert("RGB")
|
|
|
42 |
use_safetensors=True,
|
43 |
scheduler=scheduler,
|
44 |
)
|
45 |
+
# pipe.enable_xformers_memory_efficient_attention()
|
46 |
# pipe.enable_model_cpu_offload()
|
47 |
pipe.enable_vae_tiling()
|
|
|
48 |
|
49 |
compel = Compel(
|
50 |
tokenizer=[pipe.tokenizer, pipe.tokenizer_2],
|
|
|
87 |
controlnet_end=1.0,
|
88 |
progress=gr.Progress(track_tqdm=True),
|
89 |
):
|
90 |
+
apply_hidiffusion(pipe)
|
91 |
if input_image is None:
|
92 |
raise gr.Error("Please upload an image.")
|
93 |
padded_image = pad_image(input_image).resize((1024, 1024)).convert("RGB")
|