From 47ee984278a120919af6bb541a2f15c0bfb69fb4 Mon Sep 17 00:00:00 2001 From: drunkplato <6413077+drunkplato@users.noreply.github.com> Date: Tue, 14 Jan 2025 20:10:34 +0000 Subject: [PATCH] remove logs --- .../MemedeckComfyNodes/nodes_preprocessing.py | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/custom_nodes/MemedeckComfyNodes/nodes_preprocessing.py b/custom_nodes/MemedeckComfyNodes/nodes_preprocessing.py index 65951adbf..314090456 100644 --- a/custom_nodes/MemedeckComfyNodes/nodes_preprocessing.py +++ b/custom_nodes/MemedeckComfyNodes/nodes_preprocessing.py @@ -113,10 +113,10 @@ class MD_ImageToMotionPrompt: ), "max_tokens": ("INT", {"min": 1, "max": 2048, "default": 200}), }, - # "optional": { - # "temperature": ("FLOAT", {"min": 0.0, "max": 1.0, "step": 0.01, "default": 0.2}), - # "top_p": ("FLOAT", {"min": 0.0, "max": 1.0, "step": 0.01, "default": 0.9}), - # } + "optional": { + "temperature": ("FLOAT", {"min": 0.0, "max": 1.0, "step": 0.01, "default": 0.2}), + "top_p": ("FLOAT", {"min": 0.0, "max": 1.0, "step": 0.01, "default": 0.7}), + } } @@ -127,9 +127,9 @@ class MD_ImageToMotionPrompt: def generate_completion( self, pre_prompt: str, post_prompt: str, Image: torch.Tensor, clip, prompt: str, negative_prompt: str, - # temperature: float, - # top_p: float, - max_tokens: int + temperature: float = 0.2, + top_p: float = 0.7, + max_tokens: int = 256 ) -> Tuple[str]: # start a timer start_time = time.time() @@ -139,8 +139,8 @@ class MD_ImageToMotionPrompt: response = requests.post("http://127.0.0.1:5010/inference", json={ "image_url": f"data:image/jpeg;base64,{b64image}", "prompt": prompt, - "temperature": 0.2, - "top_p": 0.7, + "temperature": temperature, + "top_p": top_p, "max_gen_len": max_tokens, }) if response.status_code != 200: @@ -339,7 +339,6 @@ class MD_CompressAdjustNode: image_cv2 = cv2.cvtColor(np.array(tensor2pil(image)), cv2.COLOR_RGB2BGR) # calculate the crf based on the image analysis_results = self.analyze_compression_artifacts(image_cv2, width=width, height=height) - logger.info(f"compression analysis_results: {analysis_results}") calculated_crf = self.calculate_crf(analysis_results, self.ideal_blockiness, self.ideal_edge_density, self.ideal_color_variation, self.blockiness_weight, self.edge_density_weight, self.color_variation_weight) @@ -347,8 +346,6 @@ class MD_CompressAdjustNode: if desired_crf is 0: desired_crf = calculated_crf - logger.info(f"calculated_crf: {calculated_crf}") - logger.info(f"desired_crf: {desired_crf}") args = [ utils.ffmpeg_path, "-v", "error",