Remove character image analysis flow
This commit is contained in:
+2
-24
@@ -11350,31 +11350,9 @@ const APPENDED_WIDGET_DEFAULTS = [
|
||||
["segment_lengths", ""],
|
||||
];
|
||||
|
||||
app.registerExtension({
|
||||
app.registerExtension({
|
||||
name: "LTXDirectorCS",
|
||||
async setup() {
|
||||
// On Run, ask Ollama to release the analysis model from VRAM so it doesn't
|
||||
// compete with LTX generation. Fully tolerant: failures are swallowed.
|
||||
if (app._ltxDirectorUnloadHookInstalled) return;
|
||||
app._ltxDirectorUnloadHookInstalled = true;
|
||||
const origQueuePrompt = app.queuePrompt;
|
||||
app.queuePrompt = async function (...args) {
|
||||
try {
|
||||
const nodes = app.graph?._nodes || [];
|
||||
const director = nodes.find(n => n && (n.comfyClass === "LTXDirectorCS" || n.type === "LTXDirectorCS"));
|
||||
if (director) {
|
||||
try {
|
||||
await api.fetchApi("/ltx_director/unload_ollama", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ provider: "ollama" }),
|
||||
});
|
||||
} catch (e) {}
|
||||
}
|
||||
} catch (e) {}
|
||||
return origQueuePrompt.apply(this, args);
|
||||
};
|
||||
},
|
||||
async beforeRegisterNodeDef(nodeType, nodeData, app) {
|
||||
async beforeRegisterNodeDef(nodeType, nodeData, app) {
|
||||
if (nodeData.name === "LTXDirectorCS") {
|
||||
|
||||
const onNodeCreated = nodeType.prototype.onNodeCreated;
|
||||
|
||||
Reference in New Issue
Block a user