Step distillation for potential diffusion model

By retraining and optimizing the stable diffusion model, the computational complexity and privacy issues were resolved, enabling fast text-to-image generation on mobile devices, adapting to various device architectures, and reducing computational resource requirements and latency.

CN121263802APending Publication Date: 2026-01-02SNAP INC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202480034567.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-02-06
Filing Date
2024-05-14
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Traditional text-to-image diffusion models are computationally complex and resource-intensive, making them unsuitable for mobile platforms. Furthermore, they suffer from privacy concerns and long inference times, limiting their widespread application.

Method used

By retraining and optimizing the stable diffusion model, distillation is used to reduce the number of denoising iterations, adapting to various device architectures, and image generation is performed on the client side, reducing computational requirements and latency.

Benefits of technology

It enables fast and efficient text-to-image generation on mobile devices, reduces computational resource requirements, improves latency, solves privacy issues, and expands the application scope of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121263802A_ABST
    Figure CN121263802A_ABST
Patent Text Reader

Abstract

Described is a system for improving a machine learning model by obtaining a first potential diffusion machine learning model, the first potential diffusion machine learning model being trained to perform a first number of de-noising steps; obtaining a second potential diffusion machine learning model obtained from the first potential diffusion machine learning model, wherein the second potential diffusion machine learning model is trained to execute a second number of denoising steps; generating noise data; processing the noise data via a first potential diffusion machine learning model to generate one or more first images; processing the noise data via a second potential diffusion machine learning model to generate one or more second images; and modifying a parameter of the second potential diffusion machine learning model based on a comparison of the one or more first images with the one or more second images.
Need to check novelty before this filing date? Find Prior Art

Description

CLAIM OF PRIORITY

[0001] This application claims the benefit of priority of U.S. Provisional Application Serial No. 63 / 504,563, filed May 26, 2023, and U.S. Patent Application Serial No. 18 / 434,411, filed February 6, 2024, each of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present disclosure relates generally to machine learning models, and more particularly to text-to-image machine learning models. BACKGROUND

[0003] As the growth in popularity of artificial intelligence (AI) increases, companies are using machine learning models in various ways, which is changing the way we process, analyze, and interact with visual data. The use of AI in image processing involves training algorithms, particularly deep learning models like convolutional neural networks (CNNs), to perform tasks ranging from low-level image processing to high-level understanding and generation of visual content. Some prominent applications of AI in images include image classification, object detection, image segmentation, facial recognition, and style transfer. BRIEF DESCRIPTION OF DRAWINGS

[0004] In the drawings, which are not necessarily drawn to scale, like numerals can describe similar components in different views. To easily identify the discussion of any particular element or act, one or more of the highest three digits in a figure number refer to the figure in which that element is first introduced. Some non-limiting examples are illustrated in the drawings, in which:

[0005] Figure 1 is a diagrammatic representation of a networked environment in which the present disclosure can be deployed according to some examples.

[0006] Figure 2 is a diagrammatic representation of an interactive system having both client-side functionality and server-side functionality according to some examples.

[0007] Figure 3 is a diagrammatic representation of a data structure as maintained in a database according to some examples.

[0008] Figure 4 shows an architecture for stabilizing a diffusion model according to some examples.

[0009] Figure 5 shows an example method for improved step distillation for latent diffusion models according to some examples.

[0010] Figure 6 An architecture is shown that applies a derived machine learning model from an original machine learning model and trains the derived machine learning model using the original machine learning model, according to some examples.

[0011] Figure 7 A teacher / student distillation architecture is shown, according to some examples.

[0012] Figure 8 An architecture of a UNet is shown, along with removal of cross-attention blocks.

[0013] Figure 9 Adding machine learning blocks to a machine learning model is shown, according to some examples.

[0014] Figure 10 is a diagrammatic representation of a message, according to some examples.

[0015] Figure 11 A system is shown that includes a head wearable device with a selector input device, according to some examples.

[0016] Figure 12 is a diagrammatic representation of a machine in the form of a computer system, according to some examples, within which a set of instructions can be executed to cause the machine to perform any one or more of the methods discussed herein.

[0017] Figure 13 is a block diagram illustrating a software architecture, within which examples can be implemented.

[0018] Figure 14 A machine learning pipeline is shown, according to some examples.

[0019] Figure 15 Training and use of a machine learning program is shown, according to some examples. DETAILED DESCRIPTION

[0020] Text-to-image machine learning models generate images based on textual descriptions. These models utilize deep learning techniques and are trained on large datasets of paired text and image examples. During the training phase, the model learns the correlation between the textual description and the corresponding image. Once trained, the model is used to generate images based on textual descriptions. The generated images can not be an exact replica of the input description, but capture the essence and key elements described in the text.

[0021] However, traditional text-to-image diffusion models face several challenges. Traditional models are typically large and complex, requiring significant computational resources. These models often involve complex network architectures and a large number of denoising iterations, which increase computational complexity.

[0022] Furthermore, traditional diffusion models are not optimized for personal devices such as mobile phones. The computational demands and complex architecture make the models impractical to run on resource-constrained mobile platforms.

[0023] Another challenge is the high computational cost. Running such models requires high-end graphics processing units (GPUs), and often relies on cloud-based inference, limiting scalability and accessibility.

[0024] Using cloud-based inference also involves sending user data to third-party servers, as sensitive information is exposed to external entities, which raises privacy concerns. Users can be hesitant to share their data, especially when dealing with personal or confidential content.

[0025] Furthermore, the large number of denoising steps in traditional models results in long inference times. This latency hinders real-time applications, interactive experiences, or scenarios that require or expect fast image generation based on textual descriptions.

[0026] Due to the aforementioned challenges, traditional text-to-image diffusion models remain limited to a finite number of platforms that have access to high-end hardware and computing resources. This limits the widespread adoption of these powerful models.

[0027] The example interactive systems described herein apply various modifications to machine learning models that mitigate and / or eliminate the pitfalls of traditional stable diffusion models in the context of text-to-image generation. Some variations involve retraining existing machine learning models, while other variations involve changes to the architecture and functionality of the machine learning models.

[0028] In some cases, the interactive systems retrain a stable diffusion machine learning model that has already been trained to perform iterative denoising. In some cases, the interactive systems employ a distillation process on the stable diffusion machine learning model to reduce the number of denoising iterations. The system identifies an original model that has been trained to generate images based on textual prompts. The system accesses or generates a modified version of the original model (e.g., by modifying specific blocks, nodes, layers, or channels of the model). Both the original model (referred to herein as a teacher model) and the modified model (referred to herein as a student model) are used to process the same input information, but with the original model processing the input information through more iterations. The output of the original teacher model is used as training data for the modified student model. As a result, the student model is fine-tuned to generate images using a lower number of iterative denoising computations, reducing the latency and computational requirements of the model.

[0029] In summary, text-to-image machine learning models have the potential to generate images based on text descriptions, capturing the essence and key elements described in the text. However, traditional stable diffusion models face challenges related to computational complexity, limited platform compatibility, high cost, privacy concerns, and long inference times. The interactive system described in this paper offers a solution to these challenges.

[0030] By retraining and optimizing machine learning models, such as stable diffusion models, the interactive system adapts to the architecture and fine-tunes the model. This results in faster inference, improved latency, reduced computational requirements, and maintained generative performance.

[0031] These advancements enable text-to-image generation across a variety of devices, including mobile platforms. By mitigating the limitations of traditional models, interactive systems pave the way for faster, more efficient, and higher-quality text-to-image generation, allowing users to easily create visual content.

[0032] When taken into account the effects of this disclosure, one or more of the methods described herein can improve known systems by providing additional functionality (such as, but not limited to, the functionality mentioned above), making them easier, faster, or more intuitive to operate, and / or eliminating the need for certain efforts or resources that would otherwise be involved in image generation processing. Thus, computational resources used by one or more machines, databases, or networks can be utilized more efficiently or even reduced.

[0033] Networked computing environment

[0034] Figure 1 This is a block diagram illustrating an example interactive system 100 for facilitating interactions on a network, such as exchanging text messages, making text-to-audio and video calls, or playing games. The interactive system 100 includes a plurality of user systems 102, each of which hosts multiple applications including an interactive client 104 and other applications 106. Each interactive client 104 is communicatively coupled to other instances of the interactive client 104 (e.g., hosted on corresponding other user systems 102), an interactive server system 110, and a third-party server 112 via one or more communication networks including a network 108 (e.g., the Internet). The interactive client 104 may also communicate with the locally hosted applications 106 using an application programming interface (API).

[0035] Each user system 102 may include multiple user devices, such as mobile devices 114, head-mounted wearable devices 116, and computer client devices 118, which can be communicatively connected to exchange data and messages.

[0036] Interactive client 104 interacts with other interactive clients 104 and with interactive server system 110 via network 108. The data exchanged between interactive clients 104 (e.g., interaction 120) and between interactive clients 104 and other interactive server systems 110 includes functions (e.g., commands for activating functions) and payload data (e.g., text, audio, video, or other multimedia data).

[0037] Interactive server system 110 provides server-side functionality to interactive client 104 via network 108. While some functions of interactive system 100 are described herein as being performed by interactive client 104 or interactive server system 110, the location of certain functions—whether within interactive client 104 or interactive server system 110—may be a design choice. For example, it might be technically preferred that specific technologies and functions are initially deployed within interactive server system 110, but later migrated to interactive client 104 of user system 102 with sufficient processing power.

[0038] The interactive server system 110 supports various services and operations provided to the interactive client 104. Such operations include sending data to and receiving data from the interactive client 104, and processing data generated by the interactive client 104. This data may include message content, client device information, geolocation information, media enhancements and overlays, message content persistence conditions, entity relationship information, and live event information. Data exchange within the interactive system 100 is activated and controlled via functions available through the user interface (UI) of the interactive client 104.

[0039] Now, specifically, the interaction server system 110 is used. API server 122 is coupled to interaction server 124 and provides it with a programming interface, making the functionality of interaction server 124 accessible to interaction client 104, other applications 106, and third-party server 112. Interaction server 124 is communicatively coupled to database server 126, thereby facilitating access to database 128, which stores data associated with the interactions processed by interaction server 124. Similarly, web server 130 is coupled to interaction server 124 and provides a web-based interface to interaction server 124. For this purpose, web server 130 handles incoming network requests via Hypertext Transfer Protocol (HTTP) and several other related protocols.

[0040] API server 122 receives and sends interactive data (e.g., command and message payloads) between interactive server 124 and user system 102 (and, for example, interactive client 104 and other applications 106) and third-party server 112. Specifically, API server 122 provides a set of interfaces (e.g., routines and protocols) that interactive client 104 and other applications 106 can call or query to activate the functionality of interactive server 124. API server 122 exposes various functions supported by interactive server 124, including: account registration; login functionality; sending interactive data from one interactive client 104 to another interactive client 104 via interactive server 124; transferring media files (e.g., images or videos) from interactive client 104 to interactive server 124; setting media data sets (e.g., stories); retrieving the friend list of users in user system 102; retrieving messages and content; adding and deleting entities (e.g., friends) against an entity relationship graph (e.g., entity graph 310); locating friends in the entity relationship graph; and opening (e.g., application events associated with interactive client 104).

[0041] Interactive server 124 hosting, see below. Figure 2 The description includes multiple systems and subsystems.

[0042] Application of links

