Merge branch 'fix-embedding-replacement' of https://github.com/pythongosssss/ComfyUI

This commit is contained in:
comfyanonymous 2023-04-15 11:02:47 -04:00
commit 04b14bc59e

View File

@ -131,6 +131,7 @@ export async function importA1111(graph, parameters) {
}
function replaceEmbeddings(text) {
if(!embeddings.length) return text;
return text.replaceAll(
new RegExp(
"\\b(" + embeddings.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("\\b|\\b") + ")\\b",