| 552 | return file_name |
| 553 | |
| 554 | class LoadExpData: |
| 555 | @classmethod |
| 556 | def INPUT_TYPES(s): |
| 557 | file_list = [os.path.splitext(file)[0] for file in os.listdir(exp_data_dir) if file.endswith('.exp')] |
| 558 | return {"required": { |
| 559 | "file_name": (sorted(file_list, key=str.lower),), |
| 560 | "ratio": ("FLOAT", {"default": 1, "min": 0, "max": 1, "step": 0.01}), |
| 561 | }, |
| 562 | } |
| 563 | |
| 564 | RETURN_TYPES = ("EXP_DATA",) |
| 565 | RETURN_NAMES = ("exp",) |
| 566 | FUNCTION = "run" |
| 567 | CATEGORY = "AdvancedLivePortrait" |
| 568 | |
| 569 | def run(self, file_name, ratio): |
| 570 | # es = ExpressionSet() |
| 571 | with open(os.path.join(exp_data_dir, file_name + ".exp"), 'rb') as f: |
| 572 | es = dill.load(f) |
| 573 | es.mul(ratio) |
| 574 | return (es,) |
| 575 | |
| 576 | class ExpData: |
| 577 | @classmethod |
nothing calls this directly
no outgoing calls
no test coverage detected