Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Jan 5, 2025
1 parent 7509e80 commit cba0d88
Show file tree
Hide file tree
Showing 3 changed files with 2,085 additions and 1,821 deletions.
10 changes: 5 additions & 5 deletions discord_tron_client/classes/image_manipulation/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,27 +391,27 @@ def get_pipe(
if config.enable_compile() and hasattr(
self.pipelines[model_id], "unet"
):
torch._dynamo.config.suppress_errors = True
# torch._dynamo.config.suppress_errors = True
self.pipelines[model_id].unet = torch.compile(
self.pipelines[model_id].unet,
mode="reduce-overhead",
mode="max-autotune",
fullgraph=True,
)
if config.enable_compile() and hasattr(
self.pipelines[model_id], "transformer"
):
torch._dynamo.config.suppress_errors = True
# torch._dynamo.config.suppress_errors = True
self.pipelines[model_id].transformer = torch.compile(
self.pipelines[model_id].transformer,
mode="reduce-overhead",
mode="max-autotune",
fullgraph=True,
)
if (
hasattr(self.pipelines[model_id], "controlnet")
and config.enable_compile()
):
self.pipelines[model_id].controlnet = torch.compile(
self.pipelines[model_id].controlnet, fullgraph=True
self.pipelines[model_id].controlnet, mode="max-autotune", fullgraph=True
)
else:
logger.info(f"Keeping existing pipeline. Not creating any new ones.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __call__(self, **args):
if "skip_layer_guidance_end" in args:
args["skip_layer_guidance_end"] = float(args["skip_layer_guidance_end"])
if "skip_layer_guidance_scale" in args:
args["skip_layer_guidance_end"] = float(args["skip_layer_guidance_scale"])
args["skip_layer_guidance_scale"] = float(args["skip_layer_guidance_scale"])
if "skip_guidance_layers" in args and type(args["skip_guidance_layers"]) == str:
if args["skip_guidance_layers"].lower() == "none":
args["skip_guidance_layers"] = None
Expand Down
Loading

0 comments on commit cba0d88

Please sign in to comment.