Artificial intelligence-generated image content (AIGIC) is produced through the extraction of features and patterns from a vast image dataset, requiring substantial computational resources for training. This study aims to enhance image processing and response time on terminal devices by utilizing 1 edge computing technology to offload specific training tasks to edge nodes. Additionally, task offloading and resource allocation strategies are developed to effectively generate image content on terminal devices. Edge computing aims to execute computing tasks in close proximity to data sources; however, the computing resources of edge devices are limited. Therefore, the development of suitable resource allocation strategies for resource-constrained environments is crucial in edge computing research. Serverless computing, which heavily relies on container technology for program hosting, is recognized as one of the most 1