Tuning the values of artificial flux in the two-dimensional octagonal-diamond lattice drives topological phase transitions, including between singular and non-singular flatbands. We study the dynamical properties of nonlinear compact localized modes that can be continued from linear flatband modes. We show how the stability of the compact localized modes can be tuned by the nonlinearity strength or the applied artificial flux. Our model can be realized using ring resonator lattices or nonlinear waveguide arrays.