From 7830ec7ca2b9d4715cd9d2cd9238d2d40f07d619 Mon Sep 17 00:00:00 2001 From: Olivia Godone-Maresca Date: Sun, 28 May 2023 14:39:36 -0400 Subject: [PATCH] Fix SyntaxWarning on startup Fixes ``` /ssd2/easydiffusion/ui/easydiffusion/utils/save_utils.py:222: SyntaxWarning: "is not" with a literal. Did you mean "!="? if task_data.use_upscale is not "latent_upscaler" and "latent_upscaler_steps" in metadata: ``` --- ui/easydiffusion/utils/save_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/easydiffusion/utils/save_utils.py b/ui/easydiffusion/utils/save_utils.py index 6a6f7239..ff2906a6 100644 --- a/ui/easydiffusion/utils/save_utils.py +++ b/ui/easydiffusion/utils/save_utils.py @@ -219,7 +219,7 @@ def get_printable_request(req: GenerateImageRequest, task_data: TaskData): del metadata["hypernetwork_strength"] if task_data.use_lora_model is None and "lora_alpha" in metadata: del metadata["lora_alpha"] - if task_data.use_upscale is not "latent_upscaler" and "latent_upscaler_steps" in metadata: + if task_data.use_upscale != "latent_upscaler" and "latent_upscaler_steps" in metadata: del metadata["latent_upscaler_steps"] app_config = app.getConfig()