This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ from .image_filter import ImageFilter, MaskImageFilter, TextImageFilterWithExtra
|
||||
from .list_utility_nodes import PickFromList, BatchFromImageList, ImageListFromBatch
|
||||
from .string_utility_nodes import SplitByCommas, StringToFloat, StringToInt
|
||||
|
||||
VERSION = "1.4.1"
|
||||
VERSION = "1.4.2"
|
||||
WEB_DIRECTORY = "./js"
|
||||
|
||||
NODE_CLASS_MAPPINGS= {
|
||||
|
||||
+2
-3
@@ -66,11 +66,10 @@ app.registerExtension({
|
||||
this.outputs[0].type = type
|
||||
this.inputs[0].type = type
|
||||
}
|
||||
return onConnectionsChange ? onConnectionsChange.apply(this, arguments) : undefined;
|
||||
}
|
||||
}
|
||||
if (FILTER_TYPES.includes(nodeType.comfyClass )) {
|
||||
nodeType.prototype.choose_id = function() { this._ni_widget.value = Math.floor(Math.random() * 1000000) }
|
||||
|
||||
const onNodeCreated = nodeType.prototype.onNodeCreated;
|
||||
nodeType.prototype.onNodeCreated = function () {
|
||||
this._ni_widget = this.widgets.find((n)=>n.name=='node_identifier')
|
||||
@@ -79,8 +78,8 @@ app.registerExtension({
|
||||
}
|
||||
this._ni_widget.hidden = true
|
||||
this._ni_widget.computeSize = () => [0,0]
|
||||
this._ni_widget.value = Math.floor(Math.random() * 1000000)
|
||||
|
||||
this.choose_id()
|
||||
return onNodeCreated ? onNodeCreated.apply(this, arguments) : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,6 @@ class Popup extends HTMLSpanElement {
|
||||
|
||||
close() {
|
||||
this.state = State.INACTIVE
|
||||
this.node.choose_id()
|
||||
State.render(this)
|
||||
}
|
||||
|
||||
|
||||
+3
-12
@@ -1,14 +1,5 @@
|
||||
import torch
|
||||
from json import JSONEncoder
|
||||
|
||||
def _default(self, obj): return getattr(obj.__class__, "to_json", _default.default)(obj)
|
||||
_default.default = JSONEncoder().default
|
||||
JSONEncoder.default = _default
|
||||
|
||||
class AlwaysEqual:
|
||||
def to_json(self): return "*"
|
||||
def __ne__(self, __value: object) -> bool: return False
|
||||
def __eq__(self, __value: object) -> bool: return True
|
||||
from comfy.comfy_types.node_typing import IO
|
||||
|
||||
class BatchFromImageList:
|
||||
@classmethod
|
||||
@@ -47,11 +38,11 @@ class PickFromList:
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"anything" : (AlwaysEqual(), ),
|
||||
"anything" : (IO.ANY, ),
|
||||
"indexes": ("STRING", {"default": ""})
|
||||
},
|
||||
}
|
||||
RETURN_TYPES = (AlwaysEqual(),)
|
||||
RETURN_TYPES = (IO.ANY,)
|
||||
RETURN_NAMES = ("picks",)
|
||||
|
||||
FUNCTION = "func"
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "cg-image-filter"
|
||||
description = "A set of custom nodes that pause a workflow while you select images, add masks, or edit text."
|
||||
version = "1.4.1"
|
||||
version = "1.4.2"
|
||||
license = { file = "LICENSE" }
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user