Additive manufacturing (AM) and topology optimization (TO) emerge as vital processes in modern industries, with broad adoption driven by reduced expenses and the desire for lightweight and complex designs. However, iterative topology optimization can be inefficient and time-consuming for individual products with a large set of parameters. To address this shortcoming, machine learning (ML), primarily neural networks, is considered a viable tool to enhance topology optimization and streamline AM processes. In this work, a machine learning (ML) model that generates a parameterized optimized topology is presented, capable of eliminating the conventional iterative steps of TO, which shortens the development cycle and decreases overall development costs. The ML algorithm used, a conditional generative adversarial network (cGAN) known as Pix2Pix-GAN, is adopted to train using a variety of training data pairs consisting of color-coded images and is applied to an example of cantilever optimization, significantly enhancing model accuracy and operational efficiency. The analysis of training data numbers in relation to the model’s accuracy shows that as data volume increases, the accuracy of the model improves. Various ML models are developed and validated in this study; however, some artefacts are still present in the generated designs. Structures that are free from these artefacts achieve 91% reliability successfully. On the other hand, the images generated with artefacts may still serve as suitable design templates with minimal adjustments. Furthermore, this research also assesses compliance with two manufacturing constraints: the limitations on build space and passive elements (voids). Incorporating manufacturing constraints into model design ensures that the generated designs are not only optimized for performance but also feasible for production. By adhering to these constraints, the models can deliver superior performance in future use while maintaining practicality in real-world applications.