Crackling audio/Bumblebee Dynamic GPU switching

I’m new to all of this PCI-Passthrough stuff, I have already ubinded the gpu and am currently using the iGPU on the host. I also have a VM set up but it’s super laggy maybe 50% usable. The audio crackles though. My goal is to have the NVIDIA driver loaded on start then bind the card to the vfio-pci driver after the vm is started. Can someone point me in the right direction? My end goal is to be able to use the NVIDIA card for video output for both the vm and the host (I only have 1 monitor) and use looking glass for the display.

@gnif used a script like this to unbind the driver on an amdgpu.
I tried using a setup like this before, but I couldn’t figure out essential parts so I ditched this plan and always let vfio-pci take my amdgpu.

Yeah, it sounds really complicated, but I’m still going to keep trying.