The Prophet ﷺ is reported to have said this hadith. Ayub remarked, "I do not know whether the phrase 'otherwise, whatever portion has been freed is freed' is part of the hadith from the Prophet ﷺ or something Nafi said himself."
حدثنا سليمان بن داود العتكي حدثنا حماد عن أيوب عن نافع
عن النبي ﷺ بهذا الحديث قال أيوب فلا أدري هو في الحديث عن النبي ﷺ أو شيء قاله نافع وإلا عتق منه ما عتق
Narrated by Muslim, hadith no. 1501, from Abu Rabi Sulayman bin Rabi, see the previous hadith, and by Bukhari, in the Book of Emancipation, chapter "If someone emancipates a slave jointly owned by two people, or a female slave jointly owned by partners," hadith no. 2524, from the hadith of Hammad bin Zayd, with the same chain.