diff --git a/nodes.py b/nodes.py index 21f77cf..34d5ff8 100644 --- a/nodes.py +++ b/nodes.py @@ -164,10 +164,7 @@ def encode(self, image, text_input, florence2_model, task, fill_mask, keep_model if (task not in ['referring_expression_segmentation', 'caption_to_phrase_grounding', 'docvqa']) and text_input: raise ValueError("Text input (prompt) is only supported for 'referring_expression_segmentation', 'caption_to_phrase_grounding', and 'docvqa'") - if text_input != "": - prompt = task_prompt + " " + text_input - else: - prompt = task_prompt + prompt = f"{task_prompt}{text_input}" image = image.permute(0, 3, 1, 2)