LAV-DF icon indicating copy to clipboard operation
LAV-DF copied to clipboard

Metadata

Open MyFirstKindom opened this issue 1 year ago • 4 comments

I hope this message finds you well. I am currently working on a project and encountered an issue with the Metadata class in the lavdf.py file. When trying to initialize the Metadata class from a JSON file using the lambda function in the read_json method, I received the following error:

TypeError: Metadata.init() got an unexpected keyword argument 'transcript' Here is the relevant code snippet: self.metadata: List[Metadata] = read_json(os.path.join(self.root, "metadata.min.json"), lambda x: Metadata(**x))

It seems that the transcript field is not being recognized in the Metadata class, even though I've added it as an attribute. I would greatly appreciate your guidance on resolving this issue.

Thank you very much for your assistance.

MyFirstKindom avatar Apr 06 '24 18:04 MyFirstKindom

2a7bf5c40be152fecc8550e76de3478

MyFirstKindom avatar Apr 06 '24 18:04 MyFirstKindom

Sorry my mistake. Now it's solved in https://github.com/ControlNet/LAV-DF/commit/679cc602b7f65d7f5591a66cf02fd276f7ca0a9f. Please remove the metadata.min.json in LAV-DF dataset folder, then rerun your script for training or test.

ControlNet avatar Apr 07 '24 01:04 ControlNet