I assume you mean IFD (Internet-Facing Deployment). You need to have your ADFS server connected to both the Office 365 system that hosts your CRM Online, and to your local Active Directory for your CRM On-Premises.
Just treat them as two completely different deployments to connect to your ADFS server, and they should work fine. Then migrate all your CRM Online users to their Active Directory accounts in the Office 365 management tools, and everyone can just use
their Active Directory accounts to sign on everywhere.
All details you need should be in the deployment guides:
http://www.microsoft.com/en-us/download/details.aspx?id=40322
The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.