aik2mlj / polyffusion

Polyffusion: A Diffusion Model for Polyphonic Score Generation with Internal and External Controls
https://polyffusion.github.io
MIT License
71 stars 8 forks source link

Inference errors, e.g. "Missing key model_name" #6 issue is reproduced. #8

Open taktak1 opened 2 months ago

taktak1 commented 2 months ago

Inference errors, e.g. "Missing key model_name" #6

python polyffusion/inference_sdf.py --chkpt_path=result/sdf+pop909wm_mix16_chd8bar/01-11_102022/chkpts/weights.pt --uncond_scale=0. --length=10  --custom_params_path=result/sdf+pop909wm_mix16_chd8bar/01-11_102022/params.yaml 

doesn't work.

 omegaconf.errors.ConfigAttributeError: Missing key model_name
    full_key: model_name
    object_type=dict

Of course, the model , params file is in the result/sdf+pop909wm_mix16_chd8bar/01-11_102022.

aik2mlj commented 1 month ago

Hi, sorry for that. I guess the uploaded params.yaml file was outdated due to some code changes afterward. To fix this, simply add model_name: sdf_chd8bar at the top of the params.yaml file in the checkpoint folder. The name (sdf_chd8bar) doesn't matter, you can change it to anything you prefer.

Also, I guess you can omit the --custom_params_path=... part since the code would detect the params.yaml file.