diff --git a/exllama.py b/exllama.py index 9ba7200..167e02e 100644 --- a/exllama.py +++ b/exllama.py @@ -260,7 +260,6 @@ class Generator: "seed": ("INT", {"max": 2**64 - 1}), }, "optional": {"settings": ("EXL_SETTINGS",)}, - "hidden": {"info": "EXTRA_PNGINFO", "id": "UNIQUE_ID"}, } CATEGORY = _CATEGORY @@ -277,8 +276,6 @@ class Generator: max_tokens, seed, settings=None, - info=None, - id=None, ): if unload: unload_all_models() @@ -324,7 +321,7 @@ class Generator: progress.update(1) count += 1 - output = "".join(chunks).strip() + output = "".join(chunks) total = round(time() - start, 2) speed = round(count / total, 2) @@ -336,13 +333,6 @@ class Generator: if unload: model.unload() - if id and info and "workflow" in info: - nodes = info["workflow"]["nodes"] - node = next((n for n in nodes if str(n["id"]) == id), None) - - if node: - node["widgets_values"] = [output] - return (output,) diff --git a/text.py b/text.py index 7592cb3..e47400f 100644 --- a/text.py +++ b/text.py @@ -10,8 +10,8 @@ class Convert: return { "required": { "text": ("STRING", {"forceInput": True}), - "strip": (("punctuation", "whitespace", "both", False),), - "case": (("lower", "upper", "capitalize", False),), + "strip": (("punctuation", "whitespace", "both", "none"),), + "case": (("lower", "upper", "capitalize", "title", "none"),), }, } @@ -23,9 +23,13 @@ class Convert: def convert(self, text, strip, case): if strip == "both": text = text.strip(string.punctuation + string.whitespace) - elif strip: + text = " ".join(text.split()).strip() + elif strip != "none": text = text.strip(getattr(string, strip)) - if case: + + if case == "title": + text = string.capwords(text) + elif case != "none": text = getattr(text, case)() return (text,)