From e41cf1af42d092fe28d4efc3d1bcf49d4a2f768b Mon Sep 17 00:00:00 2001 From: Ean Garvey Date: Fri, 31 May 2024 14:30:25 -0500 Subject: [PATCH] Formatting --- apps/shark_studio/api/sd.py | 10 +++++++--- apps/shark_studio/web/utils/default_configs.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/shark_studio/api/sd.py b/apps/shark_studio/api/sd.py index d74e9d0a92..61f9b4591b 100644 --- a/apps/shark_studio/api/sd.py +++ b/apps/shark_studio/api/sd.py @@ -286,7 +286,7 @@ def shark_sd_fn_dict_input( if key == "seed": sd_kwargs[key] = int(sd_kwargs[key]) - #TODO: move these checks into the UI code so we don't have gradio warnings in a generalized dict input function. + # TODO: move these checks into the UI code so we don't have gradio warnings in a generalized dict input function. if sd_kwargs["device"] == "": gr.Warning("No device specified. Please specify a device.") return None, "" @@ -301,11 +301,15 @@ def shark_sd_fn_dict_input( gr.Warning("Max steps for sdxl-turbo is 10. 1 to 4 steps are recommended.") return None, "" if sd_kwargs["guidance_scale"] > 3: - gr.Warning("sdxl-turbo CFG scale should be less than 2.0 if using negative prompt, 0 otherwise.") + gr.Warning( + "sdxl-turbo CFG scale should be less than 2.0 if using negative prompt, 0 otherwise." + ) return None, "" if sd_kwargs["target_triple"] == "": if parse_device(sd_kwargs["device"], sd_kwargs["target_triple"])[2] == "": - gr.Warning("Target device architecture could not be inferred. Please specify a target triple, e.g. 'gfx1100' for a Radeon 7900xtx.") + gr.Warning( + "Target device architecture could not be inferred. Please specify a target triple, e.g. 'gfx1100' for a Radeon 7900xtx." + ) return None, "" generated_imgs = yield from shark_sd_fn(**sd_kwargs) diff --git a/apps/shark_studio/web/utils/default_configs.py b/apps/shark_studio/web/utils/default_configs.py index b52ba63fec..aef62e1b74 100644 --- a/apps/shark_studio/web/utils/default_configs.py +++ b/apps/shark_studio/web/utils/default_configs.py @@ -92,4 +92,4 @@ "default_sd_config.json": default_sd_config, "sdxl-30steps.json": sdxl_30steps, "sdxl-turbo.json": sdxl_turbo, -} \ No newline at end of file +}