Giter VIP home page Giter VIP logo

Comments (8)

Mrw33554432 avatar Mrw33554432 commented on June 29, 2024

Perhaps we can just modify the code a little (but I failed to run from source code - the release package works fine)

        save_callback(file, out, self.save_callback)
        self.updateStatus(f"Successfully separated audio {file.name}")
        finishCallback(shared.FileStatus.Finished, item)
        self.separating = False

to

        self.separating = False
        save_callback(file, out, self.save_callback)
        self.updateStatus(f"Successfully separated audio {file.name}")
        finishCallback(shared.FileStatus.Finished, item)

I guess self.separating is controlling when the next process will be started. And if this doesn't work we can just assign a new thread with a copy of parameter.

from demucs-gui.

CarlGao4 avatar CarlGao4 commented on June 29, 2024

I've moved the first suggestion into a new issue. Though your modification will not achieve what you want. I'll add it to 1.0

from demucs-gui.

Mrw33554432 avatar Mrw33554432 commented on June 29, 2024

I've moved the first suggestion into a new issue. Though your modification will not achieve what you want. I'll add it to 1.0

I find this, which might make 2nd task much easier

# If you only want to separate vocals out of an audio, use `--two-stems=vocals` (You can also set to drums or bass)
demucs --two-stems=vocals myfile.mp3

from demucs-gui.

CarlGao4 avatar CarlGao4 commented on June 29, 2024

You will find that it was me who developed this function 😄
In fact, I'm planning to add a mixer, allowing the users to mix stems and change their volumes, so operations like making vocals louder would be easier. But I won't add it before 1.1

from demucs-gui.

Mrw33554432 avatar Mrw33554432 commented on June 29, 2024

You will find that it was me who developed this function 😄 In fact, I'm planning to add a mixer, allowing the users to mix stems and change their volumes, so operations like making vocals louder would be easier. But I won't add it before 1.1

The new thread based save seems working well. Now the audio loading is taking lot of time between each file, so I guess it also deserve a separate thread (maybe pre-load 10 files in a queue and directly send them when the model is ready).

from demucs-gui.

Mrw33554432 avatar Mrw33554432 commented on June 29, 2024

You will find that it was me who developed this function 😄 In fact, I'm planning to add a mixer, allowing the users to mix stems and change their volumes, so operations like making vocals louder would be easier. But I won't add it before 1.1

The new thread based save seems working well. Now the audio loading is taking lot of time between each file, so I guess it also deserve a separate thread (maybe pre-load 10 files in a queue and directly send them when the model is ready).

On a 3090, the audio loading can take 1/3 of the inference time, and on a 4090 it may take about 2/3 of inference time. So I guess it is a big issue. I tried to write that function by myself, but it seems like the backend (audio processing) is deeply correlated with the front end (queue control).

from demucs-gui.

CarlGao4 avatar CarlGao4 commented on June 29, 2024

In fact, I'm worrying about the memory issue. With parallel reading and writing, more than one uncompressed audio files are stored in memory, which will increase the possibility of encountering OOM

from demucs-gui.

Mrw33554432 avatar Mrw33554432 commented on June 29, 2024

In fact, I'm worrying about the memory issue. With parallel reading and writing, more than one uncompressed audio files are stored in memory, which will increase the possibility of encountering OOM

I don't actually think that will be a problem, as each loaded sound file will only take a little mem (as long as the file itself is not too large - but 200M+ audios are rare cases). In my other projects even loading 100 audios in a queue/list won't really take much ram, and the extra ram usage (<200M I guess) comparing to the current mem usage (2G) would be minor. Reducing the amount of pre-loaded audio would also help, you can try 2/3/4 preloaded files and ideally that should be quite enough.

from demucs-gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.