NaN values in brain mask derivatives

Fmriprep seems to run well, output bold_preproc.nii is generated and looks OK, however brain_mask.nii.gz is filled with Nan values. Would love to know where to start investigating.
Thanks

Hi -
I have the same problem. But not errors are reported. Please, let me know if you found a solution to this.
Thanks

Same problem here. I can read the brain_mask.nii.gz in fsleyes. However, whenever I did some operation with the mask, it returned an empty image (e.g. mask preproc.nii.gz with brain_mask.nii.gz by fslmaths). I was also not able to read it with cosmo_fmri_dataset. I believe this problem has to do with the NIfTI header. The scl_slope and scl_inter were set to NaN in brain_mask.nii.gz’s header. You may try to set those two parameters to 1 and 0. I think this bug only happens for “MNI152NLin6Asym_res-2_desc-brain_mask” and “T1w_desc-brain_mask”. The scl_slope and scl_inter were set correctly in “MNI152NLin6Asym_desc-brain_mask”.

Sounds like a duplicate of BUG: scl_slope/scl_inter in mask and dseg headers are set to nan, should be 1/0.