Control method and device for AIGC image generation and storage medium
By converting user traffic from the AIGC big model into a queue and adopting asynchronous execution, the problems of hardware equipment pressure and low service success rate are solved, and more efficient resource utilization and user experience are achieved.
Patent Information
- Application Number
- CN202411376431.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
The current AIGC large model has a large number of parameters and diverse user needs, which leads to high pressure on hardware devices and low service success rate. And HTTP requests directly hit the algorithm training service will lead to insufficient computing power and service failure.
By converting user traffic at the same time into a queue, completing tasks one by one, using asynchronous execution model training and inference, using queue management mechanism to reduce pressure on hardware devices, improve service success rate, and provide unified input and output through the general control system Centralized management of the interface.
It effectively reduces the pressure on hardware equipment, improves the service success rate, realizes peak-cutting and valley filling of business requests, and improves the utilization rate of equipment resources and user experience.
Smart Images

Figure CN119273528A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a control method, device and storage medium for artificial intelligence generated content (AIGC) image generation. Background Art
[0002] The current AIGC model has a very large number of parameters and users’ needs vary. By fine-tuning the large model, the generated effect can be made more in line with user needs and its intelligence and user-friendliness can be improved. Summary of the invention
[0003] One purpose of the present disclosure is to reduce the pressure on hardware devices and improve the service success rate.
[0004] According to one aspect of some embodiments of the present disclosure, a control method for artificial intelligence generated content (AIGC) image generation is proposed, including: obtaining a business request, the business request including reasoning information; when the business request also includes a training identifier, adding a model training request to a training queue; the control method also includes: extracting the model training request from the training queue according to the queue order; performing model training through a GPU (Graphics Processing Unit) according to the model training request until the training is completed; obtaining reasoning data according to information of a trained business model and reasoning information in a business request corresponding to the business model, and adding the reasoning data to the reasoning queue; extracting reasoning data from the training queue according to the queue order; processing the reasoning information in the business request corresponding to the business model through the business model to obtain an image generation result.
[0005] In some embodiments, the control method further includes: reviewing the image generation results by calling the review interface; adding the image generation results and the review results to the output message queue; and outputting the image generation results in the order of the message queue through the interactive exit.
[0006] In some embodiments, when the business request includes a training identifier, the business request also includes a training sample; executing model training through the GPU includes: fine-tuning the original model according to the training sample to obtain the business model.
[0007] In some embodiments, the reasoning information includes user identity information and reasoning template information.
[0008] In some embodiments, the information of the business model includes a training folder, an inference folder, and a low-order adaptive LoRA weight of a large language model of the business model.
[0009] In some embodiments, the control method also includes: when the business request does not include a training identifier, obtaining reasoning data based on the user's historical business model information and the reasoning information in the business request, and adding the reasoning data to the reasoning queue; extracting reasoning data from the training queue according to the queue order; processing the reasoning information in the business request through the historical business model to obtain the image generation result.
[0010] In some embodiments, the control method also includes: obtaining a progress query request; querying the status information of the corresponding business request according to the progress query request; if the status information is in training or inference, returning the corresponding status information; if the status information is not in training and not in processing, querying whether the model training request corresponding to the business request is in the training queue; if the model training request corresponding to the business request is in the training queue, returning the first queue sequence number information; if the model training request corresponding to the business request is not in the training queue, querying whether the inference data corresponding to the business request is in the training queue; if the model training request corresponding to the business request is in the training queue, returning the second queue sequence number information.
[0011] According to one aspect of some embodiments of the present disclosure, a control device for artificial intelligence generated content (AIGC) image generation is proposed, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the above control methods for AIGC image generation based on instructions stored in the memory.
[0012] According to one aspect of some embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, any one of the control methods for AIGC image generation described above is implemented.
[0013] According to one aspect of some embodiments of the present disclosure, a computer program product is proposed, including a computer program or instructions, which implement any one of the above control methods for AIGC image generation when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0015] Figure 1 Flowcharts of some embodiments of the control method for AIGC image generation disclosed in the present invention.
[0016] Figure 2 Flow charts of other embodiments of the control method for AIGC image generation disclosed in the present invention.
[0017] Figure 3 Schematic diagram of some embodiments of the control method for AIGC image generation disclosed in the present invention.
[0018] Figure 4 Schematic diagrams of some embodiments of the control device for AIGC image generation disclosed in the present invention.
[0019] Figure 5 Schematic diagrams of other embodiments of the control device for AIGC image generation disclosed in the present invention.
[0020] Figure 6 Schematic diagrams of some further embodiments of the control device for AIGC image generation disclosed in the present invention. DETAILED DESCRIPTION
[0021] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments.
[0022] Online training of a single model takes a long time, usually 10 to 20 minutes. The most common interaction method HTTP is not suitable for such a long-time service, and in the case of high traffic, it will have an impact on the algorithm GPU training service, and the GPU service will not be able to respond, resulting in a short-term peak in algorithm training or algorithm reasoning. Considering the characteristics of the GPU training service, a machine can only process one training task at a time, and will not process other training tasks during the period from the start of training to the end of training, which causes this type of service to put a lot of work pressure on the hardware equipment. If you use HTTP requests to directly send all received training requests directly to the algorithm training service, a large number of requests will fail, and only a few requests that arrive first may occupy GPU resources and be successfully trained.
[0023] In response to the above problems, the present disclosure proposes a control method, device and storage medium for AIGC image generation, which converts the user traffic pouring in at the same time into a queue, allowing the devices executing algorithm training to complete the tasks one by one according to their own processing speed, thereby avoiding service failures caused by insufficient computing power, reducing the requirements for instantaneous computing power, reducing the pressure on hardware devices, and improving the service success rate.
[0024] The flowcharts of some embodiments of the control method for AIGC image generation disclosed in the present invention are as follows: Figure 1 As shown in the figure. This process is executed by the master control system that performs model training and model reasoning. The master control system can be the upper-level system of model training and model reasoning, responsible for the scheduling of tasks and algorithms. The master control system can also provide a unified input and output interface, which can facilitate centralized management of algorithms, reduce usage complexity, and improve user experience.
[0025] In the steps shown below, S11, S21, and S31 are all executed asynchronously, have no dependencies, and can be executed according to their corresponding events.
[0026] In step S11, a business request is obtained, and the business request includes reasoning information. In some embodiments, the reasoning information includes user identity information and reasoning template information. In some embodiments, the user identity information may be information required for inputting a trained model and for the model to generate a picture matching the user. In some embodiments, the reasoning template information includes information required for inputting a trained model and for the model to generate a picture background.
[0027] In some embodiments, the obtained service requests may be stored in a front queue, and subsequent steps may be called one by one in a first-in-first-out order.
[0028] In step S12, it is determined whether the service request includes a training identifier. If the service request includes a training identifier, it indicates that the user needs to retrain (or supplement) the model, and step S13 is executed. If the service request does not include a training identifier, the default model or the personalized model that the user has requested to be trained can be used to perform the inference operation.
[0029] In step S13, a model training request is added to the training queue. In some embodiments, the queue may be a List data type in Redis. The training queue is a first-in-first-out data structure.
[0030] In some embodiments, if the service request includes a training identifier, it may also include training samples, such as photos or videos of the user himself, to improve the compatibility of the trained model with the user himself.
[0031] In some embodiments, the model training request may include training samples for invocation during the training process.
[0032] In some embodiments, the business request can be used as a model training request and added to a training queue so as to associate the trained business model with subsequent reasoning operations to avoid model usage errors during subsequent reasoning processes.
[0033] The model training request stored in the training queue is extracted by the master control system in the order of first-in-first-out of the queue according to the operating status of the modules and devices related to the model training, and steps S21-S23 are executed. In some embodiments, when it is determined that there is an idle GPU, the master control system extracts the model training request in the training queue and assigns it to the idle GPU to perform the training operation.
[0034] In step S21, a model training request is extracted from the training queue according to the queue order. In some embodiments, sample data can be extracted from the data stored in the training queue to perform a training operation.
[0035] In step S22, model training is performed through the GPU according to the model training request until the training is completed.
[0036] In some embodiments, the model training can be a fine-tuning operation based on a large model that has been trained. For example, LoRA (Low-Rank Adaption of Large Language Models) is used to fine-tune the large model. In some embodiments, during the training process, the original model is fine-tuned according to the training samples to obtain a business model. Through such a method, while providing users with an adaptive personalized business model, it is possible to reduce the sample demand, improve training efficiency, and thus improve the efficiency of providing services to users.
[0037] In step S23, according to the information of the trained business model and the reasoning information in the business request corresponding to the business model, the reasoning data is obtained and added to the reasoning queue. In some embodiments, the information of the business model and the reasoning information can be encapsulated in a predetermined structure to form the reasoning data.
[0038] In some embodiments, the information of the business model may include parameter information of the model itself, and may also include storage paths related to the business model, such as the storage path of information associated with model training, or the storage path of information associated with model use (subsequent reasoning process).
[0039] In some embodiments, the information of the business model includes a training folder, an inference folder, and a low-order adaptive LoRA weight of a large language model of the business model.
[0040] The model training request stored in the inference queue is extracted by the master control system in the first-in-first-out order of the queue according to the operating status of the modules and devices related to inference, and steps S31-S32 are executed.
[0041] In step S31, inference data is extracted from the training queue according to the queue order.
[0042] In some embodiments, business model information and reasoning information are extracted from the extracted reasoning data.
[0043] In step S32, the inference information in the business request corresponding to the business model is processed through the business model to obtain the image generation result. In some embodiments, the business model is determined according to the information of the business model, and the inference information is input into the business model to obtain the image generation result.
[0044] Based on the method in the embodiment shown above, the acquisition of business requests and model training are asynchronous operations. By converting the user traffic pouring in at the same time into queues, the device executing algorithm training can complete the tasks one by one according to its own processing speed, thereby avoiding service failures caused by insufficient computing power, reducing the requirements for instantaneous computing power, reducing the pressure on hardware devices, and improving the service success rate; it can also achieve the effect of peak shaving and valley filling of business requests, and improve the effective utilization rate of equipment operation resources. In addition, the reasoning process and the training process are also asynchronous operations, which improves the flexibility of reasoning and training.
[0045] In some embodiments, Figure 1 As shown, the control method for AIGC image generation disclosed in the present invention further includes step S14. In step S12 shown above, if the service request does not include a training identifier, step S14 is executed.
[0046] In step S14, based on the information of the user's historical business model and the reasoning information in the business request, the reasoning data is acquired and added to the reasoning queue.
[0047] In some embodiments, the historical business model of the user may be a business model generated when the user previously or for the first time issued a business request with a training identifier. In some embodiments, in the above step S23, an association relationship may be established between the trained business model and the user, so that when a business request that does not contain a training identifier is received, the corresponding historical business model may be extracted according to the user who issued the business request.
[0048] Since the inference data has been added to the inference queue, in step S31 shown above, when the inference data is extracted from the training queue according to the queue order, if the inference data added to the inference queue in step S14 is extracted, the historical business model will be used to process the inference information in the business request to obtain the image generation result.
[0049] Based on the method in the embodiment shown above, it is possible to process business requests that do not require model training, improve service efficiency and flexibility, and improve compatibility.
[0050] In some embodiments, Figure 1 As shown, the control method for AIGC image generation disclosed in the present invention also includes steps S41-S43.
[0051] In step S41, the image generation result is reviewed by calling the review interface. In some embodiments, the master control system calls the review API, sends the image generation result to the review API, and obtains the review result.
[0052] In step S42, the image generation result and the audit result are combined into a structure in JSON format, and the audit result is added to the output message queue as one of the fields.
[0053] In step S43, the picture generation result is output through the interactive exit in the order of the message queue.
[0054] Based on the method in the embodiment shown above, a unified interactive output port can be provided, which facilitates centralized management of the algorithm while reducing the complexity of use and improving user experience; by using the message queue, the output and the previous step are also asynchronous operations, avoiding mutual influence of different links.
[0055] In some embodiments, the control method for AIGC image generation shown in the present disclosure can also allow users to query business progress in real time. In some embodiments, after obtaining a progress query request, the status information of the corresponding business request can be queried according to the progress query request; if the status information is in training or inference, the corresponding status information is returned. If the status information is not in training and not in processing, the various queues shown above can be queried to determine whether there is relevant information about the business request in the queue, and then the queue number of each queue is returned to facilitate identification of the current processing stage of the business request, provide users with sufficient progress status information, and improve user friendliness.
[0056] Flow charts of other embodiments of the control method for AIGC image generation disclosed in the present invention are as follows: Figure 2 shown.
[0057] In step 201, a progress query request is obtained to trigger the query of the queue progress. In some embodiments, the progress query request may come from a user to improve user friendliness; in some embodiments, the progress query request may be triggered by the master control system so that the master control system can understand the execution progress of each business.
[0058] In some embodiments, the relevant service may be determined according to the user who initiates the progress query request, so that the master control system can query the progress of the service.
[0059] In steps 202-204, the status information of the service related to the progress query request is queried. If the service model corresponding to the service is being trained, the status is training; if the service model corresponding to the service is being used to perform reasoning operations, the status is reasoning.
[0060] In some embodiments, if the state is in training or inference, step 204 is executed to return a predetermined processing flag, such as "-1". If no business related to the progress query request is found in the business in training or inference, step 205 is executed.
[0061] In steps 205-207, the prequeue is queried. If the relevant information of the service is found in the prequeue, the predetermined identifier of the prequeue is fed back, for example, the queue number i in the prequeue + the length of the training queue can be returned to estimate the next training duration. If the relevant information of the service is not found in the prequeue, step 208 is executed.
[0062] In steps 208-210, the training queue trainqueue is queried. If the relevant information of the service is found in the training queue, the predetermined identifier of the training queue is fed back, for example, the queue number i in the training queue can be returned. If the relevant information of the service is not found in the training queue, step 209 is executed.
[0063] In steps 211-212, the inference queue inferqueue is queried. If relevant information of the service is found in the inference queue, a predetermined identifier of the inference queue is fed back, for example, the queue number i in the inference queue can be returned. In some embodiments, if relevant information of the service cannot be found in the inference queue, an exception is fed back.
[0064] Through the method in the above embodiment, each link of the query business processing can be traversed to ensure that the business can be accurately queried, improve the monitoring ability of the business, provide users with sufficient progress status information, and improve user friendliness.
[0065] Schematic diagrams of some embodiments of the control method for AIGC image generation disclosed in the present invention are as follows Figure 3 As shown in the figure, Step 1 is the trigger point of the business model training phase, and Step 2 is the starting point of the business reasoning phase.
[0066] The master control system receives the data body X of the HTTP business request from the business party, where X includes the user's identity information, several photos or videos of the user (used to train the user's exclusive LoRA), the template information used for reasoning (used to generate the background of the photo), and an indicator of whether training is required.
[0067] Furthermore, according to the request parameters, the traffic is added to the corresponding queue. If the user is using it for the first time and has no LoRA information, it is added to the training queue; if the user already has exclusive LoRA information, it is added to the inference queue.
[0068] For requests that require training, the master control system adds the structure to the end of the training queue. After the algorithm module (Train) processes it, it calls the master control system's interface to return the trained LoRA information, including the training folder, inference folder, and LoRA weight. The master control system is responsible for storing the LoRA information.
[0069] For requests that do not require training and can be directly inferred, the master control system first queries the database to obtain the user's first trained LoRA information, then packages the LoRA information and the information required for inference in a structure, adds it to the inference queue, and calls the master control system's interface to return the generated image after the algorithm module (Infer) completes the inference.
[0070] Finally, the master control system sends the pictures generated by the algorithm to the review API, merges the review results, and sends them to the message queue. The business side consumes the messages in the message queue to obtain the pictures generated by the algorithm.
[0071] In related technologies, multiple algorithm modules need to interact and rely on each other. Algorithm engineers need to implement both the algorithm and the engineering part. The algorithm and engineering are severely coupled, and there is no supporting monitoring and alarm, resulting in a lack of stability guarantee for the entire link. Once a problem occurs online, it involves troubleshooting multiple nodes, making it difficult to quickly locate the problem. Moreover, the capabilities cannot be reused and can only support real-time training under a single business. Subsequent maintenance consumes a lot of extra energy for algorithm engineers.
[0072] The method in the above embodiment can play the role of peak shaving and valley filling, decouple the algorithm and engineering, and ensure the orderliness of requests.
[0073] Schematic diagrams of some embodiments of the control device for AIGC image generation disclosed in the present invention are as follows Figure 4 shown.
[0074] The request receiving unit 401 can obtain a service request, wherein the service request includes reasoning information. When the service request includes a training identifier, a model training request is added to the training queue.
[0075] In some embodiments, the inference information includes user identity information and inference template information. In some embodiments, the user identity information may be information required for inputting a trained model and for the model to generate a picture matching the user. In some embodiments, the inference template information includes information required for inputting a trained model and for the model to generate a picture background. In some embodiments, the acquired business requests may be stored in a front queue, and subsequent steps may be called one by one in a first-in, first-out order.
[0076] In some embodiments, the queue may be a List data type in Redis. The training queue is a first-in-first-out data structure.
[0077] In some embodiments, if the service request includes a training identifier, it may also include training samples, such as photos or videos of the user himself, to improve the compatibility of the trained model with the user himself.
[0078] In some embodiments, the model training request may include training samples for invocation during the training process.
[0079] In some embodiments, the business request can be used as a model training request and added to a training queue so as to associate the trained business model with subsequent reasoning operations to avoid model usage errors during subsequent reasoning processes.
[0080] The training unit 402 can extract the model training request from the training queue according to the queue order. In some embodiments, the sample data can be extracted from the data stored in the training queue to perform the training operation. According to the model training request, the model training is performed by the GPU until the training is completed. According to the information of the trained business model and the reasoning information in the business request corresponding to the business model, the reasoning data is obtained and added to the reasoning queue.
[0081] In some embodiments, the model training can be a fine-tuning operation based on a large model that has been trained. For example, LoRA (Low-Rank Adaption of Large Language Models) is used to fine-tune the large model. In some embodiments, during the training process, the original model is fine-tuned according to the training samples to obtain a business model. Through such a method, while providing users with an adaptive personalized business model, it is possible to reduce the sample demand, improve training efficiency, and thus improve the efficiency of providing services to users.
[0082] In some embodiments, the information of the business model and the reasoning information can be encapsulated in a predetermined structure to form reasoning data. In some embodiments, the information of the business model can include parameter information of the model itself, and can also include storage paths related to the business model, such as the storage path of information associated with model training, or the storage path of information associated with model use (subsequent reasoning process). In some embodiments, the information of the business model includes a training folder of the business model, a reasoning folder, and a low-order adaptive LoRA weight of a large language model.
[0083] The reasoning unit 403 can extract reasoning data from the training queue according to the queue order. In some embodiments, the business model information and reasoning information are extracted from the extracted reasoning data. The reasoning information in the business request corresponding to the business model is processed through the business model to obtain the image generation result. In some embodiments, the business model is determined according to the information of the business model, and the reasoning information is input into the business model to obtain the image generation result.
[0084] Based on the device shown above, the acquisition of business requests and model training are asynchronous operations. By converting the user traffic that flows in at the same time into queues, the device that executes the algorithm training can complete the tasks one by one according to its own processing speed, thereby avoiding service failures caused by insufficient computing power, reducing the requirements for instantaneous computing power, reducing the pressure on hardware devices, and improving the service success rate; it can also achieve the effect of peak-shaving and valley-filling of business requests, and improve the effective utilization of equipment operating resources. In addition, the reasoning process and the training process are also asynchronous operations, which improves the flexibility of reasoning and training.
[0085] In some embodiments, the request receiving unit 401 can also obtain inference data and add the inference data to the inference queue based on the information of the user's historical business model and the inference information in the business request when the business request does not include a training identifier.
[0086] In some embodiments, the historical business model of the user may be a business model generated when the user previously or for the first time issued a business request with a training identifier. In some embodiments, an association relationship may be established between the trained business model and the user, so that when a business request that does not contain a training identifier is received, the corresponding historical business model may be extracted according to the user who issued the business request.
[0087] Since the inference data has been added to the inference queue, when the inference unit 403 extracts the inference data from the training queue according to the queue order, if the inference data is extracted by skipping the training queue and directly added to the inference queue, the historical business model will be used to process the inference information in the business request to obtain the image generation result.
[0088] Based on the device in the embodiment shown above, it is possible to process business requests that do not require model training, improve service efficiency and flexibility, and improve compatibility.
[0089] In some embodiments, Figure 4As shown, the control device for AIGC image generation also includes an output unit 404, which can review the image generation result by calling the review interface. In some embodiments, the master control system calls the review API, sends the image generation result to the review API, and obtains the review result. The image generation result and the review result are combined into a JSON format structure, and the review result is added to the output message queue as one of the fields. Through the interactive export, the image generation result is output in the order of the message queue.
[0090] The device in the embodiment shown above can provide a unified interactive output port, which facilitates centralized management of the algorithm while reducing usage complexity and improving user experience; by using a message queue, the output and the previous step are also asynchronous operations, avoiding mutual influence between different links.
[0091] In some embodiments, Figure 4 As shown, the control device for AIGC image generation also includes a query unit 405, which can obtain a progress query request; query the status information of the corresponding business request according to the progress query request; if the status information is in training or inference, return the corresponding status information; if the status information is not in training and not in processing, query whether the model training request corresponding to the business request is in the training queue; if the model training request corresponding to the business request is in the training queue, return the first queue sequence number information; if the model training request corresponding to the business request is not in the training queue, query whether the inference data corresponding to the business request is in the training queue; if the model training request corresponding to the business request is in the training queue, return the second queue sequence number information. In some embodiments, the query unit 405 can perform the above as follows Figure 2 The method of any of the embodiments shown.
[0092] Based on the device in the embodiment shown above, it is possible to traverse each link of the query service processing, ensure that the service can be accurately queried, improve the monitoring ability of the service, provide users with sufficient progress status information, and improve user friendliness.
[0093] The structural schematic diagram of an embodiment of the control device for AIGC image generation disclosed in the present invention is as follows: Figure 5 As shown. The control device for AIGC image generation includes a memory 501 and a processor 502. Wherein: the memory 501 can be a disk, a flash memory or any other non-volatile storage medium. The memory is used to store the instructions in the corresponding embodiment of the control method for AIGC image generation described above. The processor 502 is coupled to the memory 501 and can be implemented as one or more integrated circuits, such as a microprocessor or a microcontroller. The processor 502 is used to execute the instructions stored in the memory, which can reduce the pressure on the hardware device and improve the service success rate.
[0094] In one embodiment, it is also possible to Figure 6 As shown, the control device 600 for AIGC image generation includes a memory 601 and a processor 602. The processor 602 is coupled to the memory 601 via a BUS 603. The control device 600 for AIGC image generation can also be connected to an external storage device 605 via a storage interface 604 to call external data, and can also be connected to a network or another computer system (not shown) via a network interface 606. No detailed description will be given here.
[0095] In this embodiment, by storing data instructions in a memory and then processing the instructions through a processor, the pressure on the hardware device can be reduced and the service success rate can be improved.
[0096] In another embodiment, a computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the steps of the method in the corresponding embodiment of the control method for AIGC image generation. It should be understood by those skilled in the art that the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transitory storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0097] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0098] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0100] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.
[0101] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0102] It should be noted that the terms "first", "second", etc. in the specification, claims, and drawings of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present disclosure rather than to limit it. Although the present disclosure has been described in detail with reference to the preferred embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present disclosure can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present disclosure, which should be included in the scope of the technical solution for protection of the present disclosure.
Claims
1. A control method for artificial intelligence generated content (AIGC) image generation, comprising: Obtaining a business request, wherein the business request includes reasoning information; In a case where the service request also includes a training identifier, adding a model training request to a training queue; The control method further comprises: Extracting the model training request from the training queue according to the queue order; According to the model training request, the model training is performed by a graphics processing unit (GPU) until the training is completed; Acquire inference data according to information of the trained business model and inference information in the business request corresponding to the business model, and add the inference data to the inference queue; Extracting the inference data from the training queue in queue order; The business model is used to process the inference information in the business request corresponding to the business model to obtain the image generation result.
2. The control method according to claim 1, further comprising: Review the image generation result by calling the review interface; Add the picture generation result and the review result to the output message queue; The image generation result is outputted in the order of the message queue through the interactive exit.
3. The control method according to claim 1, wherein: In the case where the service request includes a training identifier, the service request also includes a training sample; The execution of model training by GPU includes: The original model is fine-tuned according to the training samples to obtain the business model.
4. The control method according to claim 1, wherein: The reasoning information includes user identity information and reasoning template information.
5. The control method according to claim 1, wherein: The information of the business model includes a training folder, an inference folder, and a low-order adaptive LoRA weight of a large language model of the business model.
6. The control method according to claim 1, further comprising: In the case where the service request does not include a training identifier, According to the information of the user's historical business model and the reasoning information in the business request, the reasoning data is obtained, and the reasoning data is added to the reasoning queue; Extracting the inference data from the training queue in queue order; The historical business model is used to process the inference information in the business request and obtain the image generation result.
7. The control method according to claim 1, further comprising: Get progress query request; Querying the status information of the corresponding service request according to the progress query request; If the status information is training or inference, the corresponding status information is returned; If the status information is neither in training nor in processing, query whether the model training request corresponding to the business request is in the training queue; If the model training request corresponding to the business request is in the training queue, the first queue sequence number information is returned; If the model training request corresponding to the business request is not in the training queue, query whether the inference data corresponding to the business request is in the training queue; If the model training request corresponding to the business request is in the training queue, the second queue sequence number information is returned.
8. A control device for generating an AIGC image, comprising: Memory; as well as A processor coupled to the memory, the processor being configured to execute the method according to any one of claims 1 to 7 based on instructions stored in the memory.
9. A non-transitory computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method of any one of claims 1 to 7.
10. A computer program product, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Image generation method, image generation model training method, and related apparatus
WO2026174811A1