Cog inference for flux models