Closed sammlapp closed 7 months ago
@sammlapp, I have added a streamlit app to interact with the model,: link.
A better version of the code+docs is in the cooking...
Oh great, thanks. I might just wait for the updated version in that case. I really appreciate the effort to provide open-source tools/models and also your responsiveness to questions!
i got the same problems when i want use the interpolation way to generate the audio. What can i do now for useing that now.
D:\University\Software\Anaconda3\envs\ecogen39\python.exe D:\University\Code\Bird_sound_generation\birds-generation-master\test\generate_samples_audio.py 0it [00:00, ?it/s]data\test1.wav Size: (1, 1, 128, 128) data\test2.wav Size: (1, 1, 128, 128) 0it [00:02, ?it/s] Traceback (most recent call last): File "D:\University\Code\Bird_sound_generation\birds-generation-master\test\generate_samples_audio.py", line 214, in <module> main() File "D:\University\Code\Bird_sound_generation\birds-generation-master\test\generate_samples_audio.py", line 209, in main func(model=model, all_samples_paths=all_samples_paths, ratio=0.5, out_folder=args.out_folder, File "D:\University\Code\Bird_sound_generation\birds-generation-master\test\generate_samples_audio.py", line 131, in interpolation q_t, q_b, i_t, i_b = self.encode(model.net, spectrogram, device=device) File "D:\University\Software\Anaconda3\envs\ecogen39\lib\site-packages\torch\nn\modules\module.py", line 1269, in __getattr__ raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'VQVAE' object has no attribute 'net'
i fine the reason is the Line:131 and 132,
q_t, q_b, i_t, i_b = self.encode(model.net, spectrogram, device=device) q_t1, q_b1, i_t1, i_b1 = self.encode(model.net, spectrogram1, device=device)
use the model.net, i delete the ".net", that the py can run, so is right?
I'm experiencing the same issue as @sammlapp - Are there any updates (besides the interactive app, which is a fantastic addition but does not appear to work for interpolation)?
I'm experiencing the same issue as @sammlapp - Are there any updates (besides the interactive app, which is a fantastic addition but does not appear to work for interpolation)?
I was able to temporarily solve the issue using @Cyh237 's solution! Replacing model.net
with model
everywhere in generate_samples.py
.
Code has been updated. Thank you @Cyh237 , @masonyoungblood
Ok, I got closer to successfully running the model but encountered a new error.
I'm not sure what the source of this error is, it seems the object being passed to interpolate doesn't contain the expected attribute
.net
but I don't know why.in my call to generate_samples.py, is pointing the "model_path" argument to the downloaded
.ckpt
file correct ?