We use semi-derived Ringel-Hall algebras of quivers with loops to realize the whole quantum Borcherds-Bozec algebras and quantum generalized Kac-Moody algebras.