[0043] Returning to interactive client 104, the features and functionalities of the external resource (e.g., a linked application 106 or applet) are available to the user via the interface of interactive client 104. In this context, "external" refers to the fact that application 106 or applet is outside of interactive client 104. External resources are typically provided by third parties, but may also be provided by the creator or provider of interactive client 104. Interactive client 104 receives user selections regarding options for launching or accessing the features of such external resources. External resources may be application 106 installed on user system 102 (e.g., a "local app"), or a smaller version (e.g., a "app") of an application hosted on user system 102 or located remotely on user system 102 (e.g., on a third-party server 112). A smaller version of an application includes a subset of the features and functionalities of the application (e.g., a full-scale local version of the application) and is implemented using markup language documentation. In some examples, a smaller version of an application (e.g., an "app") is a web-based markup language version of the application and is embedded in interactive client 104. In addition to using markup language documentation (e.g., In addition to files, mini-programs can include scripting languages ​​(e.g., Documents or Files) and style sheets (e.g., document).

[0044] In response to receiving a user selection of an option for launching or accessing an external resource, interactive client 104 determines whether the selected external resource is a web-based external resource or a locally installed application 106. In some cases, application 106, locally installed on user system 102, can be launched independently of and separately from interactive client 104, for example, by selecting the icon corresponding to application 106 on the home screen of user system 102. A smaller version of such an application can be launched or accessed via interactive client 104, and in some examples, no part of the smaller application can be accessed outside of interactive client 104, or only a limited portion of the smaller application can be accessed outside of interactive client 104. A smaller application can be launched by receiving, for example, markup language documents associated with the smaller application from third-party server 112 and processing such documents via interactive client 104.

[0045] In response to determining that the external resource is a locally installed application 106, the interactive client 104 instructs the user system 102 to launch the external resource by executing locally stored code corresponding to the external resource. In response to determining that the external resource is a web-based resource, the interactive client 104 communicates with a third-party server 112 (e.g.) to obtain a markup language document corresponding to the selected external resource. The interactive client 104 then processes the obtained markup language document to present the web-based external resource within the user interface of the interactive client 104.

[0046] Interactive client 104 can notify users of user system 102 or other users (e.g., "friends") associated with such users of one or more external resources of ongoing activity. For example, interactive client 104 can provide participants in a conversation (e.g., a chat session) within interactive client 104 with notifications related to external resources currently or recently used by one or more members of a user group. One or more users can be invited to join an active external resource or to activate a recently used but currently inactive external resource (in a friend group). External resources can provide participants in the conversation, each using their respective interactive client 104, with the ability to share items, conditions, states, or locations within the external resource with one or more members of the user group during the chat session. Shared items can be interactive chat cards that chat members can use to interact, for example, to activate the corresponding external resource, view specific information within the external resource, or take chat members to a specific location or state within the external resource. Within a given external resource, response messages can be sent to users on interactive client 104. External resources can selectively include different media items in the response based on the current context of the external resource.

[0047] Interactive client 104 can present a list of available external resources (e.g., application 106 or mini-program) to the user to launch or access a given external resource. This list can be presented as a context-sensitive menu. For example, the icons representing different applications 106 (or mini-programs) can change based on how the user launches the menu (e.g., from a conversational interface or from a non-conversational interface).

[0048] System Architecture

[0049] Figure 2 This is a block diagram illustrating further details of the interactive system 100 according to some examples. Specifically, the interactive system 100 is shown as including an interactive client 104 and an interactive server 124. The interactive system 100 includes multiple subsystems supported on the client side by the interactive client 104 and on the server side by the interactive server 124. In some examples, these subsystems are implemented as microservices. A microservice subsystem (e.g., a microservice application) may have components that enable it to operate independently and communicate with other services. Example components of a microservice subsystem may include:

[0050] Functional logic: Functional logic implements the functions of the microservice subsystem and represents the specific capabilities or functions provided by the microservice.

[0051] API Interface: Microservices can use lightweight protocols such as REST or messaging to communicate with other components through well-defined APIs or interfaces. API interfaces define the inputs and outputs of a microservice subsystem and how it interacts with other microservice subsystems of the interactive system 100.

[0052] Data storage: The microservice subsystem can be responsible for its own data storage, which can be in the form of a database, cache, or other storage mechanism (e.g., using database server 126 and database 128). This allows the microservice subsystem to operate independently of other microservices in the interactive system 100.

[0053] Service discovery: Microservice subsystems can find and communicate with other microservice subsystems of the interacting system 100. The service discovery mechanism enables microservice subsystems to locate and communicate with other microservice subsystems in a scalable and efficient manner.

[0054] Monitoring and logging: It may be necessary to monitor and log microservice subsystems to ensure availability and performance. Monitoring and logging mechanisms enable the tracking of the health and performance of microservice subsystems.

[0055] In some examples, the interactive system 100 may adopt a monolithic architecture, a service-oriented architecture (SOA), a function-as-a-service (FaaS) architecture, or a modular architecture.

[0056] The following discussion focuses on the example subsystem.

[0057] The image processing system 202 provides various functions that enable users to capture and enhance (e.g., annotate or otherwise modify or edit) media content associated with a message.

[0058] The camera device system 204 includes (e.g., in a camera device application) control software that (e.g., directly or via an operating system) interacts with and controls the camera device hardware of the user system 102 to modify and enhance real-time images captured and displayed via the interactive client 104.

[0059] Enhancement system 206 provides functionality related to the generation and distribution of enhancements (e.g., media overlays) for images captured in real-time by the camera device of user system 102 or retrieved from the memory of user system 102. For example, enhancement system 206 is operable to select, present, and display media overlays (e.g., image filters or image lenses) to interactive client 104 for enhancing real-time images received via camera device system 204 or stored images retrieved from memory 1102 of user system 102. These enhancements are selected by enhancement system 206 and presented to the user of interactive client 104 based on a plurality of inputs and data, such as:

[0060] The geographical location of user system 102; and

[0061] User entity relationship information of users in user system 102.

[0062] Enhancements may include audio and visual content and visual effects. Examples of audio and visual content include images, text, logos, animations, and sound effects. Examples of visual effects include color overlays. Audio and visual content or visual effects may be applied to media content items (e.g., photos or videos) at user system 102 for transmission in messages, or to video content such as video content streams or feeds sent from interactive client 104. Therefore, image processing system 202 can interact with and support various subsystems of communication system 208, such as messaging system 210 and video communication system 212.

[0063] Media overlays may include text or image data that can be superimposed on photographs taken by user system 102 or video streams produced by user system 102. In some examples, media overlays may be location overlays (e.g., Venice Beach), names of live events, or names of businesses (e.g., beach cafes). In other examples, image processing system 202 uses the geographic location of user system 102 to identify media overlays that include the names of businesses located at the geographic location of user system 102. Media overlays may include additional tags associated with businesses. Media overlays may be stored in database 128 and accessed through database server 126.

[0064] Image processing system 202 provides a user-based publishing platform that allows users to select geographical locations on a map and upload content associated with those locations. Users can also specify which media overlays should be provided to other users. Image processing system 202 generates a media overlay that includes the uploaded content and associates it with the selected geographical location.

[0065] The augmented reality creation system 214 supports augmented reality developer platforms and includes applications for content creators (e.g., artists and developers) to create and publish interactive clients 104, such as augmented reality experiences. The augmented reality creation system 214 provides content creators with a library of built-in features and tools, including, for example, custom shaders, tracking technologies, and templates.

[0066] In some examples, enhancement creation system 214 provides a merchant-based publishing platform that allows merchants to select specific enhancements associated with geographic locations via bidding. For instance, enhancement creation system 214 associates the media overlay of the highest-bidding merchant with a corresponding geographic location for a predefined amount of time.

[0067] Communication system 208 is responsible for enabling and processing various forms of communication and interaction within interactive system 100, and includes messaging system 210, audio communication system 216, and video communication system 212. Messaging system 210 is responsible for enabling temporary or time-limited access to content by interactive client 104. Messaging system 210 includes (e.g., within a short-duration timer system) multiple timers that selectively enable access (e.g., for presentation and display) of messages and associated content via interactive client 104 based on duration and display parameters associated with a message or set of messages (e.g., a story). Audio communication system 216 enables and supports audio communication (e.g., real-time audio chat) between multiple interactive clients 104. Similarly, video communication system 212 enables and supports video communication (e.g., real-time video chat) between multiple interactive clients 104.

[0068] User management system 218 is operationally responsible for managing user data and profiles, and maintaining entity information about users of interactive system 100 and the relationships between users (e.g., stored in entity table 308, entity diagram 310, and profile data 302).

[0069] The collection management system 220 is operationally responsible for managing collections or sets of media (e.g., collections of text, images, video, and audio data). Collections of content (e.g., messages, including images, videos, text, and audio) can be organized into “event libraries” or “event stories.” Such collections can be made available for a specified time period (e.g., the duration of the event to which the content relates). For example, content related to a concert can be available as a “story” for the duration of the concert. The collection management system 220 can also be responsible for publishing icons that notify the user interface of the interactive client 104 of the availability of specific collections. The collection management system 220 includes curation functions that enable collection managers to manage and curate specific content collections. For example, a curation interface enables event organizers to curate collections of content related to a specific event (e.g., removing inappropriate content or redundant messages). Additionally, the collection management system 220 employs machine vision (or image recognition technology) and content rules to automatically curate content collections. In some examples, users may be compensated for including user-generated content in a collection. In such cases, the collection management system 220 operates to automatically pay such users for using their content.

[0070] Map system 222 provides various geolocation (e.g., geographic location) functions and supports the presentation of map-based media content and messages by interactive client 104. For example, map system 222 enables the display (e.g., stored in profile data 302) of user icons or avatars on a map to indicate the current or past locations of the user's "friends" within the context of the map, as well as media content generated by these friends (e.g., a collection of messages including photos and videos). For example, on the map interface of interactive client 104, messages posted by a user from a specific geographic location to interactive system 100 can be displayed to the specific user's "friends" within the context of the map at that specific location. Users can also share their location and status information with other users of interactive system 100 via interactive client 104 (e.g., using an appropriate status avatar), where the location and status information is similarly displayed to selected users within the context of the map interface of interactive client 104.

[0071] Game system 224 provides various game functions within the context of interactive client 104. Interactive client 104 provides a game interface that offers a list of available games that can be initiated by a user within the context of interactive client 104 and played with other users of interactive system 100. Interactive system 100 also enables specific users to invite other users to participate in specific games by sending invitations from interactive client 104. Interactive client 104 also supports sending and receiving voice, video, and text messages (e.g., chat) within the context of playing the game, provides leaderboards for the game, and also supports providing in-game rewards (e.g., game currency and items).

[0072] External resource system 226 provides interactive client 104 with an interface to communicate with remote servers (e.g., third-party server 112) to launch or access external resources (i.e., applications or applets). Each third-party server 112 hosts applications or smaller versions of applications (e.g., game applications, utility applications, payment applications, or ride-sharing applications) based on markup languages ​​(e.g., HTML5). Interactive client 104 can launch web-based resources (e.g., applications) by accessing HTML5 files from the third-party server 112 associated with the web-based resource. The application hosted by third-party server 112 is programmed in JavaScript using a software development kit (SDK) provided by interactive server 124. The SDK includes APIs with functionality that can be called or activated by the web-based application. Interactive server 124 hosts a JavaScript library that provides access to a given external resource for specific user data of interactive client 104. HTML5 is an example of a technology for programming games, but applications and resources programmed using other technologies can be used.

[0073] To integrate the SDK's functionality into the web-based resource, the third-party server 112 downloads the SDK from the interactive server 124, or the third-party server 112 otherwise receives the SDK. Once downloaded or received, the SDK is included as part of the application code of the web-based external resource. The code of the web-based resource can then call or activate certain functions of the SDK to integrate the features of the interactive client 104 into the web-based resource.

[0074] The SDK stored on the interactive server system 110 effectively bridges the gap between external resources (e.g., application 106 or applet) and the interactive client 104. This provides users with a seamless experience communicating with other users on the interactive client 104 while preserving the appearance of the interactive client 104. To bridge communication between the external resources and the interactive client 104, the SDK facilitates communication between the third-party server 112 and the interactive client 104. A bridging script running on the user system 102 establishes two unidirectional communication channels between the external resources and the interactive client 104. Messages are sent asynchronously between the external resources and the interactive client 104 via these communication channels. Each SDK function activation is sent as a message and callback. Each SDK function is implemented by constructing a unique callback identifier and sending a message with that callback identifier.

[0075] By using the SDK, not all information from the interactive client 104 is shared with the third-party server 112. The SDK limits which information is shared based on the needs of the external resources. Each third-party server 112 provides the interactive server 124 with an HTML5 file corresponding to the web-based external resource. The interactive server 124 can add a visual representation (e.g., box design or other graphics) of the web-based external resource to the interactive client 104. Once the user selects the visual representation or instructs the interactive client 104 to access the features of the web-based external resource through the graphical user interface (GUI), the interactive client 104 obtains the HTML5 file and instantiates the resource for accessing the features of the web-based external resource.

[0076] Interactive client 104 presents a graphical user interface (GUI) for an external resource (e.g., a login page or title screen). During, before, or after presenting the login page or title screen, interactive client 104 determines whether the initiated external resource has previously been authorized to access user data of interactive client 104. In response to determining that the initiated external resource has previously been authorized to access user data of interactive client 104, interactive client 104 presents another GUI of the external resource, including its functionality and characteristics. In response to determining that the initiated external resource has not previously been authorized to access user data of interactive client 104, after displaying the login page or title screen of the external resource for a threshold time period (e.g., 3 seconds), interactive client 104 slides up a menu (e.g., animates the menu to appear from the bottom of the screen to the middle of the screen or other parts) to authorize the external resource to access user data. This menu identifies the type of user data that the external resource will be authorized to use. In response to receiving a user selection of the accept option, interactive client 104 adds the external resource to the list of authorized external resources and allows the external resource to access user data from interactive client 104. External resources are authorized by the interactive client 104 to access user data under the OAuth 2 framework.

[0077] Interactive client 104 controls the type of user data shared with external resources based on the type of authorized external resource. For example, access to a first type of user data (e.g., a two-dimensional avatar of a user with or without different avatar characteristics) is provided to external resources including full-scale applications (e.g., application 106). As another example, access to a second type of user data (e.g., payment information, a user's two-dimensional avatar, a user's three-dimensional avatar, and avatars with various avatar characteristics) is provided to external resources including smaller versions of the application (e.g., a web-based version of the application). Avatar characteristics include different ways of customizing the appearance of the avatar (e.g., different poses, facial features, clothing, etc.).

[0078] The advertising system 228 is operationally designed to enable third parties to purchase advertisements for presentation to end users via the interactive client 104, and also handles the delivery and presentation of these advertisements.

[0079] Artificial intelligence and machine learning system 230 provides various services to different subsystems within interaction system 100. For example, AI and machine learning system 230 operates in conjunction with image processing system 202 and camera device system 204 to analyze images and extract information such as objects, text, or faces. Image processing system 202 can then use this information to enhance, filter, or manipulate images. Enhancement system 206 can use AI and machine learning system 230 to generate enhanced content and augmented reality experiences, such as adding virtual objects or animations to real-world images. Communication system 208 and messaging system 210 can use AI and machine learning system 230 to analyze communication patterns and provide insights into how users interact with each other, and provide intelligent message classification and tagging, such as classifying messages based on sentiment or topic. AI and machine learning system 230 can also provide chatbot functionality for messaging interactions 120 between user systems 102 and between user systems 102 and interaction server system 110. The artificial intelligence and machine learning system 230 can also work with the audio communication system 216 to provide speech recognition and natural language processing capabilities, enabling users to interact with the interactive system 100 using voice commands.

[0080] Data Architecture

[0081] Figure 3 This is a schematic diagram illustrating a data structure 300 that can be stored in a database 304 of an interactive server system 110, according to certain examples. Although the contents of the database 304 are shown as including multiple tables, it should be understood that data can be stored in other types of data structures, such as object-oriented databases.

[0082] Database 304 includes message data stored in message table 306. For any given message, this message data includes at least message sender data, message receiver (or recipient) data, and a payload. See below for reference. Figure 3 Further details are provided regarding information that can be included in the message and is contained within the message data stored in message table 306.

[0083] Entity table 308 stores entity data and is linked (e.g., by reference) to entity diagram 310 and profile data 302. Entities for which records are maintained in entity table 308 can include individuals, company entities, organizations, objects, locations, events, etc. Regardless of the entity type, any entity for which the interactive server system 110 stores data can be an identifiable entity. Each entity is assigned a unique identifier and an entity type identifier (not shown).

[0084] Entity Graph 310 stores information about relationships and associations between entities. As an example only, such relationships can be social, professional (e.g., working in a common company or organization), interest-based, or activity-based. Some relationships between entities can be one-way, such as an individual user subscribing to digital content from a business or publishing user (e.g., a newspaper or other digital media channel or brand). Other relationships can be two-way, such as a "friendship" between individual users of Interactive System 100. A friendship can be established through mutual agreement between two entities. This mutual agreement can be established by the first entity extending an invitation to the second entity to establish a friendship, and the second entity accepting the invitation.

[0085] Profile data 302 stores various types of profile data about a specific entity. Based on privacy settings specified by the specific entity, profile data 302 can be selectively used and presented to other users of the interaction system 100. In the case of an individual, profile data 302 includes, for example, the user's name, phone number, address, settings (e.g., notification and privacy settings), and an avatar representation (or a set of such avatar representations) selected by the user. A specific user can then selectively include one or more of these avatar representations within the content of messages transmitted via the interaction system 100 and on a map interface displayed to other users by the interaction client 104. The set of avatar representations may include "status avatars," which present a graphical representation of a status or activity that the user can choose to transmit at a specific time.

[0086] In the case that the entity is a group, in addition to the group name, members and various settings for the relevant group (e.g., notifications), the profile data 302 for the group may similarly include one or more avatars associated with the group.

[0087] Database 304 also stores enhancement data, such as overlays or filters, in enhancement table 312. Enhancement data is associated with and applied to videos (video data is stored in video table 314) and images (image data is stored in image table 316).

[0088] In some examples, filters are displayed as overlays on images or videos during presentation to the receiving user. Filters can be of various types, including filters selected by the user from a set of filters presented to the sending user by the interactive client 104 while the sending user is composing a message. Other types of filters include geolocation filters (also known as geographic filters), which can be presented to the sending user based on geographic location. For example, geolocation filters specific to nearby or particular locations can be presented by the interactive client 104 within the user interface based on geographic location information determined by the Global Positioning System (GPS) unit of the user system 102.

[0089] Another type of filter is a data filter, which can be selectively presented to the sending user by the interactive client 104 based on other inputs or information collected by the user system 102 during message creation processing. Examples of data filters include the current temperature at a specific location, the sending user's current speed, the battery life of the user system 102, or the current time.

[0090] Other augmented data that can be stored in image table 316 includes augmented reality content items (e.g., corresponding to an application "lens" or augmented reality experience). Augmented reality content items can be real-time special effects and sounds that can be added to images or videos.

[0091] As described above, augmented data includes augmented reality content items, overlays, image transformations, AR images, and similar terms refer to modifications that can be applied to image data (e.g., video or images). This includes real-time modifications that modify images as they are captured by the device sensors (e.g., one or more cameras) of user system 102, and then display the modified image on the screen of user system 102. This also includes modifications to stored content (e.g., video clips in a collection or group that can be modified). For example, in user system 102 where multiple augmented reality content items are available, a user can use a single video clip with multiple augmented reality content items to see how different augmented reality content items will modify the stored clip. Similarly, real-time video capture can be modified to show how the video image currently captured by the sensors of user system 102 will modify the captured data. Such data can simply be displayed on the screen without being stored in memory, or the content captured by the device sensors can be recorded and stored in memory with or without modification (or both). In some systems, a preview feature can simultaneously show how different augmented reality content items will look in different windows on the display. This can, for example, make it possible to view multiple windows with different pseudo-random animations on a monitor simultaneously.

[0092] Therefore, using augmented reality content items or other such transformation systems to modify content data and various systems can involve: detecting objects (e.g., faces, hands, bodies, cats, dogs, surfaces, objects, etc.) in video frames; tracking such objects as they leave, enter, and move around within the field of view; and modifying or transforming such objects while tracking them. In various examples, different methods can be used to implement such transformations. Some examples may involve: generating a 3D mesh model of one or more objects; and using transformations of the model and animated textures within the video to implement the transformation. In some examples, tracking points on the object can be used to place an image or texture (which can be two-dimensional or three-dimensional) at the tracked location. In yet another example, neural network analysis of video frames can be used to place images, models, or textures within content (e.g., images or video frames). Therefore, augmented reality content items refer both to the images, models, and textures used to create transformations within content and to the additional modeling and analysis information required to implement such transformations using object detection, tracking, and placement.

[0093] Real-time video processing can be performed using any type of video data (e.g., video streams, video files, etc.) stored in the memory of any type of computerized system. For example, a user can load video files and store them in the device's memory, or the device's sensors can be used to generate video streams. Additionally, computer-animated models can be used to process any object, such as a human face and body parts, animals, or inanimate objects (e.g., chairs, cars, or other objects).

[0094] In some examples, when a specific modification is selected along with the content to be transformed, the element to be transformed is identified by the computing device, and then, if the element to be transformed exists in a frame of the video, the element to be transformed is detected and tracked. The elements of the object are modified according to the modification request, thereby transforming the frames of the video stream. For different kinds of transformations, the frames of the video stream can be transformed using different methods. For example, for frame transformations that primarily involve changing the form of elements of an object, characteristic points of each element of the object are calculated. Then, a characteristic point-based mesh is generated for each element of the object. This mesh is used in subsequent stages of tracking the elements of the object in the video stream. During the tracking process, the mesh for each element is aligned with the position of each element. Then, additional points are generated on the mesh.

[0095] In some examples, transformations that alter certain regions of an object using its elements can be performed by calculating characteristic points for each element of the object and generating a mesh based on those calculated characteristic points. Points are generated on the mesh, and then various regions are generated based on these points. The elements of the object are then tracked by aligning the regions of each element with the positions of at least one of the elements, and the properties of the regions can be modified based on modification requests, thereby transforming frames of the video stream. Depending on the specific modification request, the properties of the mentioned regions can be transformed in different ways. Such modifications can involve: changing the color of the region; removing portions of the region from frames of the video stream; including new objects in regions based on modification requests; and modifying or distorting elements of the region or object. In various examples, any combination of such modifications or other similar modifications can be used. For certain models to be animated, some characteristic points can be selected as control points to determine the entire state space of options for model animation. In some examples of computer animation models that use face detection to transform image data, specific face detection algorithms (e.g., Viola-Jones) are used to detect faces in the images. Then, the Active Shape Model (ASM) algorithm is applied to the facial region of the image to detect facial feature reference points.

[0096] Other methods and algorithms suitable for face detection can be used. For example, in some examples, landmarks are used to locate features, which represent distinguishable points present in most of the images considered. For example, for a face landmark, the location of the left pupil could be used. If the initial landmark is not recognizable (e.g., if the person is wearing an eye patch), auxiliary landmarks can be used. Such a landmark identification process can be used for any such object. In some examples, a set of landmarks forms a shape. The shape can be represented as a vector using the coordinates of the points in the shape. One shape is aligned with another shape using a similarity transformation that minimizes the average Euclidean distance between the points of the shape (which allows for translation, scaling, and rotation). The meanshape is the average of the aligned training shapes.

[0097] This system can capture image or video streams on a client device (e.g., user system 102) and perform complex image manipulations locally on user system 102 while maintaining an appropriate user experience, computation time, and power consumption. Complex image manipulations can include size and shape changes, mood shifts (e.g., changing a face from frowning to smiling), state shifts (e.g., aging a subject, reducing apparent age, changing gender), style shifts, application of graphical elements, and any other suitable image or video manipulations implemented through a convolutional neural network that has been configured to execute efficiently on user system 102.

[0098] In some examples, a system operating within an interactive client 104 determines the presence of faces within an image or video stream and provides modification icons associated with a computer-animated model for transforming the image data, or the computer-animated model may exist in association with the interface described herein. The system can implement sophisticated convolutional neural networks on a portion of the image or video stream to generate and apply the selected modifications. That is, the user can capture an image or video stream, and once a modification icon is selected, the modified result can be presented to the user in real-time or near real-time. Furthermore, the modifications can be persistent while a video stream is being captured and the selected modification icon remains enabled. Machine-trained neural networks can be used to implement such modifications.

[0099] Collection table 318 stores data about collections of messages and associated image, video, or audio data, compiled into collections (e.g., stories or galleries). The creation of a specific collection can be initiated by a specific user (e.g., each user for whom records are maintained in entity table 308). A user can create a "personal story" in the form of a collection of content created and sent / broadcast by that user. For this purpose, the user interface of interactive client 104 may include user-selectable icons, enabling the sending user to add specific content to his or her personal story.

[0100] The collection can also constitute a "live story," which is a collection of content from multiple users created manually, automatically, or using a combination of manual and automatic techniques. For example, a "live story" can constitute a curated stream of user-submitted content from different locations and events. Users whose client devices have location services enabled and who are at a common location event at a specific time can be presented with the option to contribute content to a specific live story, for example, via the user interface of interactive client 104. Live stories can be identified to a user by interactive client 104 based on their location. The end result is a "live story" told from a collective perspective.

[0101] Another type of content collection is called a "location story," which allows users of user system 102 located in a specific geographic location (e.g., on a college or university campus) to contribute to a specific collection. In some examples, contributions to a location story may employ secondary authentication to verify that the end user belongs to a specific organization or other entity (e.g., is a student on a university campus).

[0102] As mentioned above, video table 314 stores video data, which in some examples is associated with messages for which records are maintained within message table 306. Similarly, image table 316 stores image data associated with messages whose message data is stored in entity table 308. Entity table 308 can associate various enhancements from enhancement table 312 with various images and videos stored in image table 316 and video table 314.

[0103] Overview

[0104] Text-to-image diffusion models create images comparable to those of professional artists and photographers based on natural language descriptions. However, these traditional models are large, have complex network architectures, and require multiple denoising iterations, making them computationally expensive and slow. Therefore, high-end GPUs and cloud-based inference are needed to run diffusion models at scale. This approach is costly and has privacy implications, especially when user data is sent to third parties.

[0105] To overcome these challenges, the interactive system described in this paper modifies and / or retrains existing traditional models to mitigate and / or eliminate these pitfalls by introducing efficient network architectures and improving step distillation. In some cases, the interactive system enhances step distillation by exploring training strategies and introducing regularization derived from classifier-free guidance.

[0106] Diffusion-based text-to-image models have shown significant progress in synthesizing photorealistic content using text cues. These models have greatly impacted content creation, image editing and restoration, super-resolution, video compositing, 3D asset generation, and more. However, this impact comes at the cost of a substantial increase in the computational demands of running such models. Therefore, to meet the necessary latency constraints, large-scale cloud-based inference platforms with high-end GPUs are required. This leads to high costs and potential privacy concerns simply because private images, videos, and cues are sent to third-party services.

[0107] New efforts are underway to accelerate inference processing for text-to-image diffusion models on mobile devices. Recent work has employed quantization or GPU-aware optimizations to reduce runtime. While these methods effectively achieve some speedup on mobile platforms, latency cannot ensure a seamless user experience. Furthermore, existing research has not systematically examined the generated quality of models on-device through quantitative analysis.

[0108] In some cases, interactive systems employ text-to-image diffusion models to generate images on mobile devices in a very short time (e.g., less than 2 seconds). These models improve the slow inference speed of UNet (described separately in this paper) and reduce the number of necessary denoising steps.

[0109] First, the interactive system explores training strategies for stepwise distillation, such as identifying the optimal teacher model for training student models on the device. These models can then generate 512×512 images based on text on the mobile device in less than 2 seconds, with image quality similar to the original stable diffusion model. The interactive system improves the learning objective during stepwise distillation by proposing additional regularization, which includes losses from v prediction and classifier-free guidance.

[0110] The interactive system described in this paper includes several contributions to addressing the aforementioned challenges. The interactive system analyzes the importance of each block in the UNet architecture and identifies redundant blocks. The interactive system develops a framework for training and retraining such models to achieve UNet performance similar to the original stable diffusion model while maintaining significantly faster efficiency.

[0111] Stable diffusion model

[0112] The diffusion model gradually shifts the sample x from the true data distribution The model transforms the data into a noisy version (e.g., diffusion processing) and learns to reverse this processing by progressively denoising the noisy data. The model transforms simple distributions (e.g., random Gaussian noise) into more complex distributions (e.g., realistic images). Specifically, given a given... The parameterized model is typically structured as a UNet (noise prediction) diffusion model. Training can be formulated as the following noise prediction problem:

[0113]

[0114] Where t refers to the time step; This refers to true noise; This is noise data; and These are the signal and noise strengths, determined by the noise scheduler. The trained diffusion model generates samples based on noise using various samplers. For example, DDIM is used to generate samples with a time step from t to the previous time step. The following iterative denoising process is used for sampling:

[0115]

[0116] Where z t′ Will be fed back to In the middle, until It becomes 0 (for example, the noise reduction process ends).

[0117] Potential diffusion model

[0118] The interactive system employs a Latent Diffusion Model (LDM). Such an LDM reduces inference computation and steps by performing denoising in the latent space. The latent space is encoded by a pre-trained variational autoencoder (VAE).

[0119] During inference, an image is constructed from latent features via a decoder. LDM also performs text-to-image generation, where a textual cue embedded in c is fed as a condition into the diffusion model.

[0120] When synthesizing images, the interactive system applies classifier-free guidance to improve quality, for example by applying the following formula:

[0121]

[0122] in, This indicates that the text is empty. The obtained unconditional output. The guiding scale w is adjusted to control the intensity of conditional information about the generated images, thus achieving a trade-off between quality and diversity. The LDM is also trained on a large-scale dataset, providing a range of stable diffusion models.

[0123] Architecture for potential text-to-image diffusion models

[0124] Figure 4 An architecture 400 for a stable diffusion model is shown, based on some examples. In architecture 400, an interactive client 104 inputs a prompt 424 into the potential diffusion model. The prompt 424 is processed by a visual Transformer (ViT) 426.

[0125] The interactive client 104 includes a user interface or application that enables a user to input text prompts 424. The prompts 424 include text input by the user describing the desired image features, such as “a cute puppy sitting in a field.”

[0126] The prompts for identifying the first user include receiving a question or request from the first user via text or voice. The interactive client 104 identifies keywords from the prompts and applies a weight to each of the identified keywords. The interactive client 104 then applies the identified keywords and their corresponding weights to a machine learning model.

[0127] In some examples, interactive client 104 automatically generates prompts for a first user based on intents identified from real-time interaction data captured by a first interactive client. Interactive client 104 generates prompts for the user based on the user's past activities, interests, and behavioral patterns. Interactive client 104 generates personalized prompts related to topics the user might find appealing, such as when the user frequently interacts with a particular type of technology-related content.

[0128] In some examples, the interactive client 104 uses popular or trending topics from the platform or the wider internet to create cues that may be of interest to a broad audience. In some examples, by leveraging the user's geographic location, the interactive client 104 can generate cues relevant to their local area, such as events, news, or cultural topics. In some examples, the interactive client 104 can create cues based on the time of day, season, or upcoming events or holidays (e.g., time-sensitive events). In some examples, the interactive client 104 can use the user's social relationships to generate cues relevant to their friends, family, or other users they follow, such as birthdays or new relationships with other users. In some examples, based on the user's activity within a specific app or AR experience, the interactive client 104 can generate cues relevant to that context.

[0129] In some examples, the interactive client 104 can use user actions within the app (such as liking, commenting, and sharing) to generate cues relevant to their interests. For example, if a user frequently interacts with cooking-related content in a recipe app, the interactive client 104 can generate cues about the user's favorite dishes to prepare at home. In some examples, the interactive client 104 creates context-aware cues based on its physical environment by utilizing sensors and data from the user's mobile device or AR headset. In some examples, the interactive client 104 can generate cues based on real-time events occurring within the app or AR experience (such as real-time streaming events). In some examples, real-time interaction data includes current camera feeds from the camera system of the first interactive client 104.

[0130] In some examples, the interactive client 104 uses the user's past activities, preferences, and behavioral patterns within the application or AR experience to generate cues tailored to the user. In some examples, the interactive client 104 collects user profile information (such as an appointment calendar or objects detected in the camera feed of the AR device) to generate cues. In some examples, by incorporating gamification elements, the interactive client 104 creates cues that encourage user engagement and participation, such as checking features within a game.

[0131] Figure 4 It is described as being performed or applied by certain systems, such as a specific machine learning model (e.g., a stable diffusion model), but the processing described herein can be performed by one or more other or the same machine learning model, computer vision model, other models, or combinations thereof.

[0132] In the visual cueing Transformer ViT, text cues are transformed into features in the latent space. The interactive client 104 uses ViT to encode text instructions into representations that can be understood by the stable diffusion model.

[0133] In some cases, the ViT architecture includes a text encoder. To transform text cues into features in the latent space, the text encoder utilizes one or more techniques, such as tokenizing the text cues into sub-word units or individual lexical units, and then maps them to embedding vectors. These embeddings capture the semantic and contextual information of the text. The text encoder then applies a transformer layer to refine the embeddings and generate a representation in the latent space specific to the provided text cues.

[0134] Stable diffusion models are probabilistic generative models used for machine learning tasks such as image generation and denoising. ViT is a specific type of neural network architecture designed for computer vision tasks, and ViT is particularly well-suited for processing visual data. While the examples described in this paper illustrate features applied to ViT, it is to be understood that such features can be applied to other transformer-based architectures (e.g., in stable diffusion models, such as for different types of data or tasks).

[0135] In some cases, a text transformer, pre-trained on text data for natural language understanding and generation tasks, is used. In others, an audio transformer, suitable for audio processing and trained to handle audio signals, is used for speech recognition and generation tasks. Finally, when processing structured data represented as graphs, a graph transformer is used to model the relationships between nodes in the graph.

[0136] In some cases, time series transformers are used for time series data to efficiently process sequential data and capture temporal dependencies within the data. In others, multimodal transformers are used that can process and integrate information from different sources. Still others involve using custom transformers as custom-designed transformer architectures tailored to specific needs, adjusting the model's architecture, attention mechanisms, and input embeddings to suit the application.

[0137] The stable diffusion model controls image generation based on text instructions by converting text cues into features in the latent space. The stable diffusion model comprises an input layer 438 and an iterative denoising process 416. The input layer 406 feeds random noise into the iterative denoising process 416.

[0138] The input layer is the part of the model responsible for receiving random noise. Random noise is essentially a source of randomness introduced into the model. This noise is important because it enables diversity in the generated output. Noise acts as some randomness in the generation process, ensuring that the stable diffusion model does not generate the same output every time the same text prompt is used.

[0139] Iterative denoising in a stable diffusion model is a multi-step process where the model progressively refines random noise and text-based latent features to generate a high-quality image. This process typically involves multiple iterations or steps, where the model gradually enhances the initial random noise and latent features derived from the text prompt. At each step, the resulting image becomes sharper and more faithful to the provided text instruction.

[0140] The stable diffusion model operates in two main phases: forward diffusion and backward diffusion. These phases are designed to control the generation and quality of the image. The forward diffusion phase is the initial step and begins with the existing input image.

[0141] In the forward diffusion stage, the input image (e.g., input image 402) is processed by an encoder (e.g., encoder 404). The encoder processes the image to extract meaningful features from the input image and represents these meaningful features in a lower-dimensional latent space. This latent space representation contains basic information about the content and characteristics of the image.

[0142] After the input image is encoded, the features extracted from the image are then fed into input layer 406. At this stage, the model begins to gradually introduce random noise into the latent features. The introduction of noise is a key aspect of the diffusion process.

[0143] The introduction of noise is gradual and controlled. Noise is introduced starting with a small amount and gradually increased. As the noise level rises, the latent features representing the image become less informative and more random. This is a deliberate and systematic process designed to transform encoded image features into a completely random state.

[0144] These features are fed into input layer 406, where noise is gradually introduced until the image becomes completely random noise. The forward diffusion phase continues until the latent features initially representing the input image evolve into a state of completely random noise. Essentially, during this process, the input image is "diffused" into randomness. The image gradually loses its original content and structure. The noisy image is sent to buffer 408, and noise is repeatedly added or the final noisy image is sent to buffer 410 for denoising.

[0145] In the reverse processing, the interactive client 104 gradually removes predicted noise to recover feature data via an iterative denoising process 416. The iterative denoising process 416 includes an input layer 412, a UNet 414, a Denoising Diffusion Implicit Model (DDIM) scheduler 434, and an output layer 436. The reverse processing of the stable diffusion model recovers meaningful feature data from the random noise introduced in the forward diffusion stage. This is achieved through iterative denoising.

[0146] The denoising process 416 is iteratively repeated by processing the data from input layer 412 through UNet 414 to output layer 436. The DDIM scheduler 434 schedules the denoising iterations. The denoising process is repeated by updating time t. This process is repeated several times to gradually remove predicted noise and recover original or meaningful features from the data.

[0147] The iterative denoising process begins with the input layer (412). Here, data from the forward diffusion stage (which includes random noise and any available information) is provided as input to initiate the denoising process. UNet comprises a neural network architecture commonly used for image segmentation and reconstruction tasks. In the context of reverse processing, UNet 414 is employed to help reconstruct meaningful feature data from the noisy input.

[0148] The DDIM scheduler coordinates the iteration of denoising processing by controlling the timing and frequency of the denoising steps. The DDIM scheduler guides the denoising process in a stable diffusion model.

[0149] After processing the data through UNet and other components, the stable diffusion model generates and / or outputs denoised or restored feature data at output layer 436. As the iterative denoising process continues, the output at this stage gradually becomes more refined and closer to the original input.

[0150] The denoising process is repeated by updating a parameter representing time (denoted as "t"). This time update allows the model to control the speed and depth of denoising in each iteration, ensuring the gradual and controlled recovery of meaningful features.

[0151] Reverse processing essentially counteracts forward diffusion by removing introduced noise and recovering the original or meaningful data. This is achieved through iterative and controlled denoising processes coordinated by the DDIM scheduler, where UNet plays a crucial role in feature recovery. This entire process ensures that the model can generate high-quality and controlled outputs, even starting from random states.

[0152] Once multiple iterations of denoising processing 416 are completed, the features are output from the output layer 436 and fed into the decoder 418. The decoder is trained to receive the features as input and make predictions 420, such as generating an image 440 corresponding to the received features.

[0153] In the stable diffusion model, UNet 414 is a key component used in the image decoder 418. UNet is a type of convolutional neural network (CNN) architecture used for tasks such as image segmentation and image-to-image translation.

[0154] The UNet architecture comprises an encoder-decoder structure with a downsampler 432, intermediate layers 430, and an upsampler 428. The downsampler 432 performs a downsampling operation, reducing the spatial dimensionality of the input image while increasing the number of feature channels. This process extracts hierarchical and abstract features from the input image. Each downsampling layer in the encoder is connected to a corresponding layer in the intermediate layer 430 and the upsampler 428.

[0155] The upsampler 428 portion of UNet 414 performs the upsampling operation to reconstruct features in the latent space by upsampling the encoded features. The VAE decoder 418 combines these features with skip connections to recover spatial details and generate a high-resolution output image. Skip connections help preserve fine-grained details by providing additional contextual information to the decoder layer.

[0156] The time-conditional (t) UNet 414 includes machine learning model blocks such as cross-attention blocks and ResNet blocks. A cross-attention mechanism is employed at each stage to integrate the text embeddings (c) into the spatial features:

[0157] ,

[0158] Where Q is from the noise data z t The projections K and V are conditionally projected from the text, and d is the feature dimension. UNet also uses ResNet blocks to capture locality. The forward propagation of UNet is:

[0159]

[0160] Although the examples described in this paper apply features to UNet, cross-attention blocks, ResNet blocks, and / or combinations thereof, it should be understood that such features are applicable to other parts of machine learning models, stable diffusion models, other types of models that process images or text, etc.

[0161] In some cases, the features described in this paper are applicable to U-Net++, an extension of the UNet architecture that addresses vanishing gradients and uses nested skip paths to more effectively capture multi-scale features. In other cases, these features are applicable to SegNet, an architecture designed for semantic segmentation tasks and using an encoder-decoder structure with pooling indices for upsampling, making it memory efficient. In still other cases, these features are applicable to PSPNet (Pyramid Scene Parsing Network), which leverages pyramid pooling modules to capture contextual information at multiple scales and is effective for tasks requiring an understanding of the global context of an image.

[0162] In some cases, features are applied to LinkNet, a lightweight architecture for real-time image segmentation. In other cases, features are applied to FCN (Fully Convolutional Network) for semantic segmentation by replacing fully connected layers with convolutional layers, thereby achieving end-to-end pixel-wise prediction.

[0163] In some cases, features are applied to self-attention transformers, for example, by avoiding cross-attention. In other cases, features are applied to nonlocal neural networks, which introduce nonlocal operations to capture long-term dependencies in the data. In still other cases, features are applied to graph neural networks (GNNs), which are well-suited for modeling structured data such as graphs or grids.

[0164] In some cases, features are applied to a spatial transformer, which is a neural network component that learns to perform spatial transformations on feature maps. In other cases, features are applied to convolutional blocks with dilated convolutions, which can be used to increase the receptive field of the convolutional layer, thereby capturing contextual information without cross-attention.

[0165] In some cases, features are applied to DenseNet, which connects each layer to every other layer in a forward-feed manner, helping to mitigate the vanishing gradient problem and encouraging feature reuse. In other cases, features are applied to the initial module, which uses parallel convolutional operations with different kernel sizes to capture multi-scale features within a single layer. In still other cases, features are applied to Xception, an extension of the Inception architecture that replaces standard convolutional layers with depthwise separable convolutions.

[0166] Although the examples described herein illustrate models for generating images, such as stable diffusion models, it should be understood that the features described herein are also applicable to models for generating media content items, which may include:

[0167] Content enhancement is used to enhance images, videos, or other media content items for sharing with others, such as by adjusting colors or appearance in real time or adding interactive elements like animations and facial transformations.

[0168] Emojis are small images or icons that represent emotions, reactions, or objects.

[0169] Stickers are large images or animations that can be sent in the chat window.

[0170] Images or photographs that can be sent to other users to share visual information or record specific events.

[0171] Video editing can be used to share recorded content or record specific events.

[0172] Audio information, which can be shared to convey auditory communication.

[0173] The Graphics Interchange Format (GIF) is a short animation that can be used to add humor or express emotions.

[0174] The systems and methods described in this paper include training machine learning networks, such as the stable diffusion model described herein. Machine learning networks can be trained to generate images based on prompts received from a user.

[0175] Training a stable diffusion model involves combining the principles of generative modeling and neural network training to achieve controlled data generation or manipulation. This training process involves two main phases: forward diffusion and backward diffusion.

[0176] During the forward diffusion phase, the input data points (e.g., images) are gradually transformed into random noise by adding noise in a controlled manner. The process begins with a low level of noise and then gradually increases the noise. The noisy data is then encoded using a neural network to capture its features.

[0177] In the backdiffusion phase, the encoded noisy data is iteratively denoised to reconstruct the original data. The model learns to remove noise and recovers meaningful features under the guidance of a predefined loss function that measures the quality of the reconstruction. This process is repeated iteratively until data is successfully recovered or generated. Training a stable diffusion model requires careful selection of architectural components, loss functions, and optimization techniques to achieve the desired data generation or manipulation capabilities.

[0178] Training models such as artificial intelligence models is necessarily rooted in computer technology, and by training such models using training data and then applying the models to new inputs to make inferences on the new inputs, modeling techniques are improved.

[0179] Such training, due to the use of large training datasets, involves complex processing typically performed by large-scale server systems, often requiring significant processor computation and lengthy processing times. Training the model may require logistic regression and / or forward / backward propagation of training data, which can include input data and expected output values ​​used to adjust the model's parameters. This training forms the framework for machine learning algorithms that enable the model to be applied to new and unseen data (e.g., new cue data) and to make predictions for which the model was trained, based on weights or scores adjusted during training. The training of machine learning models described in this paper reduces false positives and improves the performance of such stable diffusion models.

[0180] Improved stepwise distillation for potential diffusion models

[0181] Figure 5 An example method 500 for improved stepwise distillation for a potential diffusion model is illustrated, based on several examples. While example method 500 depicts a specific sequence of operations, this sequence can be changed without departing from the scope of this disclosure. For example, some of the depicted operations may be performed in parallel or in a different order that does not substantially affect the functionality of method 500. In other examples, different components of the example device or system implementing method 500 may perform their functions substantially simultaneously or in a specific order.

[0182] At block 502, the interactive system acquires a first latent diffusion machine learning model. This first latent diffusion machine learning model has been pre-trained to perform a first number of denoising steps. Latent diffusion models (LDMs) comprise a class of generative models based on diffusion probability models trained for high-resolution image synthesis and manipulation.

[0183] These LDMs apply diffusion processing, which gradually injects noise into the initial latent representation of the real image during the forward pass, effectively blurring the image over time. In the backward pass, the LDM learns to reverse the noise addition (as in this paper, for example in...). Figure 4 (As described elsewhere).

[0184] Figure 6 The diagram illustrates, based on several examples, the application of derived machine learning models derived from the original machine learning model and the architecture of using the original machine learning model to train the derived machine learning model. The first potential diffusion machine learning model may include... Figure 6 The original teacher model 602.

[0185] exist Figure 5 At box 504, the interactive system obtains a second latent diffusion machine learning model from the first latent diffusion machine learning model. The second latent diffusion machine learning model is obtained from the first model and then retrained to perform a second number of denoising steps. The second latent diffusion machine learning model may include... Figure 6 The original student model 604.

[0186] In some cases, the first latent diffusion machine learning model is reconstructed to perform a different number of denoising steps than the original first latent diffusion machine learning model. The first latent diffusion machine learning model may include a first set (or a first number) of denoising steps. The reconstructed teacher model 606 may perform fewer denoising steps than the original teacher model, for example, half the number of denoising steps.

[0187] The interactive system can reconstruct the first latent diffusion machine learning model to perform a third number of denoising steps. The first number of denoising steps can be greater than the third number of denoising steps. For example, the third number of denoising steps is half the number of the first number of denoising steps. In other words, the first latent diffusion machine learning model can include 32 denoising steps, while the reconstructed first latent diffusion machine learning model can have 16 denoising steps.

[0188] In some cases, the second latent diffusion machine learning model includes a second set (or a second number) of denoising steps. The interactive system reconstructs the second latent diffusion machine learning model to perform a fourth number of denoising steps. The second number of denoising steps can be greater than the fourth number of denoising steps. The fourth number of denoising steps for the second original latent diffusion machine learning model can be half the second number of denoising steps for the original second latent diffusion machine learning model. For example, the second diffusion machine learning model may include 16 denoising steps, while the reconstructed second latent diffusion machine learning model may have 8 denoising steps.

[0189] The reconstructed teacher model 606 can perform fewer denoising steps than the original teacher model. The reconstructed student model 608 can perform fewer denoising steps than the original student model.

[0190] In some cases, the fourth number of denoising steps is half the number of the third number. For example, the first latent diffusion machine learning model (corresponding to the first number of denoising steps) has a total of 32 denoising steps. The reconstructed first latent diffusion machine learning model (corresponding to the third number of denoising steps) has a total of 16 denoising steps. The second latent diffusion machine learning model (corresponding to the second number of denoising steps) has a total of 16 denoising steps. The reconstructed second latent diffusion machine learning model (corresponding to the fourth number of denoising steps) has a total of 8 denoising steps.

[0191] In some cases, the student model is obtained from the teacher model by changing the number of denoising steps. In other cases, the student model is obtained by reconstructing the UNet architecture of the first latent diffusion machine learning model. For example, reconstructing the UNet architecture includes changing the architecture of the cross-attention block and / or ResNet block of the UNet architecture, as further described in this paper.

[0192] exist Figure 5 At box 506, the interactive system generates noisy data (such as...). Figure 4 (As described elsewhere). In Figure 5 At box 508, the interactive system processes noisy data via a first latent diffusion machine learning model to generate one or more first images. In some cases, the system processes noisy data via a reconstructed first latent diffusion machine learning model.

[0193] exist Figure 5 At box 510, the interactive system processes the noisy data via a second latent diffusion machine learning model to generate one or more second images. In some cases, the system processes the noisy data via a reconstructed second latent diffusion machine learning model.

[0194] The first latent diffusion machine learning model includes a denoising architecture. It processes noisy data through multiple iterations and denoising steps by feeding the output of previous iterations of the denoising architecture as input to the current iteration (see [link to relevant documentation]). Figure 7 (To be further described).

[0195] The interactive system processes noisy data via a first latent diffusion machine learning model to generate one or more first images. The interactive system iteratively processes the noisy data via a denoising architecture for multiple denoising steps to generate first latent features, and processes the generated first latent features via a decoder of the first latent diffusion machine learning model to generate one or more first images.

[0196] The interactive system processes noisy data via a second latent diffusion machine learning model to generate one or more second images. The interactive system iteratively processes the noisy data via a denoising architecture for a third number of denoising steps to generate second latent features, and processes the generated second latent features via a decoder of the second latent diffusion machine learning model to generate one or more first images.

[0197] Iterative denoising involves adding random noise and the output image generated during the previous iteration to the machine learning model to generate the output image for the current iteration.

[0198] The decoder of the first latent diffusion machine learning model can be the same decoder as the decoder of the second latent diffusion machine learning model (or a decoder with the same parameters as the decoder).

[0199] At box 512, the interactive system modifies the parameters of the second latent diffusion machine learning model based on comparisons of one or more first images with one or more second images.

[0200] In some cases, the interactive system compares images by using comparison module 610 to determine a mean squared error, which indicates how closely the image created by the second latent diffusion model is similar to the image created by the first latent diffusion model. The interactive system can modify the second latent diffusion model, for example, by updating its weights, and rerun synthetic training data (e.g., noise) to minimize the mean squared error.

[0201] In some cases, interactive systems use mean squared error (MSE) to compare output images. MSE calculates the average of the squared differences between corresponding pixels in two images. MSE provides a measure of the overall pixel-level difference between images, with higher values ​​indicating larger differences.

[0202] In some cases, interactive systems compare output images via the Structural Similarity Index (SSIM), which assesses structural similarity by considering brightness, contrast, and structure. SSIM provides a more comprehensive measure of image differences, taking into account human perceptual variations.

[0203] In some cases, interactive systems use Peak Signal-to-Noise Ratio (PSNR) to compare output images. PSNR quantifies the quality of image reconstruction by measuring the ratio of the maximum possible power of the signal (original image) to the power of the destructive noise (difference between images). A higher PSNR value indicates better image quality.

[0204] In some cases, interactive systems use cross-correlation to compare output images. This cross-correlation measures the similarity between two images by sliding one image over another and calculating the dot product at each location. A high cross-correlation value indicates similarity, while a low value suggests dissimilarity.

[0205] In some cases, interactive systems use histogram comparisons to compare output images, which compare histograms of pixel values ​​in two images, revealing differences in color or intensity distribution. In other cases, interactive systems use perceptual metrics that take human perception into account to compare output images and assess how different the images appear to the human eye.

[0206] In some cases, interactive systems compare output images using feature-based comparisons: by using techniques such as deep neural networks to extract features from images and comparing these feature representations, which can capture more abstract differences between images.

[0207] In some cases, one or more weights of a machine learning model are modified based on comparisons of images. In other cases, the architecture of a machine learning model, such as UNet or ResNet blocks (as further described in this paper), is altered based on comparisons.

[0208] In some cases, interactive systems modify the diffusion parameters of a machine learning model. These parameters control the diffusion process and include parameters such as the diffusion step and step size. Adjusting these parameters affects how information propagates through the latent space, thus impacting the model's ability to capture complex dependencies in the data.

[0209] In some cases, interactive systems modify the latent space parameters of machine learning models, such as the dimensionality and prior distribution that affect the model's ability to represent the underlying data structure. Optimizing these parameters involves finding an appropriate balance between model expressiveness and overfitting, and interactive systems can optimize these parameters based on comparisons.

[0210] In some cases, interactive systems modify the network architecture parameters of machine learning models. These parameters control the neural network architecture, such as the number of layers, hidden units, and activation functions, which play a crucial role in the model's ability to learn complex patterns. Adjusting these parameters can enhance the model's ability to capture hierarchical features in the data.

[0211] In some cases, interactive systems modify the learning rate parameter of a machine learning model, which affects the step size taken during optimization. Interactive systems can identify appropriate adjustments to this parameter: a high learning rate may cause the model to converge slowly or not at all, while a low learning rate may cause slow convergence or getting stuck in a suboptimal solution.

[0212] In some cases, interactive systems modify the regularization parameters of machine learning models, which control the model's complexity and help prevent overfitting. Balancing the strength of regularization is crucial for generalization performance on unseen data.

[0213] In some cases, interactive systems modify the noise parameters of machine learning models, which are related to the noise injected during training, such as the type and magnitude of the noise, its impact on the model's robustness, and its ability to handle uncertainty in the data. Fine-tuning these parameters can enhance the model's adaptability to noisy inputs.

[0214] In some cases, interactive systems modify the batch size parameter of a machine learning model. This parameter determines the number of samples used in each iteration during training. Adjusting this parameter can affect convergence speed and memory requirements; a larger batch size may lead to faster convergence but will increase memory usage.

[0215] In some cases, interactive systems modify the weight parameters of the loss function of a machine learning model, which adjust the weights assigned to different components (e.g., reconstruction loss, regularization term), and can help achieve a balance between competing objectives and guide the model toward the desired behavior.

[0216] Teacher and student architecture for denoising iteration

[0217] Figure 7 A teacher / student distillation architecture 700 based on some examples is shown. In some examples, the interactive client 104 reduces the number of iterative denoising steps in UNet to reduce latency. Figure 1 The interactive client 104 identifies a first machine learning model 702 (also referred to herein as the teacher model) that has been trained to perform a certain number of iterative denoising steps. The interactive client 104 generates a copy of the first machine learning model (referred herein as the second machine learning model, or student model) and modifies the second machine learning model 704 to perform a smaller number of iterative denoising steps. For example, the teacher model runs 32 steps, while the student model runs 16 steps.

[0218] The outputs of the teacher model and the student model are compared to modify the parameters of the student model. This process is repeated until the student model reaches a certain performance threshold. Advantageously, the student model is trained to perform a smaller number of iterative denoising steps.

[0219] In some cases, the number of denoising steps for teachers is reduced to generate a revised teacher model 706, and the number of denoising steps for students is reduced to generate a revised student model 708.

[0220] The interactive client application outputs velocity v instead of noise. A stable diffusion machine learning model. Interactive client 104 uses the following original Fine-tune the model:

[0221]

[0222] Where v is the true target velocity, which can be obtained from the clean latent variable x173 and noise at a given time step t. The analysis yields the following: .

[0223] Interactive client 104 performs distillation on a pre-existing machine learning model that has been trained to perform a certain number of iterations (e.g., 32 steps). In response to the distillation, interactive client 104 generates a first new machine learning model. This first new machine learning model (also referred to herein as the teacher model) may have a smaller number of iterations (e.g., 16 steps) for UNet.

[0224] Next, the interactive client 104 performs distillation on another pre-existing machine learning model that has been trained to perform a certain number of iterations (e.g., 32 steps). This other pre-existing machine learning model is a modified version of the pre-existing machine learning model (e.g., an optimized version) to generate a more efficient pre-existing machine learning model. In response to the distillation, the interactive client 104 generates a second new machine learning model. This second new machine learning model (also referred to herein as the student model) may have a fewer number of iterations (e.g., 16 steps) against UNet.

[0225] Finally, the interactive client applies stepwise distillation to the 16-step teacher model and the 16-step student model. The interactive client 104 generates an 8-step student model.

[0226] Given UNet input, time step t, and noisy latent variable z tGiven the text embedding c, the teacher model performs multiple DDIM denoising steps (e.g., 2 DDIM steps) from time t to t′, and then to t′′ (0 ≤ t′′ < t′ < t ≤ 1). This process can be formulated as follows (see supplementary material for detailed derivation):

[0227]

[0228] Depend on The parameterized student model performs a smaller number of DDIM denoising steps (e.g., one step).

[0229]

[0230] The labels (s) above indicate that these variables apply to the student model. The student model is trained to use only one denoising step to deduce z... t Predicting the noise latent variable z of teachers t′′ .

[0231] This translates to the following distillation loss objective calculated in x-space:

[0232]

[0233] in These are truncated SNR weighting coefficients. Advantageously, this greatly improves inference speed.

[0234] In some examples, teacher model 702 is generated via stepwise distillation. Interactive client 104 retrieves the original machine learning model, for example, a model requiring 32 iterations of denoising steps. Interactive client 104 generates a smaller version of the original machine learning model, for example, a smaller model requiring 16 iterations of denoising steps. Interactive client 104 performs stepwise distillation on the original machine learning model and the smaller machine learning model to generate teacher model 702.

[0235] In some examples, student model 704 is generated via stepwise distillation. Interactive client 104 retrieves a modified machine learning model, such as one requiring 32 iterations of denoising steps. The modified machine learning model is a modification of the original machine learning model (e.g., an original machine learning model with an improved decoder architecture or a UNet architecture). Interactive client 104 generates a smaller version of the modified machine learning model, such as a smaller model requiring 16 iterations of denoising steps. Interactive client 104 performs stepwise distillation on the modified machine learning model and the smaller machine learning model to generate student model 704.

[0236] Now, the interactive client 104 has generated both a teacher model 702 and a student model 704. The client 104 performs stepwise distillation to generate a new student model requiring eight iterative denoising steps. For example, once the student model 704 is updated to require eight steps, the teacher model 702 performs two DDIM steps, and the student model 704 performs the DDIM step. The output of the teacher model 702 is compared with the output of the student model 704. Based on the difference between the two, the student model 704 is updated. Through this training process, the student model 704 is reduced to eight steps while being trained using the output of the teacher model 702.

[0237] In some cases, the interactive client 104 recognizes a user's prompt that instructs the user to generate an image and acquire noisy data. The interactive client 104 then uses a first machine learning model to analyze the set of data corresponding to the prompt and the noisy data to generate first features. The first machine learning model is trained to perform a first number of denoising processes. The first machine learning model is also referred to herein as the teacher model.

[0238] Interactive client 104 uses a second machine learning model to analyze the set of data corresponding to the prompts and noisy data to generate a first feature. The second machine learning model is trained to perform a second number of denoising processes. The second machine learning model is also referred to as the student model in this paper.

[0239] In some cases, the first number of denoising iterations is greater than the second number. For example, the first machine learning model has 32 denoising iterations, while the second machine learning model has 16 denoising iterations.

[0240] The second machine learning model is modified to have a certain number of denoising iterations less than the first machine learning model. The interactive client 104 modifies the second machine learning model to include fewer iterations than the first machine learning model by a certain proportion or number, such as half the number or five fewer iterations. In some cases, the interactive client 104 increases the number of iterations for the first machine learning model while decreasing the number of iterations for the first machine learning model, or increases the number of iterations for the first machine learning model without decreasing the number of iterations for the first machine learning model. Therefore, the second machine learning model is a modified version of the first machine learning model.

[0241] In some cases, the first machine learning machine analyzes the data using a greater number of DDIM steps than the second machine learning model. For example, the first machine learning model processes the data with two DDIM steps, from time 0 to 500 for the first step and from time 500 to 1000 for the second step, while the second machine learning model processes the data with one DDIM step, from 0 to 1000.

[0242] In some cases, the first machine learning model has already been trained, and the processing described in this paper retrains the first machine learning model by generating a second machine learning model and using the output of the first machine learning model as the training data for the second machine learning model.

[0243] In some cases, the interactive client reduces the number of iterations by a certain percentage or number (e.g., half that of the second machine learning model), compares the output, and decides whether to increase or decrease the number of iterations. For example, a first machine learning model with 32 iterations can be compared to a second machine learning model with 16 iterations. If the performance of the second machine learning model with 16 iterations reaches a certain threshold, the interactive client 104 continues to reduce the number of iterations to 8 iterations for the second machine learning model. On the other hand, if the performance does not meet the threshold, the interactive client 104 adds iterations to generate a second machine learning model with 24 iterations. Advantageously, log(n) modifications are used to find the optimal student model.

[0244] In some cases, the interactive client 104 uses a decoder to analyze a first feature to generate a first image corresponding to the first feature, and uses a decoder to analyze a second feature to generate a second image corresponding to the second feature. The interactive client 104 determines how to update the second machine learning model (as further described herein) based on the generated first and second images.

[0245] In some cases, modifications to the second machine learning model and comparisons with the output of the first machine learning model are continuously performed until a specific performance metric is met. In some cases, the first machine learning model remains unchanged with each modification and comparison. In other cases, the interactive client 104 also modifies the first machine learning model (e.g., by increasing or decreasing the number of iterations). The interactive client 104 may modify the first machine learning model so that it has the same number of iterations as the second machine learning model before the last modification.

[0246] Creating a potential diffusion model for reconstruction

[0247] The interactive system identifies the performance characteristics of cross-attention blocks and ResNet blocks in the iterative denoising process of machine learning models. Cross-attention measures the correlation between image features and text features. Cross-attention blocks are a type of attention mechanism that allows the model to simultaneously focus on relevant parts of both text and images. These blocks enable bidirectional interaction between text and image modalities, thereby facilitating the alignment of text details with corresponding visual elements. By focusing on both text and image representations, cross-attention blocks enhance the model's ability to generate images that closely match the provided text description.

[0248] ResNet blocks (short for Residual Network blocks) are fundamental building blocks of deep neural networks used in stable diffusion models. ResNet blocks help address the vanishing gradient problem and enable the training of deeper neural networks. ResNet blocks use skip connections to propagate gradients and information directly from earlier layers to subsequent layers. This facilitates the flow of gradients during training, allowing the model to better capture and retain important information while mitigating the vanishing gradient problem. ResNet blocks play a crucial role in stable diffusion models by improving the quality of image generation through more efficient and stable training.

[0249] Interactive client 104 evaluates the distribution of UNet's parameters and computations by processing UNet with noise and cues, for example, in each downsampling stage, intermediate layer stage, and upsampling stage. Interactive client 104 identifies performance characteristics for individual ResNet blocks and / or cross-attention blocks.

[0250] Interactive client 104 identifies ResNet and / or cross-attention blocks that cause the greatest performance characteristics (e.g., latency, computational resources, etc.). In some cases, interactive client 104 identifies that: given a large number of channel dimensions, the downsampling stage requires more computation, while the input and output layers have the greatest latency due to feature size.

[0251] Figure 8 The architecture of UNet 800 and the removal of the cross-attention block are shown. The architecture includes... Figure 4 The downsampler 432, intermediate layer 430 and upsampler 428, each of which includes one or more cross attention blocks 802a, 802b, 802c, 802d and 802e (collectively referred to as cross attention block 802 in this document) and / or one or more ResNet blocks 804a, 804b, 804c, 804d, 804e and 804f (collectively referred to as ResNet block 804 in this document).

[0252] The interactive system connects previous and subsequent blocks of cross-attention blocks or resNet blocks within the machine learning model based on identified performance characteristics. Figure 8 In the downsampler 432, the first ResNet block 804a was identified as causing the greatest delay and was removed.

[0253] In some cases, the interactive system first disconnects the previous machine learning model block from the current machine learning model block, and then disconnects the current machine learning model block from subsequent machine learning model blocks. The interaction then creates a connection between the previous and subsequent blocks to skip the current block.

[0254] In some cases, the interactive system deletes the current machine learning model block after it has been disconnected from previous and subsequent machine learning model blocks.

[0255] While the features described in this paper describe connecting previous blocks to subsequent blocks, it should be understood that these features also apply to other methods of avoiding the use of a particular block. For example, an interactive system might change the current block to a passthrough block, where input is simply passed through the output. In some cases, the activation of a block can be zeroed out to prevent the block from contributing during inference or training.

[0256] In some cases, interactive systems can use conditional logic or gating mechanisms to create conditional execution to determine whether a block should be executed and / or control the flow of information through the block.

[0257] In some cases, performance characteristics include latency characteristics, which indicate the time delay required for the corresponding machine learning model block to process the input and generate the output. Latency refers to the time delay or amount of time required for the machine learning model block to complete a specific operation or computation.

[0258] In some cases, the interactive system identifies the current machine learning model block based on latency characteristics. The current machine learning model block follows the previous machine learning model block and precedes subsequent machine learning model blocks.

[0259] The interactive system identifies the machine learning model block that causes the largest amount of latency and skips that block by removing its current connection and directly connecting the previous and subsequent blocks.

[0260] In some cases, performance characteristics include specific performance features related to the performance of the machine learning model. For example, performance characteristics may include computational complexity, such as certain blocks having high computational requirements or a large number of inputs to be processed or outputs to be generated.

[0261] Performance characteristics may include memory usage, where, if memory is limited, blocks that consume or use a large amount of memory (for storage) can be skipped or optimized to reduce memory usage. Performance characteristics may include energy efficiency to help optimize energy use by skipping blocks that consume excessive power.

[0262] Performance characteristics can include model size, where machine learning models with many parameters may have blocks that contribute little to overall performance. Pruning or skipping such blocks can reduce model size and inference time.

[0263] By identifying blocks with relatively low impact on model performance as candidates to skip, performance characteristics can include accuracy impact, especially in cases where significant performance gains are caused in terms of latency or resource usage.

[0264] Performance characteristics can include redundancy by identifying multiple blocks that perform similar functions or learn similar features, allowing the model to skip some of these blocks without sacrificing model performance. Performance characteristics can also include training time, where some blocks may not significantly contribute to model convergence during training. Identifying and potentially skipping these blocks can speed up the training process.

[0265] For models that incorporate feature selection or extraction, performance characteristics can include feature importance, where blocks responsible for less important features can be considered for skipping. Performance characteristics can also include task-specific criteria; for example, in natural language processing tasks, machine learning models can skip blocks responsible for processing less relevant language features.

[0266] In some cases, interactive systems identify blocks to skip based on one or more performance characteristics (such as one or more of the performance characteristics described above).

[0267] While the examples described in this article illustrate the characteristics of skipping blocks, it is important to understand that the same or different performance characteristics can be applied to other architectural changes, such as adding blocks back to a machine learning model.

[0268] The interactive system recognizes user prompts that indicate the user's intent to generate images. The system uses machine learning models to analyze data corresponding to the prompts to generate one or more images; these models are trained to generate images based on the data corresponding to the prompts.

[0269] In some cases, after removing a specific block, the interactive client 104 reruns the stable diffusion machine learning model and generates an image. The interactive client 104 evaluates the correspondence between the cue features and the image features to determine how the removal or addition of the ResNet block or cross-attention block affects the performance of the stable diffusion model. The interactive client 104 makes this decision by comparing the performance characteristics of the stable diffusion model before and after the removal or addition of the ResNet block or cross-attention block.

[0270] In some cases, the interactive system skips multiple blocks based on one or more performance characteristics. For example, in response to identifying the performance characteristics of each machine learning model block, the interactive system connects a machine learning model block's previous machine learning model block to a subsequent machine learning model block, and connects another node's previous machine learning model block to another subsequent machine learning model block.

[0271] Figure 9 The diagram illustrates adding a machine learning model block to machine learning model 900 based on some examples. In some cases, the machine learning model block (e.g., ResNet 906) is added back to the machine learning model. Figure 9 As shown, after removing ResNet block 804a from the machine learning model, ResNet 906 is added back to the model.

[0272] In some cases, machine learning model blocks are added and / or skipped. In others, blocks are added and then skipped, and / or vice versa. The machine learning model is continuously optimized until both adding and skipping a block satisfy one or more performance characteristics. For example, skipping the first block might result in reduced latency but potentially decreased model performance. A new block is added, which improves performance but adds latency exceeding the desired latency performance threshold. The next largest latency block is removed and a second new block is added, which then satisfies both the desired performance and latency thresholds.

[0273] To add a new block, the interactive system disconnects the connection between two blocks (the previous block and the subsequent block), connects the previous block to the new block, and connects the new block to the subsequent block.

[0274] In some cases, a new machine learning model block is a copy of an existing machine learning model block. For example, an interactive system may identify the existing machine learning model block to be copied based on one or more performance characteristics of the existing machine learning model block. In some cases, the performance characteristics evaluated to determine whether and / or how to skip a machine learning block may be the same as or different from the performance characteristics evaluated to determine whether and / or how to add a new machine learning model block.

[0275] In some cases, the interactive system adds new machine learning model blocks at different locations within the machine learning model and evaluates the performance of the machine learning model with the new machine learning model blocks at each of those different locations. The interactive system then permanently adds the new machine learning model blocks at specific locations based on the evaluated performance. For example, the interactive system might ultimately place the new machine learning model blocks in the location that produces the highest machine learning model accuracy performance.

[0276] For example, the current machine learning model block (e.g., cross-attention block) can be identified by identifying the machine learning model block that causes the greatest latency, while a new machine learning model block (e.g., ResNet block) can be copied from an existing machine learning model block that causes the least latency or requires the least memory storage.

[0277] Data communication architecture

[0278] Figure 10 This is a schematic diagram illustrating the structure of message 1000 according to some examples, generated by interactive client 104 for transmission to another interactive client 104 via interactive server 124. The content of a particular message 1000 is used to populate message table 306 within database 304 accessible by interactive server 124. Similarly, the content of message 1000 is stored in memory as "in-transit" or "in-flight" data for user system 102 or interactive server 124. Message 1000 is shown to include the following example components:

[0279] Message Identifier 1002: A unique identifier that identifies message 1000.

[0280] Message text payload 1004: Text to be generated by the user via the user interface of user system 102 and included in message 1000.

[0281] Message image payload 1006: Image data captured by the camera device component of the user system 102 or retrieved from the memory component of the user system 102 and included in the message 1000. The image data for the sent or received message 1000 can be stored in the image table 316.

[0282] Message video payload 1008: Video data captured by the camera device component or retrieved from the memory component of the user system 102 and included in message 1000. The video data for the sent or received message 1000 can be stored in image table 316.

[0283] Message audio payload 1010: Audio data captured by the microphone or retrieved from the memory component of the user system 102 and included in message 1000.

[0284] Message enhancement data 1012: This represents enhancement data (e.g., filters, labels, or other annotations or enhancements) to be applied to the message image payload 1006, message video payload 1008, or message audio payload 1010 of message 1000. Enhancement data for the sent or received message 1000 can be stored in enhancement table 312.

[0285] Message duration parameter 1014: A parameter value, in seconds, indicating the amount of time that the content of the message (e.g., message image payload 1006, message video payload 1008, message audio payload 1010) will be presented to the user via the interactive client 104 or made accessible to the user.

[0286] Message geolocation parameter 1016: Geographic location data (e.g., latitude and longitude coordinates) associated with the message's content payload. Multiple message geolocation parameter 1016 values ​​may be included in the payload, each of which is associated with a content item included in the content (e.g., a specific image within the message image payload 1006 or a specific video within the message video payload 1008).

[0287] Message Story Identifier 1018: An identifier value that identifies one or more sets of content (e.g., “story” identified in set table 318) associated with a specific content item in the message image payload 1006 of message 1000. For example, the identifier value can be used to associate multiple images within the message image payload 1006 with multiple sets of content, respectively.

[0288] Message Tag 1020: Each message 1000 can be labeled with multiple tags, each of which indicates the subject of the content included in the message payload. For example, in the case where a specific image depicting an animal (e.g., a lion) is included in the message image payload 1006, the tag value can be included within the message tag 1020 indicating the relevant animal. The tag value can be manually generated based on user input, or it can be automatically generated using, for example, image recognition.

[0289] Message sender identifier 1022: An identifier (e.g., message sending system identifier, email address, or device identifier) ​​indicating the user of the user system 102 on which message 1000 is generated and from which message 1000 is sent.

[0290] Message receiver identifier 1024: An identifier (e.g., message sending and receiving system identifier, email address, or device identifier) ​​indicating the user of the user system 102 to which message 1000 is addressed.

[0291] The content (e.g., values) of each component of message 1000 can be pointers to locations in tables where content data values ​​are stored. For example, the image value in message image payload 1006 can be a pointer to a location (or its address) within image table 316. Similarly, the value in message video payload 1008 can point to data stored in image or video table 316, the value stored in message enhancement data 1012 can point to data stored in enhancement table 312, the value stored in message story identifier 1018 can point to data stored in set table 318, and the values ​​stored in message sender identifier 1022 and message receiver identifier 1024 can point to user records stored in entity table 308.

[0292] Systems with head-worn devices

[0293] Figure 11 System 1100 is shown, which includes a head-worn wearable device 116 with a selector input device according to some examples. Figure 11 This is a high-level functional block diagram of an example head-mounted wearable device 116 communicatively coupled to mobile devices 114 and various server systems 1104 (e.g., interactive server system 110) via various networks 108. Network 108 may include any combination of wired and wireless connections.

[0294] The head-mounted wearable device 116 includes one or more camera devices, each of which may be, for example, a visible light camera device 1106, an infrared emitter 1108, and an infrared camera device 1110.

[0295] Interactive clients, such as mobile devices 114, connect to head-mounted wearable devices 116 using both low-power wireless connection 1112 and high-speed wireless connection 1114. Mobile devices 114 also connect to server system 1104 and network 1116.

[0296] The head-mounted wearable device 116 also includes two image displays in the image display 1118 of the optical components. The two image displays 1118 of the optical components include an image display associated with the left lateral side of the head-mounted wearable device 116 and an image display associated with the right lateral side of the head-mounted wearable device 116. The head-mounted wearable device 116 also includes an image display driver 1120, an image processor 1122, low-power circuitry 1124, and high-speed circuitry 1126. The image displays 1118 of the optical components are used to present images and videos to the user of the head-mounted wearable device 116, including images that may include a graphical user interface.

[0297] The image display driver 1120 commands and controls the image display 1118 of the optical components. The image display driver 1120 can directly deliver image data to the image display 1118 of the optical components for presentation, or it can convert the image data into a signal or data format suitable for delivery to the image display device. For example, the image data can be video data formatted according to compression formats such as H.264 (MPEG-4 Part 10), HEVC, Theora, Dirac, RealVideo RV40, VP8, VP9, ​​etc., while still image data can be formatted according to compression formats such as Portable Network Group (PNG), Joint Photo Experts Group (JPEG), Tagged Image File Format (TIFF), or Exchangeable Image File Format (EXIF), etc.

[0298] The head-worn device 116 includes a frame and a stem (or temple) extending laterally from the frame. The head-worn device 116 also includes a user input device 1128 (e.g., a touch sensor or a press button), comprising an input surface on the head-worn device 116. The user input device 1128 (e.g., a touch sensor or a press button) is used to receive input selections from a user for manipulating a graphical user interface of the presented image.

[0299] Figure 11 Components of the illustrated head-wearable device 116 are located on one or more circuit boards (e.g., PCBs or flexible PCBs) in the frame or temples. Alternatively or additionally, the depicted components may be located in chunks, frames, hinges, or nose bridges of the head-wearable device 116. The left and right visible light camera devices 1106 may include digital camera elements, such as complementary metal-oxide-semiconductor (CMOS) image sensors, charge-coupled devices, camera lenses, or any other corresponding visible light or light-capturing elements that can be used to capture data, including images of scenes with unknown objects.

[0300] The head-mounted wearable device 116 includes a memory 1102 that stores instructions for performing a subset or all of the functions described herein. The memory 1102 may also include a storage device.

[0301] like Figure 11As shown, high-speed circuitry 1126 includes a high-speed processor 1130, memory 1102, and high-speed wireless circuitry 1132. In some examples, image display driver 1120 is coupled to high-speed circuitry 1126 and operated by high-speed processor 1130 to drive the left and right image displays in image display 1118 of the optical components. High-speed processor 1130 can be any processor capable of managing high-speed communication and operation of any general-purpose computing system required by head-worn device 116. High-speed processor 1130 includes the processing resources required to manage high-speed data transmission to a wireless local area network (WLAN) over high-speed wireless connection 1114 using high-speed wireless circuitry 1132. In some examples, high-speed processor 1130 executes the operating system of head-worn device 116 (e.g., LINUX operating system) or other such operating system, and this operating system is stored in memory 1102 for execution. Among other duties, high-speed processor 1130, which executes the software architecture of head-worn device 116, manages data transmission with high-speed wireless circuitry 1132. In some examples, the high-speed wireless circuit 1132 is configured to implement the Institute of Electrical and Electronics Engineers (IEEE) 802.11 communication standard, also referred to herein as Wi-Fi®. In some examples, the high-speed wireless circuit 1132 may implement other high-speed communication standards.

[0302] The low-power wireless circuitry 1134 and high-speed wireless circuitry 1132 of the head-mounted wearable device 116 may include a short-range transceiver (Bluetooth™) and a wireless wide-area network transceiver, a wireless local area network transceiver, or a wide-area network transceiver (e.g., cellular or Wi-Fi®). The mobile device 114, including transceivers communicating via low-power wireless connectivity 1112 and high-speed wireless connectivity 1114, can be implemented using details of the architecture of the head-mounted wearable device 116, as can other components of the network 1116.

[0303] Memory 1102 includes any storage device capable of storing various data and applications. In addition, the data includes camera data generated by the left and right visible light imaging devices 1106, the infrared imaging device 1110, and the image processor 1122, as well as images generated for display on an image display 1118 in the optical components via the image display driver 1120. Although memory 1102 is shown as integrated with high-speed circuitry 1126, in some examples, memory 1102 may be a separate, independent component of the head-mounted wearable device 116. In some such examples, electrical wiring may provide a connection from the image processor 1122 or the low-power processor 1136 to memory 1102 via a chip including a high-speed processor 1130. In some examples, the high-speed processor 1130 may manage addressing of memory 1102 such that the low-power processor 1136 will activate the high-speed processor 1130 whenever a read or write operation involving memory 1102 is required.

[0304] like Figure 11 As shown, the low-power processor 1136 or high-speed processor 1130 of the head-mounted wearable device 116 may be coupled to a camera device (visible light camera 1106, infrared emitter 1108 or infrared camera 1110), an image display driver 1120, a user input device 1128 (e.g., a touch sensor or a press button), and a memory 1102.

[0305] The head-mounted wearable device 116 is connected to a host computer. For example, the head-mounted wearable device 116 is paired with the mobile device 114 via a high-speed wireless connection 1114 or connected to the server system 1104 via a network 1116. The server system 1104 may be one or more computing devices as part of a service or network computing system, for example, it includes a processor, memory, and network communication interfaces to communicate with the mobile device 114 and the head-mounted wearable device 116 via the network 1116.

[0306] Mobile device 114 includes a processor and a network communication interface coupled to the processor. The network communication interface allows communication via network 1116, low-power wireless connection 1112, or high-speed wireless connection 1114. Mobile device 114 may also store at least some instructions in its memory to implement the functions described herein.

[0307] The output components of the head-worn wearable device 116 include visual components, such as displays (e.g., liquid crystal displays (LCDs), plasma display panels (PDPs), light-emitting diode (LED) displays, projectors, or waveguides). The image display of the optical components is driven by an image display driver 1120. The output components of the head-worn wearable device 116 also include acoustic components (e.g., speakers), haptic components (e.g., vibration motors), other signal generators, etc. The input components (e.g., user input devices 1128) of the head-worn wearable device 116, mobile device 114, and server system 1104 may include alphanumeric input components (e.g., keyboards, touchscreens configured to receive alphanumeric input, optical keyboards, or other alphanumeric input components), pointing-based input components (e.g., mice, touchpads, trackballs, joysticks, motion sensors, or other pointing instruments), haptic input components (e.g., physical buttons, touchscreens that provide position and force for touch or touch gestures, or other haptic input components), audio input components (e.g., microphones), etc.

[0308] The head-mounted wearable device 116 may also include additional peripheral device elements. Such peripheral device elements may include biometric sensors, additional sensors, or display elements integrated with the head-mounted wearable device 116. For example, peripheral device elements may include any I / O components, including output components, motion components, positioning components, or any other such components described herein.

[0309] For example, biometric components include those for detecting expressions (e.g., hand expressions, facial expressions, voice expressions, body posture, or eye tracking), measuring biosignals (e.g., blood pressure, heart rate, body temperature, sweating, or brain waves), and identifying people (e.g., voice recognition, retinal recognition, facial recognition, fingerprint recognition, or EEG-based recognition).

[0310] Moving components include accelerometer components (e.g., accelerometers), gravity sensor components, rotation sensor components (e.g., gyroscopes), etc. Positioning components include position sensor components (e.g., GPS receiver components) for generating position coordinates, Wi-Fi or Bluetooth™ transceivers for generating positioning system coordinates, altitude sensor components (e.g., altimeters or barometers that detect air pressure, from which altitude can be determined), orientation sensor components (e.g., magnetometers), etc. Such positioning system coordinates can also be received from mobile device 114 via low-power wireless circuit 1134 or high-speed wireless circuit 1132 through low-power wireless connection 1112 and high-speed wireless connection 1114.

[0311] Machine architecture

[0312] Figure 12This is a schematic representation of machine 1200, within which instructions 1202 (e.g., software, program, application, app, or other executable code) can be executed to cause machine 1200 to perform any or more of the methods discussed herein. For example, instructions 1202 can cause machine 1200 to perform any or more of the methods described herein. Instructions 1202 transform the general, unprogrammed machine 1200 into a specific machine 1200 programmed to perform the described and illustrated functions in the described manner. Machine 1200 can operate as a standalone device or can be coupled (e.g., networked) to other machines. In a networked deployment, machine 1200 can operate as a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment. Machine 1200 may include, but is not limited to, server computers, client computers, personal computers (PCs), tablet computers, laptop computers, netbooks, set-top boxes (STBs), personal digital assistants (PDAs), entertainment media systems, cellular phones, smartphones, mobile devices, wearable devices (e.g., smartwatches), smart home devices (e.g., smart appliances), other smart devices, web devices, network routers, network switches, network bridges, or any machine capable of sequentially or otherwise executing instructions 1202 specifying actions to be taken by machine 1200. Furthermore, although only a single machine 1200 is shown, the term "machine" should also be considered as a collection of machines that individually or jointly execute instructions 1202 to perform any or more of the methods discussed herein. For example, machine 1200 may include user system 102 or any of a plurality of server devices forming part of interactive server system 110. In some examples, machine 1200 may also include both client and server systems, wherein certain operations of a particular method or algorithm are performed on the server side and certain operations of said particular method or algorithm are performed on the client side.

[0313] Machine 1200 may include a processor 1204, a memory 1206, and an input / output (I / O) unit 1208 that can be configured to communicate with each other via a bus 1210. In the example, processor 1204 (e.g., a central processing unit (CPU), a reduced instruction set computing (RISC) processor, a complex instruction set computing (CISC) processor, a graphics processing unit (GPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a radio frequency integrated circuit (RFIC), another processor, or any suitable combination thereof) may include, for example, processors 1212 and 1214 that execute instruction 1202. The term "processor" is intended to include multi-core processors, which may include two or more independent processors (sometimes referred to as "cores") capable of executing instructions simultaneously. Although Figure 12 Multiple processors 1204 are shown, but machine 1200 may include a single processor with a single core, a single processor with multiple cores (e.g., a multi-core processor), multiple processors with a single core, multiple processors with multiple cores, or any combination thereof.

[0314] Memory 1206 includes main memory 1216, static memory 1218, and memory cells 1220, all of which are accessible by processor 1204 via bus 1210. Main memory 1206, static memory 1218, and memory cells 1220 store instructions 1202 that implement any one or more of the methods or functions described herein. Instructions 1202 may also reside wholly or partially within main memory 1216, static memory 1218, machine-readable medium 1222 within memory cell 1220, at least one processor of processor 1204 (e.g., within the processor's cache memory), or any suitable combination thereof during execution by machine 1200.

[0315] I / O component 1208 may include various components for receiving input, providing output, generating output, sending information, exchanging information, capturing measurement results, etc. The specific I / O component 1208 included in a particular machine will depend on the type of machine. For example, a portable machine such as a mobile phone may include a touch input device or other such input mechanism, while a headless server machine is unlikely to include such a touch input device. It should be recognized that I / O component 1208 may include... Figure 12Many other components are not shown. In various examples, I / O component 1208 may include user output component 1224 and user input component 1226. User output component 1224 may include visual components (e.g., displays such as plasma display panels (PDPs), light-emitting diode (LED) displays, liquid crystal displays (LCDs), projectors, or cathode ray tube (CRT) displays), acoustic components (e.g., speakers), haptic components (e.g., vibration motors, resistance mechanisms), other signal generators, etc. User input component 1226 may include alphanumeric input components (e.g., keyboards, touchscreens configured to receive alphanumeric input, optical keyboards, or other alphanumeric input components), pointing-based input components (e.g., mice, touchpads, trackballs, joysticks, motion sensors, or other pointing instruments), haptic input components (e.g., physical buttons, touchscreens or other haptic input components that provide the position and force of a touch or touch gesture), audio input components (e.g., microphones), etc.

[0316] In other examples, I / O component 1208 may include biometric component 1228, motion component 1230, environmental component 1232, or positioning component 1234, as well as a wide range of other components. For example, biometric component 1228 includes components for detecting expressions (e.g., hand expressions, facial expressions, voice expressions, body posture, or eye tracking), measuring biosignals (e.g., blood pressure, heart rate, body temperature, sweating, or brain waves), and identifying people (e.g., voice recognition, retinal recognition, facial recognition, fingerprint recognition, or EEG-based recognition).

[0317] The moving part 1230 includes an acceleration sensor part (e.g., an accelerometer), a gravity sensor part, and a rotation sensor part (e.g., a gyroscope).

[0318] The environmental component 1232 includes, for example, one or more camera devices (with still image / photograph and video capabilities), lighting sensor components (e.g., photometers), temperature sensor components (e.g., one or more thermometers for detecting ambient temperature), humidity sensor components, pressure sensor components (e.g., barometers), acoustic sensor components (e.g., one or more microphones for detecting background noise), proximity sensor components (e.g., infrared sensors for detecting nearby objects), gas sensors (e.g., gas detection sensors for detecting the concentration of hazardous gases for safety purposes or for measuring pollutants in the atmosphere), or other components that can provide indications, measurements, or signals corresponding to the surrounding physical environment.

[0319] Regarding the camera device, user system 102 may have a camera device system including, for example, a front-facing camera on the front surface of user system 102 and a rear-facing camera on the rear surface of user system 102. The front-facing camera may be used, for example, to capture still images and videos (e.g., "selfies") of the user of user system 102, which can then be enhanced with the aforementioned enhancement data (e.g., filters). The rear-facing camera may be used, for example, to capture still images and videos in a more conventional camera device mode, which are similarly enhanced with the enhancement data. In addition to the front-facing and rear-facing cameras, user system 102 may also include a 360° camera for capturing 360° photos and videos.

[0320] Furthermore, the camera system of user system 102 may include dual rear cameras (e.g., a main camera and a depth-sensing camera), or even triple, quadruple, or quintuple rear camera configurations on the front and rear sides of user system 102. For example, these multi-camera systems may include wide-angle cameras, ultra-wide-angle cameras, telephoto cameras, macro cameras, and depth sensors.

[0321] The positioning component 1234 includes a position sensor component (e.g., a GPS receiver component), an altitude sensor component (e.g., an altimeter or barometer that detects air pressure and can determine altitude based on air pressure), an orientation sensor component (e.g., a magnetometer), etc.

[0322] Various technologies can be used to achieve communication. I / O component 1208 also includes communication component 1236, which is operable to couple machine 1200 to network 1238 or device 1240 via a corresponding coupling or connection. For example, communication component 1236 may include a network interface component or other suitable device that interfaces with network 1238. In other examples, communication component 1236 may include wired communication component, wireless communication component, cellular communication component, near field communication (NFC) component, Bluetooth component, etc. ® Components (e.g., Bluetooth) ® Low energy consumption), Wi-Fi ® Components and other communication components for providing communication via other means. Device 1240 can be any peripheral device from another machine or various peripheral devices (e.g., a peripheral device coupled via USB).

[0323] Furthermore, communication component 1236 can detect identifiers, or includes components operable to detect identifiers. For example, communication component 1236 may include a radio frequency identification (RFID) tag reader component, an NFC smart tag detection component, an optical reader component (e.g., for detecting one-dimensional barcodes such as Universal Product Code (UPC) barcodes, such as Quick Response (QR) codes, Aztec codes, data matrices, and data symbols). TM The system can utilize optical sensors for multidimensional barcodes such as MaxiCode, PDF417, UltraCode, UCC RSS-2D, and other optical codes, or acoustic detection components (e.g., microphones for identifying audio signals of the tags). Additionally, various information can be obtained via communication components 1236, such as location obtained via Internet Protocol (IP) geolocation, location obtained via Wi-Fi® signal triangulation, or location obtained by detecting NFC beacon signals that indicate a specific location.

[0324] Various memories (e.g., main memory 1216, static memory 1218, and the memory of processor 1204) and storage unit 1220 may store one or more sets of instructions and data structures (e.g., software) implemented or used by any one or more of the methods or functions described herein. These instructions (e.g., instruction 1202) cause various operations to implement the disclosed examples when executed by processor 1204.

[0325] Instructions 1202 can be sent or received over network 1238 via a transmission medium using a network interface device (e.g., a network interface component included in communication component 1236) and using any of the known transmission protocols (e.g., Hypertext Transfer Protocol (HTTP)). Similarly, instructions 1202 can be sent or received via a transmission medium coupled to device 1240 (e.g., peer-to-peer coupling).

[0326] Software Architecture

[0327] Figure 13This is a block diagram 1300 illustrating a software architecture 1302 that can be installed on any or more devices described herein. The software architecture 1302 is supported by hardware, such as a machine 1304 including a processor 1306, memory 1308, and I / O components 1310. In this example, the software architecture 1302 can be conceptualized as a stack of layers, where each layer provides a specific function. The software architecture 1302 includes layers such as an operating system 1312, libraries 1314, frameworks 1316, and applications 1318. Operationally, application 1318 activates API calls 1320 via the software stack and receives messages 1322 in response to API calls 1320.

[0328] Operating system 1312 manages hardware resources and provides public services. Operating system 1312 includes, for example, a kernel 1324, services 1326, and drivers 1328. Kernel 1324 serves as an abstraction layer between hardware and other software layers. For example, kernel 1324 provides functions such as memory management, processor management (e.g., scheduling), component management, networking, and security settings. Services 1326 can provide other public services to other software layers. Drivers 1328 are responsible for controlling or interfacing with the underlying hardware. For example, drivers 1328 may include display drivers, camera drivers, BLUETOOTH® or BLUETOOTH® low-power drivers, flash memory drivers, serial communication drivers (e.g., USB drivers), Wi-Fi® drivers, audio drivers, power management drivers, etc.

[0329] Library 1314 provides common low-level infrastructure used by application 1318. Library 1314 may include system library 1330 (e.g., the C standard library), which provides functions such as memory allocation, string manipulation, and mathematical functions. Additionally, library 1314 may include API library 1332, such as media libraries (e.g., libraries for supporting the rendering and manipulation of various media formats, such as Moving Picture Experts Group-4 (MPEG4), Advanced Video Coding (H.264 or AVC), Moving Picture Experts Group Layer-3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR) audio codec, Joint Picture Experts Group (JPEG or JPG), or Portable Web Graphics (PNG)), graphics libraries (e.g., the OpenGL framework for rendering graphic content on a display in two-dimensional (2D) and three-dimensional (3D) formats), database libraries (e.g., SQLite, which provides various relational database functions), web libraries (e.g., WebKit, which provides web browsing capabilities), and so on. Library 1314 may also include a wide variety of other libraries 1334 to provide many other APIs to application 1318.

[0330] Framework 1316 provides common high-level infrastructure for use by application 1318. For example, framework 1316 provides various graphical user interface (GUI) functions, high-level resource management, and high-level location services. Framework 1316 can provide a wide range of other APIs that can be used by application 1318, some of which may be specific to a particular operating system or platform.

[0331] In the example, application 1318 may include home application 1336, contacts application 1338, browser application 1340, book reader application 1342, location application 1344, media application 1346, messaging application 1348, game application 1350, and a wide variety of other applications such as third-party application 1352. Application 1318 is a program that performs the functions defined in the program. One or more applications 1318 can be created using various programming languages, such as object-oriented programming languages ​​(e.g., Objective-C, Java, or C++) or procedural programming languages ​​(e.g., C or assembly language). In a particular example, third-party application 1352 (e.g., an application developed by an entity other than a platform-specific vendor using the Android™ or iOS™ Software Development Kit (SDK)) may be mobile software that runs on mobile operating systems such as iOS™, Android™, Windows® Phone, or other mobile operating systems. In this example, a third-party application 1352 can activate API call 1320 provided by the operating system 1312 to facilitate the functionality described herein.

[0332] Machine Learning Pipeline

[0333] Figure 15 This is a flowchart depicting a machine learning pipeline 1500 based on some examples. Machine learning pipeline 1500 can be used to generate the trained models described in this paper, such as... Figure 15 The trained machine learning program 1502 is used to perform operations associated with search and query responses.

[0334] Overview

[0335] In a broad sense, machine learning can involve using computer algorithms to automatically learn patterns and relationships in data, potentially without explicit programming after the algorithms have been trained. Examples of machine learning algorithms can be divided into three main categories: supervised learning, unsupervised learning, and reinforcement learning.

[0336] Supervised learning involves training a model using labeled data to predict outputs in response to new, unseen inputs. Examples of supervised learning algorithms include linear regression, decision trees, and neural networks.

[0337] Unsupervised learning involves training a model on unlabeled data to find hidden patterns and relationships within the data. Examples of unsupervised learning algorithms include clustering, principal component analysis, and generative models such as autoencoders.

[0338] Reinforcement learning involves training a model to make decisions in dynamic environments by receiving feedback in the form of rewards or penalties. Examples of reinforcement learning algorithms include Q-learning and policy gradient methods.

[0339] Examples of specific machine learning algorithms that can be deployed include logistic regression, a type of supervised learning algorithm used for binary classification tasks. Logistic regression models the probability of a binary response variable based on one or more predictor variables. Another example type of machine learning algorithm is Naive Bayes, another supervised learning algorithm used for classification tasks. Naive Bayes is based on Bayes' theorem and assumes that the predictor variables are independent of each other. Random forests are another type of supervised learning algorithm used for classification, regression, and other tasks. Random forests build an ensemble of decision trees and combine their outputs to make predictions. Further examples include neural networks, which consist of interconnected layers of nodes (or neurons) that process information based on input data and make predictions. Matrix factorization is another type of machine learning algorithm used for recommendation systems and other tasks. Matrix factorization decomposes a matrix into two or more matrices to uncover hidden patterns or relationships in the data. Support Vector Machines (SVMs) are a type of supervised learning algorithm used for classification, regression, and other tasks. SVMs find hyperplanes that separate different classes in the data. Other types of machine learning algorithms include decision trees, k-nearest neighbors, clustering algorithms, and deep learning algorithms such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), and transformer models. The choice of algorithm depends on the nature of the data, the complexity of the problem, and the performance requirements of the application.

[0340] The performance of a machine learning model is typically evaluated on a separate test dataset that was not used during training to ensure that the model can generalize to new, unseen data. Evaluating the model on a separate test set helps mitigate the risk of overfitting, a common problem in machine learning: a model learns to perform very well on the training data but fails to maintain that performance on previously unexplored data. By using a test set, the system obtains a more reliable estimate of the model's real-world performance and its potential effectiveness when deployed in practical applications.

[0341] While this article discusses several specific examples of machine learning algorithms, the principles discussed can be applied to other machine learning algorithms as well. Deep learning algorithms such as convolutional neural networks, recurrent neural networks, and transformers, as well as more traditional machine learning algorithms such as decision trees, random forests, and gradient boosting, can be used in a variety of machine learning applications.

[0342] Two typical types of problems in machine learning are classification problems and regression problems. Classification problems (also known as categorization problems) aim to classify an item into one of several category values ​​(e.g., is the object an apple or an orange?). Regression algorithms aim to quantify some items (e.g., by providing values ​​as real numbers).

[0343] stage

[0344] Generating a trained machine learning program 1502 may include various types of stages that form part of a machine learning pipeline 1500, including, for example... Figure 14 The following stages 1400 are shown:

[0345] Data Collection and Preprocessing 1402: This can include acquiring and cleaning data to ensure it is suitable for use in machine learning models. Data can be collected from user content creation and labeled using machine learning algorithms trained to label the data. Data can be generated by applying machine learning algorithms to identify or generate similar data. This can also include removing duplicates, handling missing values, and transforming the data into a suitable format.

[0346] Feature engineering 1404: This may include selecting and transforming training data 1504 to create features useful for predicting the target variable. Feature engineering may include: (1) receiving features 1506 (e.g., structured or labeled data in supervised learning) and / or (2) identifying features 1506 in the training data 1504 (e.g., unstructured or unlabeled data for unsupervised learning).

[0347] Model selection and training 1406: This can include specifying a particular problem or desired response from the input data, selecting a suitable machine learning algorithm, and training it on preprocessed data. It can also involve splitting the data into training and test sets, using cross-validation to evaluate the model, and tuning hyperparameters to improve performance. Model selection can be based on factors such as the type of data, problem complexity, computational resources, or desired performance.

[0348] Model Evaluation 1408: This can include evaluating the performance of a trained model (e.g., a trained machine learning program 1502) on a separate test dataset. This can help determine if the model is overfitting or underfitting, and whether the model is suitable for deployment.

[0349] Prediction 1410: This involves using a trained model (e.g., a trained machine learning program 1502) to generate predictions for new, unseen data.

[0350] Validation, improvement, or retraining 1412: This can include updating the model based on feedback generated during the prediction phase, such as new data or user feedback.

[0351] Deployment 1414: This can include integrating the trained model (e.g., a trained machine learning program 1502) into a larger system or application such as a web service, mobile application, or IoT device. This may involve setting up an API, building a user interface, and ensuring that the model is scalable and capable of handling large amounts of data.

[0352] Figure 15 Two example phases are shown: training phase 1508 (part of model selection and training 1406) and prediction phase 1510 (part of prediction 1410). Prior to training phase 1508, feature engineering 1404 is used to identify features 1506. This may include identifying informative, discriminative, and independent features for effectively operating the trained machine learning program 1502 in pattern recognition, classification, and regression. In some examples, training data 1504 includes labeled data that is known about the pre-identified features 1506 and one or more outcomes.

[0353] Each feature in feature 1506 can be a variable or attribute, such as a measurable property of a process, item, system, or phenomenon represented by a dataset (e.g., training data 1504). By way of example only, feature 1506 can also be different types of features such as numerical features, strings, vectors, matrices, codes, and graphs, and can include one or more of content 1512, concepts 1514, attributes 1516, historical data 1518, and / or user data 1520. Conceptual features can include abstract relationships or patterns in the data, such as determining the topic of a document or a discussion in a chat window between users. Content features include determining the context based on input information, such as determining the user's context based on user interaction or surrounding environmental factors. Contextual features can include: text features, such as the frequency or preference of words or phrases; image features, such as pixel, texture, or pattern recognition; audio classification, such as spectrograms, etc. Attribute features include intrinsic attributes (directly observable) or extrinsic features (derived), such as identifying the square footage, location, or age of real estate identified in a camera feed. User data characteristics include data relating to a specific individual or a group of individuals (e.g., in a geographic location or sharing demographic characteristics). User data can include demographic data (e.g., age, gender, location, or occupation), user behavior (e.g., browsing history, purchase history, conversion rates, click-through rates, or engagement metrics), or user preferences (e.g., preferences for certain video, text, or digital content items). Historical data includes past events or trends that can help identify patterns or relationships that change over time.

[0354] In the training phase 1508, the machine learning pipeline 1500 uses the training data 1504 to find correlations between features 1506 that affect the prediction results or the prediction / inference data 1522.

[0355] The trained machine learning program 1502 is trained during the training phase 1508 of the machine learning program training 1524 using training data 1504 and the identified features 1506. Machine learning program training 1524 evaluates the values ​​of feature 1506 as they relate to the training data 1504. The result of the training is the trained machine learning program 1502 (e.g., a trained or learned model).

[0356] Furthermore, the training phase 1508 may involve machine learning, in which the training data 1504 is structured (e.g., labeled during preprocessing operations), and the trained machine learning program 1502 implements a relatively simple neural network 1526 capable of performing operations such as classification and clustering. In other examples, the training phase 1508 may involve deep learning, in which the training data 1504 is unstructured, and the trained machine learning program 1502 implements a deep neural network 1526 capable of performing both feature extraction and classification / clustering operations.

[0357] In some examples, neural network 1526 may be generated during training phase 1508 and implemented within a trained machine learning program 1502. Neural network 1526 includes a hierarchical (e.g., layered) organization of neurons, where each layer includes multiple neurons or nodes. Neurons in the input layer receive input data, while neurons in the output layer produce the network's final output. Between the input and output layers, there may be one or more hidden layers, each containing multiple neurons.

[0358] In neural network 1526, each neuron operationally computes a small function, such as an activation function, which takes as input a weighted sum of the outputs of neurons in the previous layer and a bias term. The output of this function is then passed as input to neurons in the next layer. If the output of the activation function exceeds a certain threshold, the output is passed from that neuron (e.g., a sending neuron) to connected neurons (e.g., receiving neurons) in the next layer. The connections between neurons have associated weights that define the effect of input from the sending neuron on the receiving neuron. During the training phase, these weights are adjusted using a learning algorithm to optimize the network's performance. Different types of neural networks can use different activation functions and learning algorithms, which affects their performance on different tasks. Overall, the hierarchical organization of neurons and the use of activation functions and weights enable neural networks to model complex relationships between inputs and outputs and generalize to new inputs not seen during training.

[0359] In some examples, by way of example only, neural network 1526 can also be one of many different types of neural networks or combinations thereof, such as a single-layer feedforward network, a multilayer perceptron (MLP), an artificial neural network (ANN), a recurrent neural network (RNN), a long short-term memory network (LSTM), a bidirectional neural network, a symmetric connected neural network, a deep belief network (DBN), a convolutional neural network (CNN), a generative adversarial network (GAN), an autoencoder neural network (AE), a restricted Boltzmann machine (RBM), a Hopfield network, a self-organizing map (SOM), a radial basis function network (RBFN), a spiking neural network (SNN), a liquid state machine (LSM), an echo state network (ESN), a neural Turing machine (NTM), or a Transformer network.

[0360] In addition to the training phase 1508, a validation phase can also be performed and estimated on a separate dataset called the validation dataset. The validation dataset is used to tune the model's hyperparameters, such as the learning rate and regularization parameters. Tune the hyperparameters to improve the model's performance on the validation dataset.

[0361] The neural network 1526 is trained iteratively by adjusting model parameters to minimize a specific loss function or maximize a certain objective. The system can continue training the neural network 1526 by adjusting parameters based on the output of validation, improvement, or retraining blocks 1412, and rerunning predictions 1410 on new or previously run training data. The system can employ optimization techniques such as gradient descent, momentum algorithms, Nesterov accelerated gradient (NAG) algorithms, etc., for these adjustments. Even after the deployment 1414 of the neural network 1526, the system can continue to iteratively train the neural network 1526. The neural network 1526 can be continuously trained as new data (e.g., based on user-created or system-generated training data) becomes available.

[0362] Once the model is fully trained and validated, the testing phase allows it to be tested on new datasets that it has never seen before. The test dataset is used to evaluate the model's performance and ensure that it is not overfitting to the training data.

[0363] In the prediction phase 1510, a trained machine learning program 1502 uses features 1506 to analyze query data 1528 to generate inferences, results, or predictions, as examples of prediction / inference data 1522. For example, during the prediction phase 1510, the trained machine learning program 1502 is used to generate outputs. Query data 1528 is provided as input to the trained machine learning program 1502, and in response to receiving query data 1528, the trained machine learning program 1502 generates prediction / inference data 1522 as output. Query data may include prompts, such as a user-inputted text question or an audible spoken question. In some cases, the system generates queries based on interactions occurring within the system, such as a user interacting with a virtual object, a user sending a question to another user in a chat window, or an object being detected in a camera feed.

[0364] In some examples, the trained machine learning program 1502 can be a generative AI model. Generative AI is a term that can refer to any type of artificial intelligence capable of creating new content based on training data 1504. For example, generative AI can produce text, images, videos, audio, code, or synthetic data that are similar to but not identical to the original data.

[0365] Some of the techniques that can be used in generative AI are:

[0366] Convolutional Neural Networks (CNNs): CNNs are commonly used for image recognition and computer vision tasks. CNNs are designed to extract features from images by using filters or kernels that scan the input image and highlight important patterns. CNNs can be used in applications such as object detection, face recognition, and autonomous driving.

[0367] Recurrent Neural Networks (RNNs): RNNs are designed to process sequential data, such as speech, text, and time-series data. RNNs have feedback loops that enable them to capture temporal dependencies and remember past inputs. RNNs can be used in applications such as speech recognition, machine translation, and sentiment analysis.

[0368] Generative Adversarial Networks (GANs): These are models that consist of two neural networks: a generator and a discriminator. The generator attempts to create realistic content that can fool the discriminator, while the discriminator tries to distinguish between real and fake content. These two networks compete with each other and improve over time. GANs can be used in applications such as image synthesis, video prediction, and style transfer.

[0369] Variational autoencoders (VAEs): These are models that encode input data into a latent space (a compressed representation) and then decode it back to output data. The latent space can be manipulated to generate new variations in the output data. They can use self-attention mechanisms to process the input data, enabling them to handle long sequences of text and capture complex dependencies.

[0370] Transformer models: These are models that use attention mechanisms to learn the relationships between different parts of input data (such as words or pixels) and generate output data based on these relationships. Transformer models can handle sequential data such as text or speech, as well as non-sequential data such as images or code.

[0371] In the generative AI examples, the output prediction / inference data 1522 includes trend assessment and prediction, translation, summarization, image or video recognition and classification, natural language processing, facial recognition, user sentiment assessment, ad targeting and optimization, speech recognition or media content generation, recommendation and personalization.

[0372] Example

[0373] In view of the above-mentioned implementation methods, this application discloses the following list of examples, wherein a feature of a single example or more than one feature of an example is combined together, and optionally, is combined with one or more features of one or more other examples, which are also further examples falling within the disclosure of this application.

[0374] Example 1 is a system comprising: at least one processor; and at least one memory component storing instructions, which, when executed by the at least one processor, cause the at least one processor to perform operations, the operations including: acquiring a first latent diffusion machine learning model, the first latent diffusion machine learning model being trained to perform a first number of denoising steps; acquiring a second latent diffusion machine learning model derived from the first latent diffusion machine learning model, the second latent diffusion machine learning model being trained to perform a second number of denoising steps; generating noisy data; processing the noisy data via the first latent diffusion machine learning model to generate one or more first images; processing the noisy data via the second latent diffusion machine learning model to generate one or more second images; and modifying parameters of the second latent diffusion machine learning model based on a comparison of one or more first images with one or more second images.

[0375] In Example 2, the subject of Example 1 includes, wherein the operation further includes: reconstructing a first latent diffusion machine learning model to perform a third number of denoising steps, the first number of denoising steps being greater than the third number of denoising steps; and reconstructing a second latent diffusion machine learning model to perform a fourth number of denoising steps, the second number of denoising steps being greater than the fourth number of denoising steps, wherein processing noisy data via the first latent diffusion machine learning model includes: processing noisy data via the reconstructed first latent diffusion machine learning model, and wherein processing noisy data via the second latent diffusion machine learning model includes: processing noisy data via the reconstructed second latent diffusion machine learning model.

[0376] In Example 3, the subject of Example 2 includes the fact that the third number of denoising steps is half the number of the first number of denoising steps.

[0377] In Example 4, the subject of Examples 2 to 3 includes the fact that the second number of denoising steps is half the number of the fourth number of denoising steps.

[0378] In Example 5, the subject of Examples 2 to 4 includes the fact that the fourth number of denoising steps is half the number of the third number of denoising steps.

[0379] In Example 6, the topics of Examples 1 through 5 include, where the first and second potential diffusion machine learning models are stable diffusion models that include cross-attention blocks and ResNet blocks.

[0380] In Example 7, the topics of Examples 1 through 6 include obtaining a second latent diffusion machine learning model from a first latent diffusion machine learning model by reconstructing the UNet architecture of the first latent diffusion machine learning model.

[0381] In Example 8, the subject of Example 7 includes, where the refactoring of the UNet architecture includes: changing the architecture of the cross attention block and the ResNet block.

[0382] In Example 9, the subject matter of Examples 1 to 8 includes, wherein the first potential diffusion machine learning model includes a denoising architecture, and wherein the first number of denoising steps includes a plurality of iterations for transmitting the output of a previous iteration of the denoising architecture as input to the current iteration of the denoising architecture.

[0383] In Example 10, the subject of Example 9 includes the following: processing noisy data via a first latent diffusion machine learning model to generate one or more first images includes: iteratively processing the noisy data via a denoising architecture for a first number of denoising steps to generate first latent features, and processing the generated first latent features via a decoder of the first latent diffusion machine learning model to generate one or more first images.

[0384] In Example 11, the subject of Example 10 includes the following: processing noisy data via a second latent diffusion machine learning model to generate one or more second images includes: iteratively processing the noisy data via a denoising architecture for a third number of denoising steps to generate second latent features, and processing the generated second latent features via a decoder of the second latent diffusion machine learning model to generate one or more first images.

[0385] In Example 12, the subject of Example 11 includes the following: the decoder of the second latent diffusion machine learning model is the same as the decoder of the first latent diffusion machine learning model.

[0386] In Example 13, the subject matter of Examples 1 to 12 includes a comparison of one or more first images with one or more second images based on the mean square error between the images.

[0387] In Example 14, the subject of Example 13 includes changing parameters based on the value of the mean squared error.

[0388] In Example 15, the subject matter of Examples 1 to 14 includes processing noisy data via a first latent diffusion machine learning model, which includes adding random noise and an output image generated during a previous iteration to the first latent diffusion machine learning model to generate an output image for the current iteration.

[0389] In Example 16, the subject matter of Examples 1 to 15 includes, and the operation further includes: receiving a prompt for an image generated from a user; and processing the prompt via a second latent diffusion machine learning model with modified parameters to generate one or more images requested by the user.

[0390] In Example 17, the subject of Example 16 includes processing the output of a second latent diffusion machine learning model via a decoder to generate the output image for the current iteration.

[0391] Example 18 is a method comprising: obtaining a first latent diffusion machine learning model, the first latent diffusion machine learning model being trained to perform a first number of denoising steps; obtaining a second latent diffusion machine learning model derived from the first latent diffusion machine learning model, the second latent diffusion machine learning model being trained to perform a second number of denoising steps; generating noisy data; processing the noisy data via the first latent diffusion machine learning model to generate one or more first images; processing the noisy data via the second latent diffusion machine learning model to generate one or more second images; and modifying parameters of the second latent diffusion machine learning model based on comparisons of one or more first images with one or more second images.

[0392] In Example 19, the subject of Example 18 includes processing noisy data via a first latent diffusion machine learning model, which includes adding random noise and an output image generated during a previous iteration to the first latent diffusion machine learning model to generate an output image for the current iteration.

[0393] Example 20 is a non-transitory computer-readable storage medium comprising instructions that, when executed by a computer, cause the computer to: acquire a first latent diffusion machine learning model trained to perform a first number of denoising steps; acquire a second latent diffusion machine learning model derived from the first latent diffusion machine learning model trained to perform a second number of denoising steps; generate noisy data; process the noisy data via the first latent diffusion machine learning model to generate one or more first images; process the noisy data via the second latent diffusion machine learning model to generate one or more second images; and modify parameters of the second latent diffusion machine learning model based on a comparison of one or more first images with one or more second images.

[0394] Example 21 is at least one machine-readable medium including instructions that, when executed by processing circuitry, cause the processing circuitry to perform operations for implementing any one of Examples 1 to 20.

[0395] Example 22 is an apparatus that includes means for implementing any one of Examples 1 to 20.

[0396] Example 23 is a system for implementing any one of Examples 1 through 20.

[0397] Example 24 is one method for implementing any of Examples 1 through 20.

[0398] Glossary

[0399] "Client device" means any machine that interfaces with a communication network to obtain resources from one or more server systems or other client devices. Client devices can be, but are not limited to, mobile phones, desktop computers, laptop computers, portable digital assistants (PDAs), smartphones, tablet computers, ultrabooks, netbooks, laptop computers, multiprocessor systems, microprocessor-based or programmable consumer electronics, game consoles, set-top boxes, or any other communication device that a user can use to access the network.

[0400] "Communication network" means, for example, one or more parts of a network, which can be an ad hoc network, intranet, extranet, virtual private network (VPN), local area network (LAN), wireless LAN (WLAN), wide area network (WAN), wireless WAN (WWAN), metropolitan area network (MAN), the Internet, a part of the Internet, a part of the Public Switched Telephone Network (PSTN), a Common Old-Style Telephone Service (POTS) network, a cellular telephone network, a wireless network, a Wi-Fi® network, other types of networks, or a combination of two or more such networks. For example, a network or part of a network may include a wireless network or a cellular network, and the coupling may be a Code Division Multiple Access (CDMA) connection, a Global System for Mobile Communications (GSM) connection, or other types of cellular or wireless coupling. In this example, coupling can enable any data transmission technology of various types, such as single-carrier radio transmission technology (1xRTT), evolved data optimization (EVDO) technology, general packet radio service (GPRS) technology, enhanced data rate GSM evolution (EDGE) technology, the 3rd Generation Partnership Project (3GPP) including 3G, fourth-generation wireless (4G) networks, Universal Mobile Telecommunications System (UMTS), High-Speed ​​Packet Access (HSPA), Global Microwave Access Interoperability (WiMAX), Long Term Evolution (LTE) standards, other data transmission technologies defined by various standards setting organizations, other long-distance protocols, or other data transmission technologies.

[0401] A “component” refers to a logical or physical entity having boundaries defined by functional or subroutine calls, branch points, APIs, or other technologies that provide partitioning or modularity for a particular processing or control function. A component can be combined with other components via its interface to perform machine processing. A component can be an encapsulated functional hardware unit designed for use with other components, and part of a program that typically performs a related function. A component can constitute a software component (e.g., code embodied on a machine-readable medium) or a hardware component. A “hardware component” is a tangible unit capable of performing certain operations and can be configured or arranged in some physical manner. In various examples, one or more computer systems (e.g., standalone computer systems, client computer systems, or server computer systems) or one or more hardware components (e.g., processors or processor groups) of a computer system can be configured by software (e.g., an application or application portion) to operate to perform specific operations as described herein. Hardware components can also be implemented mechanically, electronically, or in any suitable combination thereof. For example, a hardware component can include dedicated circuitry or logic permanently configured to perform certain operations. Hardware components can be dedicated processors, such as field-programmable gate arrays (FPGAs) or application-specific integrated circuits (ASICs). Hardware components can also include programmable logic or circuitry temporarily configured by software to perform certain operations. For example, a hardware component may include software executed by a general-purpose processor or other programmable processor. Once configured by such software, the hardware component becomes a particular machine (or a specific part of a machine) that is uniquely tailored to perform the configured function and is no longer a general-purpose processor. It will be appreciated that a decision may be made, for cost and time considerations, whether to implement a hardware component mechanically in a dedicated and permanently configured circuit or in a temporarily configured (e.g., software-configured) circuit. Therefore, the phrase “hardware component” (or “hardware-implemented component”) should be understood to include tangible entities, i.e., entities physically constructed, permanently configured (e.g., hardwired), or temporarily configured (e.g., programmed) to operate in a certain way or perform certain operations described herein. Consider the example of a hardware component being temporarily configured (e.g., programmed), without needing to configure or instantiate each hardware component at any given time. For example, in cases where the hardware components include a general-purpose processor that is configured as a dedicated processor via software, this general-purpose processor can be configured as its own distinct dedicated processor (e.g., including different hardware components) at different times. The software accordingly configures one or more specific processors to constitute a particular hardware component at one moment and different hardware components at different times. Hardware components can provide information to and receive information from other hardware components. Therefore, the described hardware components can be considered communicatively coupled.In the presence of multiple hardware components, communication can be achieved through signal transmission between or among two or more hardware components (e.g., via appropriate circuitry and buses). In examples where multiple hardware components are configured or instantiated at different times, such communication between hardware components can be achieved, for example, by storing information in a memory structure accessible to the multiple hardware components and retrieving information from the memory structure. For example, a hardware component can perform an operation and store the output of that operation in a memory device communicatively coupled to it. Another hardware component can then access the memory device at a subsequent time to retrieve and process the stored output. Hardware components can also initiate communication with input or output devices and can operate on resources (e.g., collections of information). The various operations of the example methods described herein can be performed, at least in part, by one or more processors configured, either temporarily (e.g., by software) or permanently, to perform the relevant operations. Whether temporarily or permanently configured, such processors can constitute processor-implemented components that operate to perform one or more operations or functions described herein. As used herein, "processor-implemented component" refers to a hardware component implemented using one or more processors. Similarly, the methods described herein can be implemented at least in part by processors, where one or more specific processors are examples of hardware. For example, at least some of the various operations of the methods can be performed by one or more processors or processor-implemented components. Furthermore, one or more processors can also operate to support the execution of related operations in a “cloud computing” environment or as a “Software as a Service” (SaaS) operation. For example, at least some of the operations can be performed by a group of computers (as an example of machines including processors), where these operations are accessible via a network (e.g., the Internet) and via one or more appropriate interfaces (e.g., APIs). The execution of some operations can be distributed among processors, not residing within a single machine, but deployed across multiple machines. In some examples, the processors or processor-implemented components can reside in a single geographic location (e.g., in a home environment, office environment, or server cluster). In other examples, the processors or processor-implemented components can be distributed across multiple geographic locations.

[0402] "Computer-readable storage medium" refers to both, for example, machine storage media and transmission media. Therefore, these terms include both storage devices / media and carrier / modulated data signals. The terms "machine-readable medium," "computer-readable medium," and "device-readable medium" refer to the same thing and can be used interchangeably in this disclosure.

[0403] "Machine storage medium" refers to one or more storage devices and media (e.g., centralized or distributed databases, and associated caches and servers) that store executable instructions, routines, and data. Therefore, this term should be considered to include, but is not limited to, solid-state memory and optical and magnetic media, including memory internal or external to the processor. Specific examples of machine storage media, computer storage media, and device storage media include: non-volatile memory, including, for example, semiconductor memory devices such as erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), FPGAs, and flash memory devices; disks, such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The terms "machine storage medium," "device storage medium," and "computer storage medium" mean the same thing and may be used interchangeably in this disclosure. The terms "machine storage medium," "computer storage medium," and "device storage medium" expressly exclude carrier waves, modulated data signals, and other such media, at least some of which are covered by the term "signal medium."

