This paper focuses on the output consensus problem in networks divided into clusters of heterogeneous agents. In each cluster, there exists an agent called a leader, who can instantly communicate with other leaders outside of its cluster. Moreover, each cluster is represented by a fixed and undirected graph. By introducing a dynamic internal reference model for each agent, that takes into account the continuous-time communications among internal reference models in virtual clusters and discrete information exchanges between virtual clusters, an adaptive distributed consensus control protocol is proposed. It is shown that the output consensus problem is indirectly solved through the consensus of the virtual references. Then, a sufficient condition for the internal reference models in virtual clusters is proposed. Next, a sufficient and necessary condition is derived for the output consensus of linear heterogeneous agents in the considered clustered network. Finally, an illustrative example is given to show the effectiveness of the proposed theoretical results.