Closed Bebra777228 closed 3 weeks ago
I'd like to take a moment to encourage you (and anyone else) to read the code and figure out the answer yourself when you have a question like this rather than just raising an issue 😄
Even better, if you want to contribute back to the community, you can raise a PR improving the documentation or write up a post explaining your findings once you've dug into the code to figure it out!
The mental load of maintaining this repository for free is already more than I would like, which is why you get very slow responses from me and why I would prefer to help folks help themselves rather than expecting me to answer.
If you try your best to figure it out but get stuck / struggle, I'm much happier to help teach you how things work / how to help yourself, but it would be helpful if you could do the initial attempt and write up your findings / explain where you get stuck and then ask me for help pointing you in the right direction to unstick you!
Anyway, for this specific case you asked about (demucs), I'll answer the question for you and show you my approach:
I started out by opening the repo in vscode and searching for the string Default
across the whole codebase.
That gave only a few results, giving us a few good starts for where to look:
audio_separator/separator/separator.py
, on this line, we see: demucs_params={"segment_size": "Default"
demucs_params
value gets passed in under a Demucs
key in self.arch_specific_params
arch_specific_params
then gets passed in to the instance of whatever separator architecture class is loaded, which we can see from this line is demucs_separator.DemucsSeparator
audio_separator/separator/architectures/demucs_separator.py
and we can see from this line that the segment_size
value just gets passed through to be set as self.segment_size
in this class instance. # Adjust segments to manage RAM or V-RAM usage:
# - Smaller sizes consume less resources.
# - Bigger sizes consume more resources, but may provide better results.
# - "Default" picks the optimal size.
# DEMUCS_SEGMENTS = (DEF_OPT, '1', '5', '10', '15', '20',
# '25', '30', '35', '40', '45', '50',
# '55', '60', '65', '70', '75', '80',
# '85', '90', '95', '100')
segment_size
now in this file, we can see further down that the value is passed into a function called demucs_segments
, which is imported from uvr_lib_v5.demucs.apply
audio_separator/separator/uvr_lib_v5/demucs/apply.py
, where we can see the demucs_segments functionNone
when it's set to Default
, what actually is the "default" value?demucs_segments
function is an instance of the HDemucs
class from audio_separator/separator/uvr_lib_v5/demucs/hdemucs.py
, so I open that up, and...segment
property which is instantiated with a default value of 40
So, in short, the default value is 40. Hope this process helps you understand how you can answer questions like this yourself in future 😄
Oh yes, I have already resolved this issue. While waiting for a response, I completely forgot about it =)
In the demucs_params, the segment_size is set to 'Default'. I would like to understand what this means and what specific value 'Default' implies.
Additionally, it would be helpful to know at least the approximate minimum and maximum values for each parameter across different architectures.
I have already written this text as part of another issue, but since there has been no response to it for several days, I decided to duplicate it in a new issue and close the old one =)