mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-24 21:30:15 +08:00
Merge branch 'comfyanonymous:master' into master
This commit is contained in:
commit
bf94f31441
@ -16,7 +16,7 @@ class Load3D():
|
|||||||
|
|
||||||
os.makedirs(input_dir, exist_ok=True)
|
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": {
|
return {"required": {
|
||||||
"model_file": (sorted(files), {"file_upload": True}),
|
"model_file": (sorted(files), {"file_upload": True}),
|
||||||
|
|||||||
@ -5,12 +5,18 @@ from comfy.cli_args import args
|
|||||||
|
|
||||||
from PIL import ImageFile, UnidentifiedImageError
|
from PIL import ImageFile, UnidentifiedImageError
|
||||||
|
|
||||||
def conditioning_set_values(conditioning, values={}):
|
def conditioning_set_values(conditioning, values={}, append=False):
|
||||||
c = []
|
c = []
|
||||||
for t in conditioning:
|
for t in conditioning:
|
||||||
n = [t[0], t[1].copy()]
|
n = [t[0], t[1].copy()]
|
||||||
for k in values:
|
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)
|
c.append(n)
|
||||||
|
|
||||||
return c
|
return c
|
||||||
|
|||||||
11
nodes.py
11
nodes.py
@ -1103,16 +1103,7 @@ class unCLIPConditioning:
|
|||||||
if strength == 0:
|
if strength == 0:
|
||||||
return (conditioning, )
|
return (conditioning, )
|
||||||
|
|
||||||
c = []
|
c = node_helpers.conditioning_set_values(conditioning, {"unclip_conditioning": [{"clip_vision_output": clip_vision_output, "strength": strength, "noise_augmentation": noise_augmentation}]}, append=True)
|
||||||
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)
|
|
||||||
return (c, )
|
return (c, )
|
||||||
|
|
||||||
class GLIGENLoader:
|
class GLIGENLoader:
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
comfyui-frontend-package==1.19.9
|
comfyui-frontend-package==1.20.4
|
||||||
comfyui-workflow-templates==0.1.18
|
comfyui-workflow-templates==0.1.18
|
||||||
torch
|
torch
|
||||||
torchsde
|
torchsde
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user