ComfyWarp icon indicating copy to clipboard operation
ComfyWarp copied to clipboard

ERROR:root:* MakeFrameDataset

Open Aljnk opened this issue 1 year ago • 2 comments

Hi. I can't add custom string (try many other) to MakeFrameDataset Node

Log Screenshot_3

WF Screenshot_1

Work only in I write same path inside Screenshot_2

Aljnk avatar Jan 16 '24 17:01 Aljnk

The problem is in this code:

@classmethod
    def VALIDATE_INPUTS(self, file_path, update_on_frame_load):
        _, n_frames = self.get_frames(self, file_path, update_on_frame_load)
        if n_frames==0:
            return f"Found 0 frames in path {file_path}"

        return True

If you delete it - everything works. file_path is always NONE within VALIDATE_INPUTS - Perhaps the problem is that this function does not have enough time to get the value from connected node.

Aljnk avatar Jan 18 '24 15:01 Aljnk

if delete VALIDATE_INPUTS and add validation inside get_frames - it won't be as pretty, but it will work

def get_frames(self, file_path, update_on_frame_load):
        ds = FrameDataset(file_path, outdir_prefix='', videoframes_root=folder_paths.get_output_directory(), 
                          update_on_getitem=update_on_frame_load)
        if len(ds) == 0:
            return f"Found 0 frames in path {file_path}"
        return (ds,len(ds))

Aljnk avatar Jan 18 '24 16:01 Aljnk