[0404] "Non-transitory computer-readable storage medium" means, for example, a tangible medium capable of storing, encoding, or carrying instructions that can be executed by a machine.

[0405] in conclusion

[0406] As used in this disclosure, phrases in the form of "at least one of A, B, or C", "at least one of A, B, or C", "at least one of A, B, and C", etc., should be interpreted as selecting at least one from the group including "A, C, and B". Unless explicitly stated otherwise in connection with specific instances in this disclosure, this phrasing does not imply "at least one of A, at least one of B, and at least one of C". As used in this disclosure, the example "at least one of A, B, or C" will cover any of the following selections: {A}, {B}, {C}, {A, B}, {A, C}, {B, C}, and {A, B, C}.

[0407] Unless the context explicitly requires it, throughout the specification and claims, the words “comprising,” “including,” etc., shall be interpreted in an inclusive sense rather than an exclusive or exhaustive sense; that is, meaning “including but not limited to.” As used herein, the terms “connection,” “coupled,” or any variation thereof refer to any direct or indirect connection or coupling between two or more elements; the coupling or connection between elements may be physical, logical, or a combination thereof. Additionally, when used in this application, the words “in this document,” “above,” “below,” and words with similar meanings refer to the application as a whole and not to any particular part of the application. Where the context permits, the use of singular or plural terms may also include the plural or singular, respectively. When referring to a list of two or more items, the word “or” covers all of the following interpretations of the word: any item in the list, all items in the list, and any combination of items in the list. Similarly, with respect to a list of two or more items, the term “and / or” covers all of the following interpretations of the word: any item in the list, all items in the list, and any combination of items in the list.

