We have studied the stability of the Fermi-liquid phase of a square-lattice tight-binding model with respect to the spontaneous generation of magnetic flux and orbital magnetization. An energy density of the form 1/2KB2 is associated with the magnetic field B, and the phase diagram is investigated as a function of K, temperature T, and density or chemical potential. For K0 and density near half filling, the system condenses below a critical temperature into a 2 × 2 antiferromagnetic flux phase in which the spontaneously generated flux alternates in sign in a checkerboard pattern. Farther from half filling and for K0, the 2 × 2 pattern is replaced by an incommensurate flux phase in which the spatial periodicity of the spatially modulated flux is in general an irrational multiple of the lattice constant. At zero temperature for densities off half filling, the commensurate flux phase with uniform flux density equal to the particle density is the lowest-energy state of those considered at sufficiently small values of K. We also relate the Fermi-liquid instabilities of this gauge-invariant tight-binding (t) model at nonzero K/t to those of the large-N t-J model at nonzero t/J, and thereby predict the existence of similar flux-phase instabilities in the latter model.