Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion comfy_extras/nodes_load_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def INPUT_TYPES(s):

os.makedirs(input_dir, exist_ok=True)

files = [normalize_path(os.path.join("3d", f)) for f in os.listdir(input_dir) if f.endswith(('.gltf', '.glb', '.obj', '.mtl', '.fbx', '.stl'))]
files = [normalize_path(os.path.join("3d", f)) for f in os.listdir(input_dir) if f.endswith(('.gltf', '.glb', '.obj', '.fbx', '.stl'))]

return {"required": {
"model_file": (sorted(files), {"file_upload": True}),
Expand Down
10 changes: 8 additions & 2 deletions node_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@

from PIL import ImageFile, UnidentifiedImageError

def conditioning_set_values(conditioning, values={}):
def conditioning_set_values(conditioning, values={}, append=False):
c = []
for t in conditioning:
n = [t[0], t[1].copy()]
for k in values:
n[1][k] = values[k]
val = values[k]
if append:
old_val = n[1].get(k, None)
if old_val is not None:
val = old_val + val

n[1][k] = val
c.append(n)

return c
Expand Down
11 changes: 1 addition & 10 deletions nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,16 +1103,7 @@ def apply_adm(self, conditioning, clip_vision_output, strength, noise_augmentati
if strength == 0:
return (conditioning, )

c = []
for t in conditioning:
o = t[1].copy()
x = {"clip_vision_output": clip_vision_output, "strength": strength, "noise_augmentation": noise_augmentation}
if "unclip_conditioning" in o:
o["unclip_conditioning"] = o["unclip_conditioning"][:] + [x]
else:
o["unclip_conditioning"] = [x]
n = [t[0], o]
c.append(n)
c = node_helpers.conditioning_set_values(conditioning, {"unclip_conditioning": [{"clip_vision_output": clip_vision_output, "strength": strength, "noise_augmentation": noise_augmentation}]}, append=True)
return (c, )

class GLIGENLoader:
Expand Down
Loading