[0408] While some examples (such as those depicted in the accompanying figures) include a specific order of operations, this order can be changed without departing from the scope of this disclosure. For example, some operations in the depicted operations may be performed in parallel or in a different order that does not substantially affect the functionality described in the examples. In other examples, different components of an example device or system implementing the example methods may perform their functions substantially simultaneously or in a specific order.

[0409] The various features, steps, and processes described herein can be used independently of each other or in combination in various ways. All possible combinations and sub-combinations are intended to fall within the scope of this disclosure. Additionally, certain methods or processing blocks may be omitted in some implementations.

Claims

1. A system comprising: At least one processor; as well as At least one memory component storing instructions, which, when executed by the at least one processor, cause the at least one processor to perform an operation, the operation including: A first latent diffusion machine learning model is obtained, and the first latent diffusion machine learning model is trained to perform a first number of denoising steps; A second latent diffusion machine learning model is obtained from the first latent diffusion machine learning model, and the second latent diffusion machine learning model is trained to perform a second number of denoising steps; Generate noisy data; The noisy data is processed via the first latent diffusion machine learning model to generate one or more first images; The noisy data is processed via a second latent diffusion machine learning model to generate one or more second images; and The parameters of the second latent diffusion machine learning model are modified based on a comparison of the one or more first images with the one or more second images.

