Skip to content

Fix Pickling Windows #107

Closed
Katehuuh wants to merge 2 commits intoStability-AI:mainfrom
Katehuuh:main
Closed

Fix Pickling Windows #107
Katehuuh wants to merge 2 commits intoStability-AI:mainfrom
Katehuuh:main

Conversation

@Katehuuh
Copy link

@Katehuuh Katehuuh commented Jun 19, 2024

Modify #34 (comment) for current version. Fix the issue for me.

diff Fix Pickling Windows

setup.py:

    install_requires=[
+        'dill',

stable_audio_tools/data/dataset.py:

+import dill

-self.custom_metadata_fns[config.path] = config.custom_metadata_fn
+self.custom_metadata_fns[config.path] = dill.dumps(config.custom_metadata_fn)

-                    custom_metadata_fn = self.custom_metadata_fns[custom_md_path]
-                    custom_metadata = custom_metadata_fn(info, audio)
+                    custom_metadata_fn_deserialized = dill.loads(self.custom_metadata_fns[custom_md_path])
+                    custom_metadata = custom_metadata_fn_deserialized(info, audio)

@ghost
Copy link

ghost commented Jun 25, 2024

Can confirm this fixed the issue on Windows 10.

@Katehuuh Katehuuh closed this by deleting the head repository Jul 25, 2025
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

Successfully merging this pull request may close these issues.

1 participant