Skip to content

Commit

Permalink
add reference
Browse files Browse the repository at this point in the history
  • Loading branch information
radames committed Nov 8, 2023
1 parent 1af368e commit e31d3e1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app-controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
truncate_long_prompts=False,
)
if TORCH_COMPILE:
pipe.unet = torch.compile(pipe.unet, mode="max-autotune", fullgraph=False)
pipe.vae = torch.compile(pipe.vae, mode="max-autotune", fullgraph=False)
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
pipe.vae = torch.compile(pipe.vae, mode="reduce-overhead", fullgraph=True)

pipe(prompt="warmup", image=[Image.new("RGB", (768, 768))], control_image=[Image.new("RGB", (768, 768))])

Expand Down
4 changes: 2 additions & 2 deletions app-img2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
pipe.enable_attention_slicing()

if TORCH_COMPILE:
pipe.unet = torch.compile(pipe.unet, mode="max-autotune", fullgraph=False)
pipe.vae = torch.compile(pipe.vae, mode="max-autotune", fullgraph=False)
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
pipe.vae = torch.compile(pipe.vae, mode="reduce-overhead", fullgraph=True)

pipe(prompt="warmup", image=[Image.new("RGB", (512, 512))])

Expand Down
4 changes: 2 additions & 2 deletions app-txt2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
pipe.enable_attention_slicing()

if TORCH_COMPILE:
pipe.unet = torch.compile(pipe.unet, mode="max-autotune", fullgraph=False)
pipe.vae = torch.compile(pipe.vae, mode="max-autotune", fullgraph=False)
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
pipe.vae = torch.compile(pipe.vae, mode="reduce-overhead", fullgraph=True)

pipe(prompt="warmup", num_inference_steps=1, guidance_scale=8.0)

Expand Down
1 change: 1 addition & 0 deletions latent_consistency_controlnet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# from https://github.com/taabata/LCM_Inpaint_Outpaint_Comfy/blob/main/LCM/pipeline_cn.py
# Copyright 2023 Stanford University Team and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down

0 comments on commit e31d3e1

Please sign in to comment.