2. The system according to claim 1, wherein, The operation also includes: Reconstruct the first latent diffusion machine learning model to perform a third number of denoising steps, where the first number of denoising steps is greater than the third number of denoising steps; and The second latent diffusion machine learning model is reconstructed to perform a fourth number of denoising steps, where the second number of denoising steps is greater than the fourth number of denoising steps. The process of processing the noise data via the first latent diffusion machine learning model includes: processing the noise data via a reconstructed first latent diffusion machine learning model, and The process of processing the noisy data via the second latent diffusion machine learning model includes: processing the noisy data via a reconstructed second latent diffusion machine learning model.

3. The system according to claim 2, wherein, The third number of denoising steps is half the number of the first number of denoising steps.

4. The system according to claim 2, wherein, The second number of denoising steps is half the number of the fourth number of denoising steps.

5. The system according to claim 2, wherein, The fourth number of denoising steps is half the number of the third number of denoising steps.

6. The system according to claim 1, wherein, The first potential diffusion machine learning model and the second potential diffusion machine learning model are stable diffusion models that include cross-attention blocks and ResNet blocks.

7. The system according to claim 1, wherein, The second potential diffusion machine learning model is obtained from the first potential diffusion machine learning model by reconstructing the UNet architecture of the first potential diffusion machine learning model.

