Add gpu split, add 8bit cache toggle,
add min_p, encode specal tokens, update requirements versions
This commit is contained in:
@@ -2,27 +2,23 @@ import { app } from "../../../scripts/app.js";
|
||||
import { ComfyWidgets } from "../../../scripts/widgets.js";
|
||||
|
||||
app.registerExtension({
|
||||
name: "ZuellniTextPreview",
|
||||
name: "ZuellniText",
|
||||
async beforeRegisterNodeDef(nodeType, nodeData, app) {
|
||||
if (nodeData.name === "ZuellniTextPreview") {
|
||||
const onExecuted = nodeType.prototype.onExecuted;
|
||||
|
||||
nodeType.prototype.onExecuted = function (message) {
|
||||
onExecuted?.apply(this, arguments);
|
||||
|
||||
nodeType.prototype.onExecuted = function(message) {
|
||||
if (this.widgets) {
|
||||
const position = this.widgets.findIndex((w) => w.name === "text");
|
||||
const index = this.widgets.findIndex((w) => w.name === "output");
|
||||
|
||||
if (position !== -1) {
|
||||
for (let i = position; i < this.widgets.length; i++)
|
||||
if (index !== -1) {
|
||||
for (let i = index; i < this.widgets.length; i++)
|
||||
this.widgets[i].onRemove?.();
|
||||
|
||||
this.widgets.length = position;
|
||||
this.widgets.length = index;
|
||||
}
|
||||
|
||||
const type = ["STRING", { multiline: true }];
|
||||
const widget = ComfyWidgets["STRING"](this, "text", type, app).widget;
|
||||
|
||||
this.widgets.length = 1;
|
||||
const options = ["STRING", {multiline: true }]
|
||||
const widget = ComfyWidgets["STRING"](this, "output", options, app).widget;
|
||||
widget.inputEl.readOnly = true;
|
||||
widget.inputEl.style.opacity = 0.7;
|
||||
widget.value = message.text;
|
||||
|
||||
Reference in New Issue
Block a user