Yoga Sutras of Patanjali translated by Yogi Kalinath - Chapter 3, Verse 50
Pada 3, Sutra 50
Tad-vairaagyaad api dosa-beeja-ksaye kaivalyam
By non-attachment to these powers (sovereignty), the disappearance of defects, arises Liberation.
Attachment in life is both gross and subtle and the most difficult attachments to overcome are the ones that present themselves in subtle form, i.e. the ones that are perceived by the subtle senses meaning here psychic powers and phenomena. With attachment to a sense of power that the Siddhis may inculcate in one, the path is being paved towards an entrenched fixation in I, my and mine. However if one is not distracted by an emerging sovereignty and its accompanying Siddhi of omniscience by simply witnessing it and not identifying with it (the true significance of non-attachment), the seeds of bondage are destroyed and Liberation ensues.
From attachment comes sorrow and all afflictions of the mind. The key is neither blind attraction (the seed of illusion and delusion) nor acerbic aversion (which is nothing but strong negative attachment) but indifference. Only through discernment (Viveka) between what is constant and unchanging versus what is ephemeral and changing can one develop true detachment and indifference.
Liberation then is when one realizes the unalloyed consciousness within as the Self.