8. The system according to claim 7, wherein, The reconstruction of the UNet architecture includes changing the architecture of the cross-attention block and the ResNet block.

9. The system according to claim 1, wherein, The first potential diffusion machine learning model includes a denoising architecture, and wherein the first number of denoising steps includes a plurality of iterations for transmitting the output of a previous iteration of the denoising architecture as input to the current iteration of the denoising architecture.

10. The system according to claim 9, wherein, Processing the noisy data via the first latent diffusion machine learning model to generate one or more first images includes: iteratively processing the noisy data via the denoising architecture for the first number of denoising steps to generate first latent features, and processing the generated first latent features via the decoder of the first latent diffusion machine learning model to generate the one or more first images.

11. The system according to claim 10, wherein, Processing the noisy data via the second latent diffusion machine learning model to generate one or more second images includes: iteratively processing the noisy data via a denoising architecture for a third number of denoising steps to generate second latent features, and processing the generated second latent features via a decoder of the second latent diffusion machine learning model to generate the one or more first images.

12. The system according to claim 11, wherein, The decoder of the second latent diffusion machine learning model is the same as the decoder of the first latent diffusion machine learning model.

13. The system according to claim 1, wherein, The comparison of the one or more first images with the one or more second images is based on the mean square error between the images.

14. The system according to claim 13, wherein, The parameter is changed based on the value of the mean square error.

