Conversation
|
Hi @Dhyan761! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Been doing some of kind of thing as well so sharing my lessons learned-- Implementation: Concatenation vs. Accumulation When creating a list of tensors and using torch.cat iteratively will grow the output. This is "Additive Concatenation"—the output gets longer with every loop. Possible out of memory on long runs if GPU memory is tight. Alternative: Weighted Accumulation. We pre-allocate a master buffer (t_out = np.zeros_like(audio)) and "sum" the chunks into it. This is much more memory-efficient for very long runs (e.g., a 10-minute track) because we don't have to keep re-copying the entire tensor in memory. We have one copy of the audio vs list. Good stuff... trying to add value with the comments and code... #code Summary of Value: Fragmentation: Repeatedly calling torch.cat forces the system to find new, larger contiguous memory blocks, which is the #1 cause of "Out of Memory" crashes on Windows. Consistent Volume: By using the weight_map to normalize, you guarantee that the volume in the crossfade regions is exactly |
No description provided.