zero emphasis disables node

This commit is contained in:
Tropfchen
2023-10-24 22:28:35 +02:00
parent 4d763f419b
commit 6887dd2237
+4 -2
View File
@@ -18,7 +18,7 @@ class EmbeddingPicker:
"FLOAT",
{
"default": 1.0,
"min": 0.05,
"min": 0.0,
"max": 3.0,
"step": 0.05,
},
@@ -39,7 +39,9 @@ class EmbeddingPicker:
CATEGORY = "utils"
def concat_embedding(self, text, embedding, emphasis, append):
emphasis = min(max(emphasis, 0.001), 3)
if emphasis < 0.05:
return (text,)
emb = "embedding:" + Path(embedding).stem
emphasis = f"{emphasis:.3f}"