15. The system according to claim 1, wherein, Processing the noisy data via the first latent diffusion machine learning model includes adding random noise and the output image generated during the previous iteration to the first latent diffusion machine learning model, such that the output image of the current iteration is generated.

16. The system according to claim 1, wherein the operation further comprises: Receive prompts for images generated by the user; as well as The prompts are processed via a second latent diffusion machine learning model with modified parameters to generate one or more user-requested images.

17. The system according to claim 16, wherein, The output of the second latent diffusion machine learning model is processed by a decoder to generate the output image of the current iteration.

18. A method comprising: A first latent diffusion machine learning model is obtained, and the first latent diffusion machine learning model is trained to perform a first number of denoising steps; A second latent diffusion machine learning model is obtained from the first latent diffusion machine learning model, and the second latent diffusion machine learning model is trained to perform a second number of denoising steps; Generate noisy data; The noisy data is processed via the first latent diffusion machine learning model to generate one or more first images; The noisy data is processed via a second latent diffusion machine learning model to generate one or more second images; as well as The parameters of the second latent diffusion machine learning model are modified based on a comparison of the one or more first images with the one or more second images.

19. The method according to claim 18, wherein, Processing the noisy data via the first latent diffusion machine learning model includes adding random noise and the output image generated during the previous iteration to the first latent diffusion machine learning model, such that the output image of the current iteration is generated.

20. A non-transitory computer-readable storage medium, the computer-readable storage medium comprising instructions that, when executed by a computer, cause the computer to: A first latent diffusion machine learning model is obtained, and the first latent diffusion machine learning model is trained to perform a first number of denoising steps; A second latent diffusion machine learning model is obtained from the first latent diffusion machine learning model, and the second latent diffusion machine learning model is trained to perform a second number of denoising steps; Generate noisy data; The noisy data is processed via the first latent diffusion machine learning model to generate one or more first images; The noisy data is processed via a second latent diffusion machine learning model to generate one or more second images; as well as The parameters of the second latent diffusion machine learning model are modified based on a comparison of the one or more first images with the one or more second images.

Citation Information

Cited By

  • Loss determination for latent diffusion models

    US12705875B2