From 8062866973f81f8f79562279fe91daa8b2589bbc Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 2 Aug 2024 22:35:02 +0200 Subject: [PATCH] chore: format --- backend/apps/images/main.py | 1 + backend/apps/images/utils/comfyui.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/apps/images/main.py b/backend/apps/images/main.py index 75df5f60c..4239f3f45 100644 --- a/backend/apps/images/main.py +++ b/backend/apps/images/main.py @@ -92,6 +92,7 @@ app.state.config.COMFYUI_FLUX = COMFYUI_FLUX app.state.config.COMFYUI_FLUX_WEIGHT_DTYPE = COMFYUI_FLUX_WEIGHT_DTYPE app.state.config.COMFYUI_FLUX_FP8_CLIP = COMFYUI_FLUX_FP8_CLIP + def get_automatic1111_api_auth(): if app.state.config.AUTOMATIC1111_API_AUTH == None: return "" diff --git a/backend/apps/images/utils/comfyui.py b/backend/apps/images/utils/comfyui.py index 22ab8aeef..6c37f0c49 100644 --- a/backend/apps/images/utils/comfyui.py +++ b/backend/apps/images/utils/comfyui.py @@ -375,9 +375,11 @@ def comfyui_generate_image( if payload.flux_weight_dtype: comfyui_prompt["12"]["inputs"]["weight_dtype"] = payload.flux_weight_dtype - + if payload.flux_fp8_clip: - comfyui_prompt["11"]["inputs"]["clip_name2"] = "t5xxl_fp8_e4m3fn.safetensors" + comfyui_prompt["11"]["inputs"][ + "clip_name2" + ] = "t5xxl_fp8_e4m3fn.safetensors" comfyui_prompt["5"]["inputs"]["batch_size"] = payload.n comfyui_prompt["5"]["inputs"]["width"] = payload.width