MCPcopy Create free account
hub / github.com/PowerHouseMan/ComfyUI-AdvancedLivePortrait / PrintExpData

Class PrintExpData

nodes.py:615–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613 return (es,)
614
615class PrintExpData:
616 @classmethod
617 def INPUT_TYPES(s):
618 return {"required": {
619 "cut_noise": ("FLOAT", {"default": 0, "min": 0, "max": 100, "step": 0.1}),
620 },
621 "optional": {"exp": ("EXP_DATA",), }
622 }
623
624 RETURN_TYPES = ("EXP_DATA",)
625 RETURN_NAMES = ("exp",)
626 FUNCTION = "run"
627 CATEGORY = "AdvancedLivePortrait"
628 OUTPUT_NODE = True
629
630 def run(self, cut_noise, exp = None):
631 if exp == None: return (exp,)
632
633 cuted_list = []
634 e = exp.exp * 1000
635 for idx in range(21):
636 for r in range(3):
637 a = abs(e[0, idx, r])
638 if(cut_noise < a): cuted_list.append((a, e[0, idx, r], idx*10+r))
639
640 sorted_list = sorted(cuted_list, reverse=True, key=lambda item: item[0])
641 print(f"sorted_list: {[[item[2], round(float(item[1]),1)] for item in sorted_list]}")
642 return (exp,)
643
644class Command:
645 def __init__(self, es, change, keep):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected