We consider a two-dimensional octagonal-diamond network with a fine-tuned diagonal coupling inside the diamond-shaped unit cell. Its linear spectrum exhibits coexistence of two dispersive bands (DBs) and two flat bands (FBs), touching one of the DBs embedded between them. Analogous to the kagome lattice, one of the FBs will constitute the ground state of the system for a proper sign choice of the Hamiltonian. The system is characterized by two different flat-band fundamental octagonal compactons, originating from the destructive interference of fully geometric nature. In the presence of a nonlinear amplitude (on-site) perturbation, the single-octagon linear modes continue into one-parameter families of nonlinear compact modes with the same amplitude and phase structure. However, numerical stability analysis indicates that all strictly compact nonlinear modes are unstable, either purely exponentially or with oscillatory instabilities, for weak and intermediate nonlinearities and sufficiently large system sizes. Stabilization may appear in certain ranges for finite systems and, for the compacton originating from the band at the spectral edge, also in a regime of very large focusing nonlinearities. In contrast to the kagome lattice, the latter compacton family will become unstable already for arbitrarily weak defocusing nonlinearity for large enough systems. We show analytically the existence of a critical system size consisting of 12 octagon rings, such that the ground state for weak defocusing nonlinearity is a stable single compacton for smaller systems, and a continuation of a nontrivial, noncompact linear combination of single compacton modes for larger systems. Investigating generally the different nonlinear localized (noncompact) mode families in the semi-infinite gap bounded by this FB, we find that, for increasing (defocusing) nonlinearity the stable ground state will continuously develop into an exponentially localized mode with two main peaks in antiphase. At a critical nonlinearity strength a symmetry-breaking pitchfork bifurcation appears, so that the stable ground state is single peaked for larger defocusing nonlinearities. We also investigate numerically the mobility of localized modes in this regime and find that the considered modes are generally immobile both with respect to axial and diagonal phase-gradient perturbations.