Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR:root:* MakeFrameDataset #3

Open
Aljnk opened this issue Jan 16, 2024 · 2 comments
Open

ERROR:root:* MakeFrameDataset #3

Aljnk opened this issue Jan 16, 2024 · 2 comments

Comments

@Aljnk
Copy link

Aljnk commented Jan 16, 2024

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
Copy link
Author

Aljnk commented Jan 18, 2024

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
Copy link
Author

Aljnk commented Jan 18, 2024

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant