From 034c903e31225b8e5487ac45b38f2cb86cf12e3d Mon Sep 17 00:00:00 2001 From: "DESKTOP-CNFQ7PM\\Primere" Date: Mon, 21 Oct 2024 12:35:35 +0200 Subject: [PATCH] V 1.0.0 - Auto concept KOLORS clean --- Nodes/Dashboard.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Nodes/Dashboard.py b/Nodes/Dashboard.py index 7d0753a..0799c40 100644 --- a/Nodes/Dashboard.py +++ b/Nodes/Dashboard.py @@ -1651,6 +1651,10 @@ class PrimereCLIP: tokenizer = clip['tokenizer'] text_encoder = clip['text_encoder'] text_encoder.to(device) + + positive_text = utility.clear_cascade(positive_text) + negative_text = utility.clear_cascade(negative_text) + text_inputs = tokenizer(positive_text, padding="max_length", max_length=256, truncation=True, return_tensors="pt",).to(device) output = text_encoder(input_ids=text_inputs['input_ids'], attention_mask=text_inputs['attention_mask'], position_ids=text_inputs['position_ids'], output_hidden_states=True) prompt_embeds = output.hidden_states[-2].permute(1, 0, 2).clone() # [batch_size, 77, 4096]