I have had the same issue a couple of times. Check the anti siphon check valve in your fuel line. On my Sea Ray its in the fuel supply line near the top of the gas tank. The small spring operated ball check valve had crud trapped in it and would not allow enough gas to pass through. It would idle fine all day but wouldn't run at higher RPM. I removed the check valve and blew the crud out with an air hose, problem solved. The crud looked like bug parts, likely from using a 5 gal can that sat in the garage all winter.