From ac96f187bdba659540b12ca361779287e05efd50 Mon Sep 17 00:00:00 2001 From: Ryan Dick Date: Wed, 21 Aug 2024 18:10:24 +0000 Subject: [PATCH] Remove duplicate log_time(...) function. --- .../quantization/load_flux_model_bnb_llm_int8.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/invokeai/backend/quantization/load_flux_model_bnb_llm_int8.py b/invokeai/backend/quantization/load_flux_model_bnb_llm_int8.py index 876f299add..a24370967c 100644 --- a/invokeai/backend/quantization/load_flux_model_bnb_llm_int8.py +++ b/invokeai/backend/quantization/load_flux_model_bnb_llm_int8.py @@ -1,5 +1,3 @@ -import time -from contextlib import contextmanager from pathlib import Path import accelerate @@ -7,17 +5,7 @@ from diffusers.models.transformers.transformer_flux import FluxTransformer2DMode from safetensors.torch import load_file, save_file from invokeai.backend.quantization.bnb_llm_int8 import quantize_model_llm_int8 - - -@contextmanager -def log_time(name: str): - """Helper context manager to log the time taken by a block of code.""" - start = time.time() - try: - yield None - finally: - end = time.time() - print(f"'{name}' took {end - start:.4f} secs") +from invokeai.backend.quantization.load_flux_model_bnb_nf4 import log_time def main():