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

Crash with '.DS_Store': Format not recognised. #112

Closed
DL909 opened this issue Mar 25, 2023 · 9 comments · Fixed by #132
Closed

Crash with '.DS_Store': Format not recognised. #112

DL909 opened this issue Mar 25, 2023 · 9 comments · Fixed by #132
Assignees
Labels
bug Something isn't working

Comments

@DL909
Copy link

DL909 commented Mar 25, 2023

I have solved this problem and I write this issue for who have the same question as me.
I'm an Non-english users and I use Macbook, I ran 'svc pre-resample' after put the file I want to use to train my model. the computer started a Preprocess and soon crashed. here is the report:

joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/librosa/core/audio.py", line 176, in load
y, sr_native = __soundfile_load(path, offset, duration, dtype)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/librosa/core/audio.py", line 209, in __soundfile_load
context = sf.SoundFile(path)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/soundfile.py", line 658, in init
self._file = self._open(file, mode_int, closefd)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/soundfile.py", line 1216, in _open
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening 'dataset_raw/**/.DS_Store': Format not recognised.
(I hide some information to protect my privacy)

And here is the solution:
run in turns:
cd dataset_raw/xx/.DS_Store (which means you go to the folder where you put the audio files)
find . -name '.DS_Store' -type f -delete (which means you delete the .DS_Store file)

I think this issues is caused by the program mistakenly identifying .DS_Dtore file as a part of audio files. I believe this would be a general issue for MacOS user. Hopefully the developers will fix it in time.

@DL909 DL909 added the bug Something isn't working label Mar 25, 2023
@DL909
Copy link
Author

DL909 commented Mar 25, 2023

I found out that the whole work is useless because vits requires cuda to train but cuda isn't supported on macOS

@34j
Copy link
Collaborator

34j commented Mar 25, 2023

There is something called mps, but I doubt it is in the macbook.

@chitsanfei
Copy link
Contributor

chitsanfei commented Mar 25, 2023

.DS_ Store files, also known as Desktop Services Store files, are commonly generated by Finder and are used to record the metadata of files display information in Finder APP. This issue only exists for MacOS users, and usually programmers do not consider this issue. Fixing this issue on python programs requires declaring the file format of the index in advance, but this can increase program complexity.

Actually, you can disable automatically generating this file at the system level. Because .DS_ Store can also interrupt your local repo when you try managing your local repo without setting gitignore. And disabling it has almost no influence on your system.

You can enter this command in your Terminal in order to disable it.

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Also, there is a stackoverflow article may give your more information.

Besides, due to no cuda support in Mac because a Nvidia GPU is required, you can consider training your data in Colab Notebook like me.

Hopefully it can help you. 😊

@34j
Copy link
Collaborator

34j commented Mar 25, 2023

I think this problem can be corrected with a single line change. Anyone can send a PR.

@34j
Copy link
Collaborator

34j commented Mar 27, 2023

@allcontributors add DL909 bug

@allcontributors
Copy link
Contributor

@34j

I've put up a pull request to add @DL909! 🎉

@escoolioinglesias
Copy link

@DL909 I ran into this issue as well and just deleted the .DS_Store file and was able to proceed.

But, I have not been able to svc train.

Have you successfully trained a model on Mac ?

@escoolioinglesias
Copy link

@34j

There is something called mps, but I doubt it is in the macbook.

MPS = Metal Performance Shaders ??

https://developer.apple.com/metal/pytorch/

"mps device enables high-performance training on GPU for MacOS devices with Metal programming framework."

Would this, in theory, make it possible to train with so-vits-svc-fork on Apple Silicon?

@34j
Copy link
Collaborator

34j commented Apr 14, 2023

According to lightning, mps is supported by default ("auto"), but if it is not working please open another issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants