Widgets
This commit is contained in:
@@ -20,6 +20,10 @@ UE? nodes are like UE Nodes, but add two widgets, 'title' and 'input'. These are
|
||||
|
||||
A special case of UE? - Seed Everywhere connects to any unconnected INT input with 'seed' in the input name. So you can use the same seed everywhere.
|
||||
|
||||
## Widget?
|
||||
|
||||
A UE or UE? node with just one output can have the output converted to a widget. But the combination ones can't.
|
||||
|
||||
## Caution
|
||||
|
||||
It's possible to create a loop with UE, and that currently isn't detected. If you get a RecursionError that's probably what you've done. Remember, *every* unconnected input gets connected to the UE output, even optional ones...
|
||||
|
||||
@@ -7,6 +7,7 @@ types = {
|
||||
"LATENT" : ("LATENT", ),
|
||||
"IMAGE" : ("IMAGE",),
|
||||
"CONDITIONING" : ("CONDITIONING",),
|
||||
"INT" : ("INT",),
|
||||
"CHECKPOINT" : ("MODEL", "CLIP", "VAE"),
|
||||
}
|
||||
|
||||
|
||||
+34
-16
@@ -11,27 +11,45 @@ app.registerExtension({
|
||||
var use_everywheres = [];
|
||||
nodes.forEach(node => {
|
||||
if (node.type.startsWith('UE ')) {
|
||||
for (var i=0; i<node.inputs.length; i++) {
|
||||
if (node.inputs[i].link != null) {
|
||||
use_everywheres.splice(0,0,{
|
||||
type : node.inputs[i].type,
|
||||
title : always,
|
||||
input : always,
|
||||
output : [node.id.toString(),i],
|
||||
})
|
||||
if (node.inputs) {
|
||||
for (var i=0; i<node.inputs.length; i++) {
|
||||
if (node.inputs[i].link != null) {
|
||||
use_everywheres.splice(0,0,{
|
||||
type : node.inputs[i].type,
|
||||
title : always,
|
||||
input : always,
|
||||
output : [node.id.toString(),i],
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
use_everywheres.splice(0,0,{
|
||||
type : node.type.substring(3),
|
||||
title : always,
|
||||
input : always,
|
||||
output : [node.id.toString(),0],
|
||||
})
|
||||
}
|
||||
}
|
||||
if (node.type.startsWith('UE? ')) {
|
||||
for (var i=0; i<node.inputs.length; i++) {
|
||||
if (node.inputs[i].link != null) {
|
||||
use_everywheres.splice(0,0,{
|
||||
type : node.inputs[i].type,
|
||||
title : new RegExp(node.widgets_values[0]),
|
||||
input : new RegExp(node.widgets_values[1]),
|
||||
output : [node.id.toString(),i],
|
||||
})
|
||||
if (node.inputs) {
|
||||
for (var i=0; i<node.inputs.length; i++) {
|
||||
if (node.inputs[i].link != null) {
|
||||
use_everywheres.splice(0,0,{
|
||||
type : node.inputs[i].type,
|
||||
title : new RegExp(node.widgets_values[0]),
|
||||
input : new RegExp(node.widgets_values[1]),
|
||||
output : [node.id.toString(),i],
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
use_everywheres.splice(0,0,{
|
||||
type : node.type.substring(4),
|
||||
title : new RegExp(node.widgets_values[1]),
|
||||
input : new RegExp(node.widgets_values[2]),
|
||||
output : [node.id.toString(),0],
|
||||
})
|
||||
}
|
||||
}
|
||||
if (node.type === "Seed Everywhere") {
|
||||
|
||||
Reference in New Issue
Block a user