Text-to-image diffusion model reconstruction
By optimizing and retraining the architecture of the text-to-image diffusion model, the problems of computational complexity and resource requirements were solved, enabling efficient and fast text-to-image generation on mobile devices, improving generation performance and addressing privacy issues.
Patent Information
- Application Number
- CN202480035103.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-05-13
- Publication Date
- 2026-01-13
AI Technical Summary
Traditional text-to-image diffusion models are computationally complex, resource-intensive, difficult to run on mobile devices, and suffer from privacy issues and long inference times, limiting their widespread application.
By retraining and optimizing the architecture of machine learning models to adapt to computing resources and performance characteristics, specific model blocks can be dynamically added or removed, reducing computational requirements and accelerating the inference process.
It enables efficient and fast text-to-image generation on mobile devices, reduces computing resource requirements, improves generation performance, and solves privacy issues.
Smart Images

Figure CN121336210A_ABST
Abstract
Description
[0001] Priority rights
[0002] This application claims the benefit of priority to U.S. Provisional Application No. 63 / 504,563, filed May 26, 2023, and U.S. Patent Application No. 18 / 400,873, filed December 29, 2023, each of which is incorporated herein by reference in its entirety. Technical Field
[0003] This disclosure generally relates to machine learning models, and more specifically to text-to-image machine learning models. Background Technology
[0004] With the increasing prevalence of artificial intelligence (AI), companies are using machine learning models in various ways, which is transforming how visual data is processed, analyzed, and interacted with. The use of AI in image processing involves training algorithms, particularly deep learning models such as convolutional neural networks (CNNs), to perform tasks ranging from low-level image manipulation to high-level understanding and the generation of visual content. Some prominent applications of AI in images include image classification, object detection, image segmentation, face recognition, and style transfer. Attached Figure Description
[0005] In the accompanying drawings (which are not necessarily drawn to scale), similar reference numerals may describe similar parts in different views. To more easily identify discussions of any particular element or action, one or more of the highest-order digits in the reference numerals indicate the drawing number in which the element was first introduced. Some non-limiting examples are shown in the accompanying drawings:
[0006] Figure 1 It is a graphical representation of a networked environment in which the present disclosure can be deployed, based on some examples.
[0007] Figure 2 It is a graphical representation of an interactive system with both client-side and server-side functionality, based on some examples.
[0008] Figure 3 It is a graphical representation based on examples such as data structures maintained in a database.
[0009] Figure 4 An architecture 400 for a stable diffusion model is shown, based on some examples.
[0010] Figure 5 Example method 500 for reconstructing a machine learning model is shown based on some examples.
[0011] Figure 6The architecture for UNet and removing cross attention blocks is shown.
[0012] Figure 7 The diagram illustrates how to add machine learning blocks to a machine learning model, based on some examples.
[0013] Figure 8 The latency and parameter analysis of the cross-attention block and ResNet block in UNet are shown based on some examples of stable diffusion machine learning models.
[0014] Figure 9 The diagram illustrates noise addition and denoising based on some example images.
[0015] Figure 10 It is a graphical representation based on some example messages.
[0016] Figure 11 A system including a head-mounted device with a selector input device is shown according to some examples.
[0017] Figure 12 It is a graphical representation of a machine in the form of a computer system, based on some examples, within which a set of instructions can be executed to cause the machine to perform any or more of the methods discussed herein.
[0018] Figure 13 It is a block diagram showing the software architecture in which examples can be implemented.
[0019] Figure 14 The machine learning pipeline is shown based on some examples.
[0020] Figure 15 The training and use of machine learning programs are illustrated using some examples. Detailed Implementation
[0021] Text-to-image machine learning models generate images based on text 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 text descriptions and corresponding images. Once trained, the model is used to generate images from text descriptions. The generated images may not be exact copies of the input descriptions, but they capture the essential and key elements of the descriptions in the text.
[0022] 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 intricate network architectures and numerous denoising iterations, which increase computational complexity.
[0023] Furthermore, traditional diffusion models are not optimized for individual devices such as mobile phones. The computational demands and complex architectures make it impractical to run these models on resource-constrained mobile platforms.
[0024] Another challenge is the high computational cost. Running such models requires high-end graphics processing units (GPUs) and often relies on cloud-based inference, which limits scalability and accessibility.
[0025] Using cloud-based inference also involves sending user data to third-party servers, which raises privacy concerns when sensitive information is exposed to external entities. Users may hesitate to share their data, especially when dealing with personal or confidential content.
[0026] Furthermore, the numerous denoising steps in traditional models result in long inference times. This latency hinders real-time applications, interactive experiences, or scenarios that require or expect rapid image generation from text descriptions.
[0027] Due to the challenges mentioned above, traditional text-to-image diffusion models remain limited to a small number of platforms with access to high-end hardware and computing resources. This restricts the widespread adoption of these powerful models.
[0028] The example interactive system described in this paper applies various modifications to the machine learning model that mitigate and / or eliminate the shortcomings of traditional stable diffusion models in the context of text-to-image generation. Some variants involve retraining the existing machine learning model, while others involve architectural and functional changes to the machine learning model.
[0029] In some cases, the interactive system has been retrained to a stable diffusion machine learning model that performs iterative denoising. The interactive system enhances the legacy model by dynamically adapting the architecture of the machine learning model to optimize for latency, memory, and / or other performance characteristics. The system achieves this by selectively adding or removing specific blocks from the machine learning model based on these characteristics. Advantageously, these machine learning models significantly accelerate the inference process while maintaining generative performance.
[0030] In summary, text-to-image machine learning models have the potential to generate images based on text descriptions, capturing the essential 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 provides a solution to these challenges.
[0031] By retraining and optimizing machine learning models, such as stable diffusion models, interactive systems adapt their architecture and fine-tune the models. This results in accelerated inference, improved latency, reduced computational requirements, and maintained generative performance.
[0032] These advancements have made text-to-image generation accessible on a wide range 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, enabling users to create visual content effortlessly.
[0033] 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 functions described 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 the image generation process. Thus, computational resources used by one or more machines, databases, or networks can be utilized more efficiently or even reduced.
[0034] Networked computing environment
[0035] Figure 1 This is a block diagram illustrating an example interactive system 100 for facilitating interactions over a network, such as exchanging text messages, making text audio and video calls, or playing games. Interactive system 100 includes multiple user systems 102, each hosting multiple applications including interactive client 104 and other applications 106. Each interactive client 104 is communicatively coupled to (e.g., hosted on corresponding other user systems 102) other instances of interactive client 104, interactive server system 110, and third-party server 112 via one or more communication networks including network 108 (e.g., the Internet). Interactive client 104 can also communicate with locally hosted applications 106 using application programming interfaces (APIs).
[0036] Each user system 102 may include multiple user devices, such as mobile devices 114, head-mounted wearable devices 116, and computer client devices 118, that are communicatively connected to exchange data and messages.
[0037] 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).
[0038] 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 within interactive client 104 or interactive server system 110 may be a design choice. For example, it may be technically preferred that specific technologies and functions are initially deployed within interactive server system 110, but later migrated to interactive client 104, where user system 102 has sufficient processing power.
[0039] 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.
[0040] 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.
[0041] API server 122 receives and sends interactive data (e.g., command and message payloads) between interactive server 124 and user system 102 (as well as 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 can be invoked or queried by interactive client 104 and other applications 106 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 graph (e.g., entity graph 310); locating friends within the entity graph; and opening (e.g., application events associated with interactive client 104).
[0042] Interactive server 124 hosts multiple systems and subsystems, as shown below. Figure 2 Describe it.
[0043] Application of links
[0044] Returning to interactive client 104, the features and functionality of external resources (e.g., linked application 106 or applet) become 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 functionality of the application (e.g., the full-scale, native 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., ...), other features may also be implemented using markup language documentation. In addition to ml files, mini-programs can include scripting languages (e.g., ...). .js files or .json files) and stylesheets (e.g., ...). (SS file).
[0045] 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 interactive client 104 by receiving, for example, markup language documents associated with the smaller application from third-party server 112 and processing such documents.
[0046] 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.
[0047] 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 the corresponding 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 with, 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.
[0048] 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 in a context-sensitive menu. For example, the icons representing different applications 106 (or mini-programs) can vary based on how the user launches the menu (e.g., from a conversational interface or from a non-conversational interface).
[0049] System Architecture
[0050] Figure 2 This is a block diagram illustrating further details of an 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 the microservice subsystem to operate independently and communicate with other services. Example components of a microservice subsystem may include:
[0051] Functional logic: Functional logic implements the functions of the microservice subsystem and represents the specific capabilities or functions provided by the microservice.
[0052] 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.
[0053] Data storage: The microservice subsystem can be responsible for its own data storage, which can take the form of a database, cache, or other storage mechanisms (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.
[0054] Service discovery: Microservice subsystems can find and communicate with other microservice subsystems in the interactive system 100. The service discovery mechanism enables microservice subsystems to locate and communicate with other microservice subsystems in a scalable and efficient manner.
[0055] Monitoring and logging: Microservice subsystems may need to be monitored and logged to ensure availability and performance. Monitoring and logging mechanisms enable the tracking of the health and performance of microservice subsystems.
[0056] In some examples, the interactive system 100 may employ a monolithic architecture, a service-oriented architecture (SOA), a function-as-a-service (FaaS) architecture, or a modular architecture:
[0057] The example subsystem is discussed below.
[0058] 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.
[0059] The camera device system 204 includes (e.g., in a camera device application) control software that interacts with and controls the camera device hardware of the user system 102 (e.g., directly or via operating system controls) to modify and enhance real-time images captured and displayed via the interactive client 104.
[0060] 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 and presented to the user of interactive client 104 by enhancement system 206 based on multiple inputs and data, such as:
[0061] The geographic location of user system 102; and
[0062] User entity relationship information of users in user system 102.
[0063] 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.
[0064] 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 Cafe). In other examples, image processing system 202 uses the geolocation of user system 102 to identify media overlays that include the names of businesses located at the geolocation 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.
[0065] Image processing system 202 provides a user-based publishing platform that allows users to select a geographic location on a map and upload content associated with that location. 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 geographic location.
[0066] 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.
[0067] In some examples, enhancement creation system 214 provides a merchant-based publishing platform that enables merchants to select specific enhancements associated with geolocation via a bidding process. For example, enhancement creation system 214 associates the media overlay of the highest bidder with a corresponding geolocation for a predefined amount of time.
[0068] 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-lived timer system) multiple timers that selectively enable access to messages and associated content via interactive client 104 (e.g., for presentation and display) 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.
[0069] 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).
[0070] 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 galleries" or "event stories." Such collections can be made available for a specified time period (e.g., the duration of an event related to the content). 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 allows 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 the collection. In such a case, the collection management system 220 operates to automatically pay such users for access to its content.
[0071] Map system 222 provides various geolocation (e.g., location services) 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 the map to indicate the current or past locations of the user's "friends" in the context of the map, as well as media content generated by such 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 geolocation to interactive system 100 can be displayed to the specific user's "friends" in the context of that specific location on the map. 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 in the context of the map interface of interactive client 104.
[0072] 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).
[0073] 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.
[0074] 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.
[0075] 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 look and feel of the interactive client 104. To bridge communication between the external resources and the interactive client 104, the SDK facilitates communication between a 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.
[0076] 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 art 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 a feature of the web-based external resource through the graphical user interface (GUI) of the interactive client 104, the interactive client 104 obtains the HTML5 file and instantiates the resource for accessing the feature of the web-based external resource.
[0077] 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 the user data of interactive client 104. In response to determining that the initiated external resource has previously been authorized to access the 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 the 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 or other part of the screen) to authorize the external resource to access the 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 the user data from interactive client 104. External resources are authorized by the interactive client 104 to access user data under the OAuth 2 framework.
[0078] Interactive client 104 controls the type of user data shared with external resources based on the type of authorized external resource. For example, it provides access to a first type of user data (e.g., a two-dimensional avatar of a user with or without different avatar characteristics) to external resources including full-scale applications (e.g., application 106). As another example, it provides 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) 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 and feel of an avatar (e.g., different poses, facial features, clothing, etc.).
[0079] The advertising system 228 enables third parties to purchase advertisements to be presented to end users via the interactive client 104, and also handles the delivery and presentation of these advertisements.
[0080] 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. This information can then be used by image processing system 202 to enhance, filter, or manipulate images. AI and machine learning system 230 can be used by enhancement system 206 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, as well as to 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. Artificial intelligence and machine learning system 230 can also work with audio communication system 216 to provide speech recognition and natural language processing capabilities, enabling users to interact with interactive system 100 using voice commands.
[0081] Data Architecture
[0082] 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.
[0083] 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.
[0084] Entity table 308 stores entity data and (for example, links to entity diagram 310 and profile data 302). Entities for which records are maintained in entity table 308 may 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 identified entity. Each entity is assigned a unique identifier and an entity type identifier (not shown).
[0085] 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 commercial 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 a mutual agreement between two entities. This mutual agreement can be established through a proposal to establish a friendship from the first entity to the second entity, and the second entity accepting the proposal to establish a friendship.
[0086] 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, a username, 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. The 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.
[0087] In the case that the entity is a group, in addition to the group name, members and various settings (e.g., notifications) for the relevant group, the profile data 302 for the group may similarly include one or more avatar representations associated with the group.
[0088] 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).
[0089] 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 user-selected filters 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 geolocation information determined by the Global Positioning System (GPS) unit of the user system 102.
[0090] 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 the message creation process. 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.
[0091] 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.
[0092] As described above, augmented data includes augmented reality content items, overlays, image transformations, AR images, and similar terms referring 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 camera devices) 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, which has access to multiple augmented reality content items, 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, preview features 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.
[0093] Therefore, using data from augmented reality content items and various systems, or other systems that modify content using that data, can involve the detection of 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 them while tracking them. In various examples, different methods can be used to implement such transformations. Some examples may involve generating 3D mesh models of one or more objects; and using transformations of the models and animated textures within the video to implement the transformations. In some examples, tracking points on the objects can be used to place images or textures (which can be two-dimensional or three-dimensional) at the tracked locations. In yet another example, neural network analysis of video frames can be used to place images, models, or textures within the content (e.g., images or video frames). Thus, augmented reality content items involve both images, models, and textures used to create transformations within the content, and the additional modeling and analysis information required to implement such transformations using object detection, tracking, and placement.
[0094] 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. Furthermore, 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).
[0095] 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 detected and tracked if the element to be transformed exists in a frame of the video. The elements of the object are modified according to the modification request, thereby transforming the frames of the video stream. Different methods can be used to perform transformations on the frames of the video stream for different types of transformations. For example, for a transformation of frames that primarily involves changing the form of elements of an object, feature points of each element of the object are calculated. Then, a feature-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 tracking, the mesh for each element is aligned with the position of each element. Additional points are then generated on the mesh.
[0096] In some examples, transformations that alter certain regions of an object using its features can be performed by computing feature points for each feature of the object and generating a mesh based on those points. Points are generated on the mesh, and then various regions are generated based on those points. The features of the object are then tracked by aligning the regions of each feature with the positions of at least one of the features, 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 features 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 feature 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.
[0097] 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), secondary 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 translation, scaling, and rotation). The mean shape is the average of the aligned training shapes.
[0098] The 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 a suitable 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 convolutional neural networks configured to execute efficiently on user system 102.
[0099] 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 computer-animated models for transforming the image data, or the computer-animated models 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, while a video stream is being captured, modifications can be persistent, and the selected modification icon remains toggled. Machine-trained neural networks can be used to implement such modifications.
[0100] 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., for each user whose records are maintained in entity table 308). A user can create a "personal story" in the form of a collection of content that has been created and sent / broadcast by that user. For this purpose, the user interface of interactive client 104 may include user-selectable icons that allow the sending user to add specific content to his or her personal story.
[0101] 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 technologies. For example, a "live story" can constitute a curated stream of user-submitted content from various locations and events. Users whose client devices have location services enabled and who are at a co-located 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 community perspective.
[0102] 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).
[0103] 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.
[0104] Overview
[0105] Text-to-image diffusion models create images comparable to those produced by professional artists and photographers based on natural language descriptions. However, these traditional models are large, have complex network architectures, and require numerous 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.
[0106] To overcome these challenges, the interactive system described in this paper modifies and / or retrains existing legacy models to mitigate and / or eliminate these shortcomings by introducing efficient network architectures and improving step-by-step extraction. In some cases, the interactive system identifies and removes redundancy from the original model.
[0107] Diffusion-based text-to-image models have shown significant progress in synthesizing photorealistic content using text cues. These models profoundly impact content creation, image editing and restoration, super-resolution, video compositing, 3D asset generation, and more. However, this impact comes at the cost of a significant 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 stemming from the mere fact that private images, videos, and cues can be sent to third-party services.
[0108] Efforts are emerging to accelerate the inference process of text-to-image diffusion models on mobile devices. Recent work has used quantization or GPU-aware optimizations to reduce runtime. While these methods effectively achieve some speedup on mobile platforms, latency does not allow for a seamless user experience. Furthermore, existing research has not systematically examined the generated quality of models on-device through quantitative analysis.
[0109] In some cases, interactive systems employ text-to-image diffusion models that generate images on mobile devices in a very short time (e.g., less than 2 seconds). These models improve upon UNet's slow inference speed (described further in this paper) and reduce the number of necessary denoising steps.
[0110] First, the UNet architecture, which is the main latency bottleneck for conditional diffusion models, is rarely optimized. Existing work mainly focuses on post-training optimization. Conventional compression techniques (e.g., model pruning and architecture search) degrade the performance of pre-trained diffusion models, which is difficult to recover without fine-tuning. At the same time, architectural redundancy is not fully utilized, resulting in limited speedup.
[0111] Secondly, the flexibility of the denoising diffusion process has not been well explored for client-side inference. Directly reducing the number of denoising steps will affect the performance of the generative model, while stepwise extraction steps can mitigate the performance impact.
[0112] 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 obtain an efficient UNet that performs similarly to the original stable diffusion model while being significantly faster.
[0113] Stable diffusion model
[0114] The diffusion model distributes sample x from the true data distribution p. data (x) is gradually transformed into a noisy version (e.g., a diffusion process), and learns to reverse this process by progressively denoising the noisy data. The model transforms a simple distribution (e.g., random Gaussian noise) into a more complex distribution (e.g., a realistic image). Specifically, given a... Parameterized (noise prediction) diffusion model This diffusion model is typically constructed as a UNet, and its training can be formulated as the following noise prediction problem:
[0115]
[0116] Where t refers to the time step; It is ground-truth noise; The data is noisy; α t and These are the signal and noise intensities, determined by the noise scheduler, respectively. The trained diffusion model generates samples from the noise using various samplers. For example, DDIM is used for sampling using the following iterative denoising process from t to the previous time step t':
[0117]
[0118] Among them, z t' It will be fed back again In the process, until t' becomes 0 (e.g., the denoising process is complete).
[0119] Potential diffusion model
[0120] The interactive system applies a Latent Diffusion Model (LDM). Such an LDM reduces inference computation and steps by performing a denoising process in the latent space. The latent space is encoded from a pre-trained Variational Autoencoder (VAE).
[0121] 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.
[0122] When synthesizing images, the interactive system applies classifier-free guidance to improve quality, for example, by applying the following formula:
[0123]
[0124] in, This indicates the use of empty text. The obtained unconditional output. The guiding ratio w is adjusted to control the strength of conditional information about the generated images, achieving a trade-off between quality and diversity. LDM is further trained on large-scale datasets, providing a series of stable diffusion models.
[0125] Architecture for a potential text-to-image diffusion model
[0126] 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.
[0127] The interactive client 104 includes a user interface or application that allows the user to input text prompts 424. The prompts 424 include text input by the user that describes the desired characteristics of the image, such as "a cute puppy sitting in a field".
[0128] Recognizing prompts for the first user includes receiving questions or requests from the first user via text or voice. The interactive client 104 identifies keywords from the prompt 424 and applies weights to each of the identified keywords. The interactive client 104 then applies the identified keywords and their corresponding weights to a machine learning model.
[0129] In some examples, interactive client 104 automatically generates prompts 424 for a first user based on intents identified from real-time interaction data captured by the 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 specific types of content about technology.
[0130] In some examples, the interactive client 104 uses popular or trending topics from the platform or the wider internet to create cues that a broad audience might find interesting. In some examples, by leveraging the user's geolocation, 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 connections to generate cues relevant to their friends, family, or other users they follow, such as birthdays or new connections 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.
[0131] In some examples, the interactive client 104 can use a user's in-app actions (e.g., likes, comments, and shares) to generate cues related 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 for 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 (e.g., streaming events). In some examples, real-time interaction data includes current camera feeds from the camera system of the first interactive client 104.
[0132] 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 prompts tailored to the user. In some examples, the interactive client 104 collects user profile information (e.g., a calendar of appointments or objects detected in the camera feed of the AR device) to generate prompts. In some examples, by incorporating gamification elements, the interactive client 104 creates prompts that encourage user engagement and participation, such as checking in-game features.
[0133] Figure 4 It is described as a process performed or applied by certain systems, such as a specific machine learning model (e.g., a stable diffusion model), but the process described herein may be performed by one or more other or the same machine learning models, computer vision models, other models, or combinations thereof.
[0134] In the visual cue transformer (ViT), text cues are converted 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.
[0135] 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 tokens, and then mapping 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 representations in the latent space specific to the provided text cues.
[0136] Stable diffusion models are probabilistic generative models used in machine learning for tasks such as image generation and denoising. ViT is a specific type of neural network architecture designed for computer vision tasks, and it is particularly well-suited for processing visual data. Although the examples described in this paper illustrate the features applied to ViT, it should be understood that such features can be applied to other transformer-based architectures (e.g., in stable diffusion models, for example, for different types of data or tasks).
[0137] In some cases, text transformers pre-trained on text data used for natural language understanding and generation tasks are employed. In others, audio transformers are used, adapted for audio processing and trained to work with audio signals as well as in speech recognition and generation tasks. In still others, graph transformers are used to model the relationships between nodes in a graph when processing structured data represented as graphs.
[0138] 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 employ custom transformers, which are custom-designed transformer architectures tailored to specific needs and the architecture, attention mechanisms, and input embeddings of the model, and tuned to suit the application.
[0139] 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.
[0140] Input layer 406 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 allows for diversity in the generated output. The noise acts as part of the randomness in the generation process, thus ensuring that the stable diffusion model does not generate the same output every time the model is used with the same text prompt.
[0141] The iterative denoising process of the stable diffusion model is a multi-step process in which 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 incrementally enhances the initial random noise and latent features from the text prompt. With each step, the resulting image becomes sharper and more faithful to the provided text instruction.
[0142] 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 starts from the existing input image.
[0143] In the forward diffusion stage, the input image (e.g., input image 402) is processed by an encoder (e.g., encoder 404). Encoder 404 processes the image to extract meaningful features from the input image 402 and represent them in a lower-dimensional latent space. This latent space representation contains basic information about the image content and characteristics.
[0144] After encoding the input image 402, the features extracted from image 402 are then fed into the input layer 406. At this stage, the model begins to gradually introduce random noise into the latent features. This introduction of noise is a key aspect of the diffusion process.
[0145] The introduction of noise is gradual and controlled. It begins with a small amount of noise and gradually increases. As the noise level rises, the latent features representing the image become less informative and more random. This is an intentional and systematic process designed to transform the encoded image features into a completely random state.
[0146] These features are fed into input layer 406, where noise is gradually introduced until the image becomes completely random noise. The forward diffusion stage continues until the latent features initially representing the input image evolve into a state of completely random noise. Essentially, the input image is "diffused" into randomness during this process. The image gradually loses its original content and structure. The noisy image is sent to buffer 408, which either repeats the addition of noise or sends the final noisy image to buffer 410 for use in the denoising process.
[0147] During the backward process, 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 backward process of the stable diffusion model recovers meaningful feature data from the random noise introduced during the forward diffusion phase. This is achieved through the iterative denoising process.
[0148] The denoising process 416 is iteratively repeated by processing data from the input layer 412 through UNet 414 and up to the output layer 436. The DDIM scheduler 434 schedules the denoising iterations. The denoising process is repeated by updating the time t. This process is repeated several times to gradually remove the predicted noise and recover the original or meaningful features from the data.
[0149] The iterative denoising process begins at the input layer (412). Here, data from the forward diffusion stage, including 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 the backward process, UNet 414 is employed to help reconstruct meaningful feature data from the noisy input.
[0150] The DDIM scheduler 434 orchestrates the iterations of the denoising process by controlling the timing and frequency of the denoising steps. The DDIM scheduler 434 guides the denoising process in the stable diffusion model.
[0151] After processing the data through UNet 414 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.
[0152] 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 at each iteration, thereby ensuring the gradual and controlled recovery of meaningful features.
[0153] By removing introduced noise and recovering the original or meaningful data, the backward process essentially counteracts forward diffusion. It does this through an iterative and controlled denoising process orchestrated by the DDIM scheduler 434, where UNet 414 plays a crucial role in feature recovery. This entire process ensures that the model can generate high-quality and controlled outputs, even when starting from random states.
[0154] Once the multiple iterations of denoising process 416 are completed, the features are output from the output layer 436 and fed into the decoder 418. The decoder 418 is trained to receive the features as input and make predictions 420, such as generating an image 440 corresponding to the received features.
[0155] 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.
[0156] 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.
[0157] 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. These skip connections help preserve fine-grained details by providing additional contextual information to the decoder layer.
[0158] The temporal condition (t) of 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 text embeddings (c) into spatial features:
[0159] ,
[0160] Wherein, Q comes from the noisy 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 pass of UNet is:
[0161]
[0162] Although the examples described in this article apply features to UNet, cross-attention blocks, ResNet blocks, and / or combinations thereof, it should be understood that such features are applied to other parts of machine learning models, stable diffusion models, other types of models that process images or text, etc.
[0163] In some cases, the features described in this paper are applied 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 applied to SegNet, an architecture designed for semantic segmentation tasks that uses an encoder-decoder structure with pooling indices for upsampling, making it memory efficient. Finally, these features are applied to PSPNet (Pyramid Scene Parsing Network), which leverages pyramid pooling modules to capture contextual information across multiple scales and is effective for tasks requiring an understanding of the global context of an image.
[0164] 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, thus achieving end-to-end pixel-wise prediction.
[0165] In some cases, features are applied to self-attention transformers, for example, by avoiding cross-attention. In others, features are applied to nonlocal neural networks that introduce nonlocal operations to capture long-range dependencies in the data. In still others, features are applied to graph neural networks (GNNs), which are well-suited for modeling structured data such as graphs or grids.
[0166] In some cases, features are applied to spatial transformers, which are neural network components that learn to transform feature maps in space. In other cases, features are applied to convolutional blocks with dilated convolutions, which can be used to enhance the receptive field of convolutional layers, thereby capturing contextual information without inducing cross-attention.
[0167] In some cases, features are applied to DenseNet, which connects each layer to every other layer in a feedforward manner. This helps mitigate the vanishing gradient problem and encourages feature reuse. In other cases, features are applied to initial modules that use 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.
[0168] Although the examples described herein illustrate models for generating images (e.g., stable diffusion models), it should be understood that the features described herein also apply to models for generating media content items, which may include:
[0169] Content enhancement is used to improve 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 such as animations and facial transformations.
[0170] Emojis are small images or icons that represent emotions, reactions, or objects.
[0171] Stickers are larger images or animations that can be sent in the chat window.
[0172] Images or photos can be sent to other users to share visual information or record specific events.
[0173] Video clips can be used to share recorded content or record specific events.
[0174] Audio messages can be shared to convey audible communication.
[0175] The Graphics Interchange Format (GIF) consists of short animations that can be used to add humor or express emotions.
[0176] The systems and methods described herein 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.
[0177] 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.
[0178] During the forward diffusion phase, input data points, such as images, are gradually transformed into random noise by adding noise in a controlled manner. The process starts with a low noise level and gradually increases it. A neural network is then used to encode the noisy data, thereby capturing its features.
[0179] In the backdiffusion phase, the encoded noisy data is iteratively denoised to reconstruct the original data. Guided by a predefined loss function that measures the quality of the reconstruction, the model learns to remove noise and recover meaningful features. 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.
[0180] The training of models (such as artificial intelligence models) is necessarily rooted in computer technology, and modeling techniques are improved by using training data to train such models and then applying the models to new inputs to perform reasoning on the new inputs.
[0181] Such training involves complex processing, which typically requires significant processor computation and extended timeframes with large training datasets, often executed by large-scale server systems. Model training may require logistic regression and / or forward / backward propagation on the training data, which can include input data used to tune the model's parameters and expected output values. This training forms the framework for machine learning algorithms, enabling the model to be applied to new and unseen data (e.g., new cue data) and to make predictions based on the weights or scores adjusted during training. The machine learning model described in this paper, trained in this way, reduces false positives and increases the performance of such stable diffusion models.
[0182] Reconstructing machine learning models
[0183] Figure 5 Example method 500 for reconstructing a machine learning model is shown, based on several examples. While example method 500 depicts a specific order of operations, the order can be changed without departing from the scope of this disclosure. For example, some of the depicted operations can 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 can perform their functions substantially simultaneously or in a specific order.
[0184] At step 502, the interactive system identifies the performance characteristics of cross-attention blocks and ResNet blocks in the iterative denoising process of the machine learning model.
[0185] 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 image. These blocks allow for bidirectional interaction between text and image modalities, 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.
[0186] ResNet blocks, short for Residual Network blocks, are fundamental building blocks for deep neural networks in stable diffusion models. ResNet blocks help address the vanishing gradient problem and allow for the training of deeper neural networks. ResNet blocks use skip connections to propagate gradients and information directly from earlier layers to later layers. This facilitates gradient flow during training, enabling 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 promoting more efficient and stable training, resulting in improved image generation quality.
[0187] Interactive client 104 evaluates the distribution of UNet parameters and computations, for example, at each downsampling stage, intermediate layer stage, and upsampling stage, by processing UNet with noise and cues. Interactive client 104 identifies the performance characteristics of individual ResNet blocks and / or cross-attention blocks.
[0188] Interactive client 104 identifies ResNet and / or cross-attention blocks that result in 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.
[0189] Figure 6 Architecture 600 for UNet and removal of cross-attention blocks is shown. Architecture 600 includes... Figure 4 The downsampling unit 432, the intermediate layer 430, and the upsampling unit 428 each include one or more cross-attention blocks 602a, 602b, 602c, 602d, and 602e (collectively referred to herein as cross-attention block 602) and / or one or more ResNet blocks 604a, 604b, 604c, 604d, 604e, and 604f (collectively referred to herein as ResNet block 604).
[0190] At step 504, the interactive system connects the preceding and following blocks of cross-attention blocks or ResNet blocks within the machine learning model based on the identified performance characteristics. Figure 6 In the downsampler 432, the first ResNet block 604a is identified as causing the maximum delay and is removed.
[0191] 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 the subsequent machine learning model block. The interaction then creates a connection between the previous and subsequent blocks to skip the current block.
[0192] In some cases, the interactive system deletes the current machine learning model block after it has been disconnected from the preceding and following machine learning model blocks.
[0193] While the features described in this paper describe connections between preceding and subsequent blocks, it should be understood that these features also apply to other ways of avoiding the use of specific blocks. For example, an interactive system might change the current block into a pass-through block, where inputs simply pass through outputs. In some cases, block activations can be zeroed out to prevent the block from contributing during inference or training.
[0194] 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 to control the flow of information through the block.
[0195] In some cases, performance characteristics include latency characteristics, which indicate the time delay it takes for a corresponding machine learning model block to process input and generate output. Latency refers to the time delay or amount of time it takes for a machine learning model block to complete a specific operation or computation.
[0196] 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 the subsequent machine learning model block.
[0197] The interactive system identifies the machine learning model block that causes the greatest latency and skips that block by removing its current connections and directly connecting the preceding and following blocks.
[0198] In some cases, performance characteristics include a specific performance trait related to the performance of a machine learning model. For example, performance characteristics may include computational complexity, such as certain blocks of input or output that require more computation or need to be processed.
[0199] Performance characteristics may include memory usage, where, if memory is limited, blocks that consume or use (to store) large amounts of memory can be skipped or optimized to reduce memory usage. Performance characteristics may also include energy efficiency features that skip blocks that consume excessive power to help optimize energy usage.
[0200] 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.
[0201] By identifying blocks that have a relatively low impact on model performance as candidates for skipping, performance characteristics can include accuracy effects, especially if this results in significant performance gains in terms of latency or resource usage.
[0202] Performance characteristics can include redundancy by identifying multiple blocks that perform similar functions or learn similar features. The model can 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.
[0203] Performance characteristics can include the feature importance of the model incorporating feature selection or extraction, where skipping blocks responsible for less important features can be considered. 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 linguistic features.
[0204] 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 mentioned above).
[0205] While the examples described in this article illustrate the characteristics of the performance features used to skip blocks, it should be understood that the same or different performance features can also be applied to other architectural changes, such as adding blocks back into a machine learning model.
[0206] At step 506, the interactive system recognizes a user prompt indicating the user's intent to generate an image. At step 508, the interactive system uses a machine learning model to analyze data corresponding to the prompt to generate one or more images; the machine learning model is trained to generate images based on the data corresponding to the prompt.
[0207] 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 determination 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.
[0208] 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 the preceding machine learning model block with the following machine learning model block in a machine learning model block, and connects another preceding machine learning model block with another following machine learning model block in another node.
[0209] Figure 7The diagram illustrates adding machine learning model blocks to machine learning model 700 based on some examples. In some cases, machine learning model blocks such as ResNet 706 are added back to the machine learning model. Figure 7 As shown, after removing ResNet block 604a from the machine learning model, ResNet 706 is added back to the model.
[0210] In some cases, machine learning model blocks are added and / or skipped. In others, blocks are added and then skipped, and / or blocks are skipped and then added. The machine learning model is continuously optimized until both one or more performance characteristics for adding blocks and one or more performance characteristics for skipping blocks are met. For example, skipping the first block might have reduced latency but might have decreased model performance. A new block is added, which improves performance but increases latency beyond the desired latency performance threshold. The next highest latency block is removed and a second new block is added, which then meets both the desired performance and latency thresholds.
[0211] To add a new block, the interactive system disconnects the connection between two blocks (the previous block and the next block) and connects the previous block to the new block and the new block to the next block.
[0212] 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 an existing machine learning model block to be copied based on one or more performance characteristics of that 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.
[0213] 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 at each of these different locations. Then, based on the evaluated performance, the interactive system permanently adds the new machine learning model block to a specific location. For example, the interactive system might ultimately place the new machine learning model block at the location that results in the highest machine learning model accuracy performance.
[0214] For example, a current machine learning model block (e.g., a cross-attention block) can be identified by recognizing the machine learning model block that causes the maximum latency, while a new machine learning model block (e.g., a ResNet block) is copied from an existing machine learning model block that causes the minimum latency or requires the minimum memory storage.
[0215] Delay and parameter analysis
[0216] In some cases, stable diffusion machine learning models comprise three modules: a text encoder (e.g., ViT 426) for converting input text prompts into embedded text, a VAE decoder (e.g., decoder 418), and a denoising UNet (e.g., UNet414). Unlike the text encoder or VAE decoder, the denoising UNet is computationally intensive, resulting in higher latency, but it also requires iterative forward steps to ensure generation quality. For example, the total denoising time step is set to 50 for inference, which significantly slows down the on-device generation process.
[0217] Figure 8 The diagram illustrates latency and parameter analysis of cross-attention blocks and ResNet blocks in a UNet for a stable diffusion machine learning model, based on several examples. An interactive client 104 utilizes prompts and noise processing within the stable diffusion machine learning model to generate images. The interactive client 104 evaluates various modules of the stable diffusion machine learning model to identify their performance characteristics.
[0218] exist Figure 8 In the example, ResNet block 806 of the intermediate layer (e.g., intermediate layer 430) is shown as having the highest parameter requirement (e.g., higher memory storage for such parameters) among all blocks, and the third stage 808 in the upsampler (e.g., upsampler 428) is shown as having the highest parameter requirement in the cross-attention (CA) block. The first downsampler stage 802 of the downsampler (e.g., downsampler 432) is shown as having the highest latency among all blocks, and the last upsampler stage 804 of the upsampler (e.g., upsampler 428) is shown as having the highest latency for the cross-attention block.
[0219] Interactive client 104 uses this information to understand the bottlenecks of deploying a text-to-image diffusion model on interactive client 104, such as on mobile devices, from the perspective of the UNet architecture. This information serves as the basis for the redesign of the UNet architecture.
[0220] For example, the input to UNet is a 64x64x4 image. Downsampling unit 432 downsamples the input to a 32x32x4 image, while processing the image through ResNet blocks and cross-attention blocks. Intermediate layers process the 32x32x4 image through additional ResNet blocks and cross-attention blocks, while still maintaining the 32x32x4 image size. Upsampling unit 428 upsamples the 32x32x4 image back to a 64x64x4 image, while also processing the image through additional ResNet blocks and cross-attention blocks.
[0221] Retrain the latent text-to-image diffusion model to remove redundancy.
[0222] The interactive system adapts a machine learning model to add or remove certain blocks based on latency and performance characteristics. The system then removes portions of redundant denoising blocks identified as causing the maximum latency. The machine learning model is tested by measuring generation performance based on the correlation between the generated image and the text prompt. Based on latency and generation performance metrics, the interactive system further adds or removes additional portions of redundant denoising blocks until the desired latency and performance are met.
[0223] The interactive system identifies redundant denoising blocks, such as cross-attention blocks and ResNet blocks that contribute significantly to latency. These blocks are selectively removed from the model to improve computational efficiency and reduce inference time.
[0224] To evaluate the model's generation performance, the correlation between the generated images and the text prompts is measured. This performance metric helps assess the quality and accuracy of the generated images.
[0225] Using both latency and generation performance metrics, the interactive system dynamically adjusts the model architecture by iteratively adding or removing redundant denoising blocks. This iterative process continues until a desired balance is achieved, where the model exhibits the desired latency and meets the performance requirements for generating high-quality images based on the provided text prompts.
[0226] In summary, the interactive system enhances the stable diffusion model by adapting the model architecture based on latency and generative performance metrics. The interactive system selectively removes redundant denoising blocks that contribute to latency and iteratively optimizes the model until the desired latency and generative performance are achieved. This approach allows for efficient and effective text-to-image generation with improved responsiveness and quality.
[0227] Architecture Evolution and Optimization
[0228] When an interactive system modifies the architecture of its machine learning model, such changes can lead to performance degradation, requiring fine-tuning using hundreds or thousands of GPUs. The example interactive system described in this paper includes an architectural evolution process that maintains the performance of the pre-trained UNet model while gradually improving its efficiency. Regarding the deterministic image decoder, the interactive client 104 applies a custom compression strategy and a cue-driven extraction method.
[0229] Interactive client 104 initiates robust training, evaluation, and evolution pipelines to mitigate the aforementioned issues. Interactive client 104 applies random forward propagation to perform probabilistic training and evaluation. Execute each cross-attention block and ResNet block, where I indicates skipping the identity mapping for the corresponding block. Therefore, the forward UNet is modified as follows:
[0230]
[0231] Interactive client 104 modifies the UNet using a modified forward UNet to enable the addition and / or removal of blocks such as cross-attention blocks or ResNet blocks in the stable diffusion model. This training enhancement makes the network robust to architectural permutations, allowing for accurate evaluation of each block and modification of the stable diffusion architecture.
[0232] Interactive client 104 uses the following constructed set of evolutionary actions (e.g., adding or removing blocks) to perform modifications to the UNet architecture created from the above forward UNet:
[0233]
[0234] in, This indicates the action (stage i, block j) to remove (-) or add (+) a cross attention block or ResNet block at the corresponding position.
[0235] The interactive client 104 evaluates each addition or removal action based on its impact on execution latency and generation performance. For latency, the interactive client 104 uses a lookup table for each possible configuration of the cross-attention block and the ResNet block.
[0236] For generation performance, the interactive client 104 measures the correlation between the generated images and the textual prompts. For example, the interactive client 104 identifies the contrastive Language-Image Pre-trained (CLIP) score. The CLIP score evaluates the performance of the stable diffusion model in the context of text-to-image generation. CLIP is a neural network model that has been pre-trained on a large dataset of image-text pairs and trained to associate images with their corresponding textual descriptions, enabling CLIP to understand the semantic relationships between images and text.
[0237] The CLIP model is used to compare generated images and text cues, evaluating how well the image corresponds to a given text description. A higher CLIP score indicates better alignment between the generated image and the text cue, suggesting that the model has successfully captured the expected visual content described in the text.
[0238] In some cases, the interactive client 104 identifies the performance characteristics of cross-attention blocks and ResNet blocks during the iterative denoising process of a machine learning model. For example, performance characteristics include the latency, memory requirements, size, and generation performance of each block. Generation performance is a measure of the correspondence between the input text and the generated image.
[0239] In some cases, the interactive client 104 reconnects preceding blocks of cross-attention blocks or ResNet blocks with subsequent blocks within the machine learning model based on identified performance characteristics. The interactive client 104 reconnects such blocks by enabling the stable diffusion model to recreate the links between blocks. This modification is based on changes to the UNet forward structure:
[0240]
[0241] In other cases, interactive client 104 removes blocks. Interactive client 104 modifies the machine learning model to allow blocks to be added or removed directly from the architecture.
[0242] In some cases, the interactive client 104 reconnects, removes, and / or adds blocks based on performance characteristics. For example, blocks with the highest latency may be removed.
[0243] In some cases, the interactive client 104 recognizes a user prompt that indicates the user's intent regarding the generation of an image. The prompt is input directly from the user as text or other input. In some cases, the interactive client 104 generates the prompt based on contextual information relevant to the user. In some cases, the interactive client 104 modifies the received prompt based on contextual information relevant to the user.
[0244] In some cases, the interactive client 104 uses a machine learning model to analyze data corresponding to the prompts in order to generate one or more images. The machine learning model is trained to generate images based on the data corresponding to the prompts.
[0245] In some cases, the interactive client 104 creates copies of the machine learning model. The interactive client 104 then adds and / or removes at least a portion of the blocks for each created copy. The interactive client 104 evaluates how each copy performs based on the input data and compares the output with the expected output to determine which copy to continue with.
[0246] In some cases, interactive client 104 removes blocks before adding them. Interactive client 104 removes blocks until a desired latency threshold is reached. Once the latency threshold is reached, interactive client 104 adds blocks until the desired generation performance is met.
[0247] In some cases, the interactive client 104 adds blocks based on performance characteristics, such as blocks with the lowest latency. In other cases, the interactive client 104 adds blocks based on multiple characteristics, such as the balance between latency and generation performance.
[0248] In some cases, the interactive client 104 adds and / or removes cross-attention blocks and / or ResNet blocks. Then, the interactive client 104 only adds and / or removes ResNet blocks. In other cases, the interactive client 104 only adds and / or removes cross-attention blocks.
[0249] In some cases, addition and / or removal involves adding and / or removing blocks from an already trained machine learning model. After adding and / or removing blocks, the modified machine learning model can be retrained using new or old training information (such as noise and cue data) to generate images.
[0250] In some cases, interactive systems add and / or remove blocks based on at least a portion of the following pseudocode:
[0251]
[0252] In some cases, the interactive client increases or decreases the number of blocks by a certain amount, compares the output, and decides whether to add or remove more blocks. For example, the interactive client adds four blocks. If UNet's performance reaches a certain performance threshold, the interactive client 104 continues to add blocks, such as eight blocks. On the other hand, if the performance does not reach the threshold, the interactive client 104 removes blocks to two. Advantageously, the optimal addition and / or removal of blocks is discovered using log(n) numbers or modifications.
[0253] The examples described in this paper illustrate a text-to-image machine learning model; however, it should be understood that the features described in this paper are also applicable to other machine learning models, such as text-to-video, image-to-text, etc.
[0254] Noise and Denoising
[0255] Figure 9 The diagram illustrates the addition and denoising of noise in image 900, based on some examples. An interactive system can add noise to an image (e.g., image 906). Image 906 could be an image of a dog. Image 906 can be generated through previous denoising iterations and can be retrieved from a database or from a user (e.g., a photograph taken of the image).
[0256] Figure 9 The diagram illustrates a stable diffusion process involving the addition of noise to an image and subsequent denoising. This technique plays a crucial role in various applications such as image enhancement, data augmentation, and even the development of robust machine learning models.
[0257] The interactive system responsible for implementing this stable diffusion technique begins by introducing controlled noise into a selected image (image 906). This noise-adding process is iterative and produces a series of modified images. In this example, the interactive system creates a sequence of images: a first noisy image 908, a second noisy image 910, and a third noisy image 912. The purpose of this noise-adding step is to gradually blur and distort the original image until it becomes unrecognizable.
[0258] Once the image has been intentionally degraded to a certain extent by noise, the system initiates the denoising phase. At this point, the initially noisy image, i.e., the denoised image 914, serves as the starting point for the denoising process. The main purpose of denoising is to restore the basic content of the original image while removing unwanted noise artifacts.
[0259] The interactive system refines the denoised image 914 in a progressive manner, generating a series of denoised images, including denoised image 916, denoised image 918, and denoised image 920. Throughout the denoising process, the system employs advanced algorithms and techniques to progressively eliminate noise and restore image fidelity.
[0260] As the denoising process unfolds, the image evolves, eventually converging towards a similar representation to the original image 906. However, it is important to note that while the final denoised image can depict similar features, such as the same object (in this case, a dog), it exhibits significant and noteworthy differences compared to the original initial image. These differences can manifest as variations in texture, color, and overall visual quality, reflecting the effects of noise introduced earlier in the process.
[0261] Data communication architecture
[0262] 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:
[0263] Message identifier 1002 is a unique identifier that identifies message 1000.
[0264] The message text payload 1004 is the text that is generated by the user through the user interface of the user system 102 and included in message 1000.
[0265] The message image payload 1006 is 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.
[0266] 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.
[0267] 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.
[0268] 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.
[0269] The message duration parameter 1014 is a parameter value that indicates, in seconds, 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.
[0270] Message geolocation parameter 1016: Geolocation 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).
[0271] 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.
[0272] 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.
[0273] 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.
[0274] 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.
[0275] 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.
[0276] Systems with head-worn devices
[0277] Figure 11 System 1100 is shown, which includes a head-worn wearable device 116 with a selector input device according to some examples. Figure 11This 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.
[0278] 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.
[0279] Interactive clients, such as mobile device 114, connect to head-mounted wearable device 116 using both low-power wireless connection 1112 and high-speed wireless connection 1114. Mobile device 114 also connects to server system 1104 and network 1116.
[0280] 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, a low-power circuitry system 1124, and a high-speed circuitry system 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.
[0281] 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.
[0282] 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.
[0283] 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.
[0284] 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.
[0285] like Figure 11As shown, the high-speed circuit system 1126 includes a high-speed processor 1130, a memory 1102, and a high-speed wireless circuit system 1132. In some examples, an image display driver 1120 is coupled to the high-speed circuit system 1126 and operated by the high-speed processor 1130 to drive the left and right image displays in the image display 1118 of the optical components. The high-speed processor 1130 can be any processor capable of managing the high-speed communication and operation of any general-purpose computing system required by the head-worn device 116. The high-speed processor 1130 includes the processing resources required to manage high-speed data transmission over the high-speed wireless connection 1114 to a wireless local area network (WLAN) using the high-speed wireless circuit system 1132. In some examples, the high-speed processor 1130 executes the operating system of the head-worn device 116 (e.g., a LINUX operating system) or other such operating system, and this operating system is stored in the memory 1102 for execution. Among other duties, the high-speed processor 1130, which executes the software architecture of the head-worn device 116, manages data transmission with the high-speed wireless circuit system 1132. In some examples, the high-speed wireless circuit system 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 system 1132 may implement other high-speed communication standards.
[0286] The low-power wireless circuitry system 1134 and high-speed wireless circuitry system 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.
[0287] Memory 1102 includes any storage device capable of storing various data and applications, including 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. While memory 1102 is shown as integrated with the 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.
[0288] 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.
[0289] 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.
[0290] 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 can also store at least a portion of instructions in its memory to implement the functions described herein.
[0291] 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), point-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.
[0292] 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.
[0293] 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).
[0294] 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 circuitry system 1134 or high-speed wireless circuitry system 1132 through low-power wireless connection 1112 and high-speed wireless connection 1114.
[0295] Machine architecture
[0296] 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.
[0297] 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.
[0298] 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.
[0299] 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), point-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.
[0300] 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).
[0301] 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).
[0302] 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.
[0303] 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.
[0304] 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.
[0305] 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 from which altitude can be obtained), an orientation sensor component (e.g., a magnetometer), etc.
[0306] 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).
[0307] 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, or an optical reader component (e.g., for detecting one-dimensional barcodes such as Universal Product Code (UPC) barcodes, or barcodes such as Quick Response (QR) codes, Aztec codes, Data Matrix, Dataglyph). 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 from the tags). Additionally, various information can be obtained via communication components 1236, such as location via Internet Protocol (IP) geolocation, or via Wi-Fi. ® Location can be obtained through signal triangulation or by detecting NFC beacon signals that indicate a specific location.
[0308] 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.
[0309] 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).
[0310] Software Architecture
[0311] 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.
[0312] 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.
[0313] 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. Furthermore, 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., OpenGL frameworks 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.
[0314] 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.
[0315] 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.
[0316] Machine Learning Pipeline
[0317] Figure 15 This is a flowchart depicting a machine learning pipeline 1500 based on some examples. The machine learning pipeline 1500 can be used to generate trained models, as described in this paper, for performing operations associated with search and query responses, such as... Figure 15 The trained machine learning program 1502.
[0318] Overview
[0319] Broadly speaking, machine learning can involve using computer algorithms to automatically learn patterns and relationships in data, potentially without requiring explicit programming after the algorithm has been trained. Examples of machine learning algorithms can be categorized into three main types: supervised learning, unsupervised learning, and reinforcement learning.
[0320] Supervised learning involves training a model using labeled data to predict the output of new, unseen inputs. Examples of supervised learning algorithms include linear regression, decision trees, and neural networks.
[0321] Unsupervised learning involves training a model on unlabeled data to discover hidden patterns and relationships within the data. Examples of unsupervised learning algorithms include clustering, principal component analysis, and generative models such as autoencoders.
[0322] 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.
[0323] 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, which 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 consisting of interconnected layers of nodes (or neurons) that process information and make predictions based on input data. Matrix factorization is another type of machine learning algorithm used for recommender systems and other tasks. Matrix factorization decomposes a matrix into two or more matrices to reveal 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.
[0324] The performance of machine learning models 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 reduce the risk of overfitting, a common problem in machine learning where a model learns to perform very well on training data but fails to maintain that performance on previously unseen 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.
[0325] While this article discusses several specific examples of machine learning algorithms, the principles discussed can also be applied to other machine learning algorithms. 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 wide variety of machine learning applications.
[0326] Two typical types of problems in machine learning are classification problems and regression problems. Classification problems, also known as categorization problems, aim to classify items into one of several category values (e.g., is this object an apple or an orange?). Regression algorithms aim to quantify some items (e.g., by providing real numerical values).
[0327] stage
[0328] 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:
[0329] 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 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 converting the data to a suitable format.
[0330] Feature engineering 1404: This may include selecting and transforming training data 1504 to create features that can be used to predict the target variable. Feature engineering may include: (1) receiving features 1506 (e.g., as structured or labeled data in supervised learning); and / or (2) identifying features 1506 in training data 1504 (e.g., unstructured or unlabeled data for unsupervised learning).
[0331] Model selection and training 1406: This can include specifying a particular problem or desired response from the input data, selecting an appropriate machine learning algorithm, and training it on preprocessed data. This may further 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 data type, problem complexity, computational resources, or desired performance.
[0332] Model Evaluation 1408: This can include evaluating the performance of the trained model (e.g., a trained machine learning program 1502) on a separate test dataset. This can help determine whether the model is overfitting or underfitting, and whether it is suitable for deployment.
[0333] Prediction 1410: This involves using a trained model (e.g., a trained machine learning program 1502) to generate predictions for new, unseen data.
[0334] Validate, refine, or retrain 1412: This can include updating the model based on feedback generated from the prediction phase, such as new data or user feedback.
[0335] Deployment 1414: This can include integrating a trained model (e.g., a trained machine learning program 1502) into a larger system or application, such as a web service, mobile app, or IoT device. This may involve setting up an API, building a user interface, and ensuring the model is scalable and capable of handling large amounts of data.
[0336] 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 the effective operation of the trained machine learning program 1502 in pattern recognition, classification, and regression. In some examples, training data 1504 includes labeled data, which are known data used for the pre-identified features 1506, as well as one or more outcomes.
[0337] Each of the features 1506 can be a variable or attribute, such as a single measurable attribute of a process, item, system, or phenomenon represented by a dataset (e.g., training data 1504). Features 1506 can also be of different types, such as numerical features, strings, vectors, matrices, codes, and graphs, and by way of example only, may 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 (e.g., frequency or preference of words or phrases), image features (e.g., pixel, texture, or pattern recognition), audio classification (e.g., spectrograms), etc. Attribute features include intrinsic attributes (directly observable) or extrinsic features (derived), such as identifying the square footage, location, or age of a property attribute identified in a camera feed. User data characteristics include data relating to a specific individual or group of individuals, such as data on geolocation or shared demographic characteristics. User data can include demographic data (such as age, gender, location, or occupation), user behavior (such as browsing history, purchase history, conversion rates, click-through rates, or engagement metrics), or user preferences (such as preferences for certain video, text, or digital content items). Historical data includes past events or trends that can help identify patterns or relationships over a period of time.
[0338] In the training phase 1508, the machine learning pipeline 1500 uses the training data 1504 to find the correlations between features 1506 that affect the prediction results or prediction / inference data 1522.
[0339] Using training data 1504 and identified features 1506, a trained machine learning program 1502 is trained during training phase 1508 of machine learning program training 1524. Machine learning program training 1524 evaluates the values of features 1506 because they are related to the training data 1504. The result of the training is the trained machine learning program 1502 (e.g., a trained or learned model).
[0340] Furthermore, the training phase 1508 may involve machine learning, where 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, where 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.
[0341] 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.
[0342] In neural network 1526, each neuron can operationally compute a small function, such as an activation function that takes a weighted sum of the outputs of neurons in the previous layer and a bias term as input. 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 subsequent layers. The connections between neurons have associated weights that define the influence of the input from the sending neuron to the receiving neuron. During the training phase, these weights are adjusted by a learning algorithm to optimize the network's performance. Different types of neural networks can use different activation functions and learning algorithms, which can affect their performance on different tasks. In general, 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.
[0343] In some examples, neural network 1526 can also be one or a combination of a variety of different types of neural networks, 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 connection 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.
[0344] In addition to the training phase 1508, an evaluation and validation phase can be performed 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. Tuning the hyperparameters improves the model's performance on the validation dataset.
[0345] The neural network 1526 is trained iteratively by adjusting model parameters to minimize a specific loss function or maximize a specific objective. The system can continue training the neural network 1526 by adjusting parameters based on the output of validation, refinement, or retraining block 1412, and rerunning predictions 1410 on new or previously run training data. The system can employ optimization techniques for these adjustments, such as gradient descent, momentum algorithms, Nesterov accelerated gradient (NAG) algorithms, etc. 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 becomes available, such as based on user-created or system-generated training data.
[0346] Once the model is fully trained and validated, the testing phase allows it to be tested on new datasets that it has not previously seen. The test dataset is used to evaluate the model's performance and to ensure that it is not overfitting the training data.
[0347] In the prediction phase 1510, a trained machine learning program 1502 uses features 1506 to analyze query data 1528 to generate inference, results, or predictions, as an example of prediction / inference data 1522. For example, during the prediction phase 1510, the trained machine learning program 1502 is used to generate output. Query data 1528 is provided as input to the trained machine learning program 1502, and the trained machine learning program 1502 generates prediction / inference data 1522 as output in response to receiving query data 1528. Query data may include prompts, such as a user-entered text question or an audible spoken question. In some cases, the system generates queries based on interactive functions 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 detected in a camera feed.
[0348] 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 that can create 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 exactly the same as the original data.
[0349] Some techniques that can be used in generative AI are:
[0350] Convolutional Neural Networks (CNNs): CNNs are commonly used for image recognition and computer vision tasks. They 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.
[0351] Recurrent Neural Networks (RNNs): RNNs are designed to process sequential data, such as speech, text, and time-series data. They have feedback loops that allow them to capture temporal dependencies and remember past inputs. RNNs can be used in applications such as speech recognition, machine translation, and sentiment analysis.
[0352] Generative Adversarial Networks (GANs): These models 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.
[0353] Variational Autoencoders (VAEs): These models encode input data into a latent space (compressed representation) and then decode it back into 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 text sequences and capture complex dependencies.
[0354] Transformer models: These models use attention mechanisms to learn relationships between different parts of the 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.
[0355] In the generated 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.
[0356] Example
[0357] 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.
[0358] Example 1 is a system comprising: at least one processor; and at least one memory component storing instructions that, when executed by the at least one processor, cause the at least one processor to perform operations including: identifying performance characteristics of individual machine learning model blocks in an iterative denoising process of a machine learning model; identifying a current machine learning model block to be removed from the machine learning model based on the identified performance characteristics; and identifying a preceding machine learning model block connected to the input of the current machine learning model block and a subsequent machine learning model block connected to the output of the current machine learning model block.
[0359] In Example 2, the subject of Example 1 includes: wherein the machine learning model includes a stable diffusion model, and wherein the machine learning model block includes a cross-attention block.
[0360] In Example 3, the subject matter of Examples 1 to 2 includes: wherein the operation further includes: adding a new machine learning model block to the machine learning model.
[0361] In Example 4, the subject of Example 3 includes: wherein the new machine learning model block is a copy of the existing machine learning model block of the machine learning model.
[0362] In Example 5, the subject matter of Examples 3 to 4 includes: wherein the operation further includes: disconnecting the connection between the first block and the second block, and generating a connection between the first block and the new block and between the new block and the second block.
[0363] In Example 6, the subject matter of Examples 3 to 5 includes: wherein the machine learning model includes a stable diffusion model, and wherein the machine learning model block includes a ResNet block.
[0364] In Example 7, the subject of Examples 3 to 6 includes: wherein the new machine learning model block is added after the current machine learning model block is removed.
[0365] In Example 8, the subject matter of Examples 3 to 7 includes: wherein the operation further includes: adding the new machine learning model block at different locations in the machine learning model, and evaluating the performance of the machine learning model in the case of the new machine learning model block at each of the different locations, and adding the new machine learning model block at a specific location based on the evaluated performance.
[0366] In Example 9, the subject matter of Examples 1 to 8 includes: wherein the operation further includes: continuously removing blocks and continuously adding new blocks until a first desired performance characteristic threshold is met when removing blocks and a second desired performance characteristic threshold is met when adding blocks.
[0367] In Example 10, the topics of Examples 1 to 9 include: wherein the machine learning model includes a stable diffusion model, and wherein the machine learning model block includes a ResNet block.
[0368] In Example 11, the subject matter of Examples 1 to 10 includes: wherein the operation further includes: disconnecting the preceding machine learning model block from the current machine learning model block, and disconnecting the current machine learning model block from the following machine learning model block.
[0369] In Example 12, the subject of Example 11 includes: wherein the operation further includes: after the current machine learning model block is disconnected from the preceding machine learning model block and the following machine learning model block, deleting the current machine learning model block.
[0370] In Example 13, the subject matter of Examples 1 to 12 includes: wherein connecting the preceding machine learning model block to the following machine learning model block in the machine learning model block is performed in response to identifying the performance characteristics of each machine learning model block, wherein, in response to identifying the performance characteristics of each machine learning model block, the operation further includes: connecting another preceding machine learning model block for another node to another following machine learning model block.
[0371] In Example 14, the subject matter described in Examples 1 to 13 includes: wherein the performance characteristic includes a latency characteristic indicating the time delay for a corresponding machine learning model block to process input to generate an output, wherein the operation further includes: identifying the current machine learning model block based on the latency characteristic, wherein the current machine learning model block is after the preceding machine learning model block and before the following machine learning model block.
[0372] In Example 15, the subject matter described in Examples 1 to 14 includes: wherein the performance characteristics include computational complexity characteristics that indicate the computational requirements of the corresponding machine learning model block.
[0373] In Example 16, the subject matter described in Examples 1 to 15 includes: wherein the performance characteristics include memory characteristics that indicate the memory storage requirements of the corresponding machine learning model block.
[0374] In Example 17, the subject matter of Examples 1 to 16 includes: wherein the iterative denoising process includes: adding random noise and an output image generated during a previous iteration to the machine learning model such that an output image for the current iteration is generated.
[0375] In Example 18, the subject of Example 17 includes: wherein the output of the machine learning model is processed by a decoder to generate the output image of the current iteration.
[0376] Example 19 is a method comprising: identifying performance characteristics of individual machine learning model blocks in an iterative denoising process of a machine learning model; identifying a current machine learning model block to be removed from the machine learning model based on the identified performance characteristics; and identifying preceding machine learning model blocks connected to the inputs of the current machine learning model block and subsequent machine learning model blocks connected to the outputs of the current machine learning model block.
[0377] Example 20 is a non-transitory computer-readable storage medium comprising instructions that, when executed by a computer, cause the computer to: identify performance characteristics of individual machine learning model blocks in an iterative denoising process of a machine learning model; identify a current machine learning model block to be removed from the machine learning model based on the identified performance characteristics; and identify preceding machine learning model blocks connected to the inputs of the current machine learning model block and subsequent machine learning model blocks connected to the outputs of the current machine learning model block.
[0378] Example 21 is at least one machine-readable medium including instructions that, when executed by a processing circuitry system, cause the processing circuitry system to perform operations for implementing Examples 1 to 20.
[0379] Example 22 is an apparatus that includes means for implementing Examples 1 to 20.
[0380] Example 23 is a system for implementing Examples 1 through 20.
[0381] Example 24 is a method for implementing Examples 1 through 20.
[0382] Glossary
[0383] "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.
[0384] "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.
[0385] 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 processes. 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 certain 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 a dedicated circuit system 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 systems 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) uniquely tailored to perform the configured function and is no longer a general-purpose processor. It will be appreciated that cost and time considerations can drive the decision of whether to implement a hardware component mechanically in a dedicated and permanently configured circuitry system or in a temporarily configured (e.g., software-configured) circuitry system. 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 different dedicated processors (e.g., including different hardware components) at different times. The software accordingly configures one or more specific processors to constitute a specific hardware component at one time and different hardware components at different times. The hardware components can provide information to and receive information from other hardware components.Therefore, the described hardware components can be considered as 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 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 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.
[0386] "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.
[0387] "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."
[0388] "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.
[0389] in conclusion
[0390] As used in this disclosure, phrases of the form "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, B, and C". In this disclosure, unless explicitly stated otherwise in conjunction with specific examples, 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}.
[0391] Unless the context explicitly requires it, throughout the specification and claims, the words “comprising,” “including,” etc., should be interpreted as inclusive rather than exclusive or exhaustive; that is, meaning “including but not limited to.” As used herein, the terms “connection,” “coupled,” or any variation thereof mean 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 entire application and not any particular part of it. 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 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 word “and / or” covers all the following interpretations of the word: any item in the list, all items in the list, and any combination of items in the list.
[0392] While some examples (such as those depicted in the accompanying figures) include a specific order of operations, that order may 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.
[0393] 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, in some implementations, certain methods or processing blocks may be omitted.
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 operations, the operations including: Identify the performance characteristics of each machine learning model block in the iterative denoising process of a machine learning model; Identify the current machine learning model blocks to be removed from the machine learning model based on the identified performance characteristics; Identify the preceding machine learning model block connected to the input of the current machine learning model block and the following machine learning model block connected to the output of the current machine learning model block; Connect the preceding machine learning model block to the following machine learning model block; Recognize user prompts, which indicate the user's intent regarding the generated image; and The machine learning model is used to analyze data corresponding to the prompt to generate one or more images, the machine learning model being trained to generate images based on data corresponding to the prompt.
2. The system according to claim 1, wherein, The machine learning model includes a stable diffusion model, wherein the machine learning model block includes a cross-attention block.
3. The system according to claim 1, wherein, The operation also includes adding a new machine learning model block to the machine learning model.
4. The system according to claim 3, wherein, The new machine learning model block is a copy of the existing machine learning model block of the machine learning model.
5. The system according to claim 3, wherein, The operation further includes: disconnecting the connection between the first block and the second block, and generating a connection between the first block and the new block, and between the new block and the second block.
6. The system according to claim 3, wherein, The machine learning model includes a stable diffusion model, wherein the machine learning model block includes a ResNet block.
7. The system according to claim 3, wherein, The new machine learning model block is added after the current machine learning model block is removed.
8. The system according to claim 3, wherein, The operation further includes: adding the new machine learning model block at different locations in the machine learning model, evaluating the performance of the machine learning model in each of the different locations where the new machine learning model block is located, and adding the new machine learning model block at a specific location based on the evaluated performance.
9. The system according to claim 1, wherein, The operation further includes: continuously removing blocks and continuously adding new blocks until a first expected performance characteristic threshold is met when removing blocks and a second expected performance characteristic threshold is met when adding blocks.
10. The system according to claim 1, wherein, The machine learning model includes a stable diffusion model, wherein the machine learning model block includes a ResNet block.
11. The system according to claim 1, wherein, The operation further includes: disconnecting the preceding machine learning model block from the current machine learning model block, and disconnecting the current machine learning model block from the following machine learning model block.
12. The system according to claim 11, wherein, The operation further includes deleting the current machine learning model block after it is disconnected from the preceding machine learning model block and the following machine learning model block.
13. The system according to claim 1, wherein, Connecting the preceding machine learning model block to the following machine learning model block in the machine learning model block is performed in response to identifying the performance characteristics of each machine learning model block, wherein, in response to identifying the performance characteristics of each machine learning model block, the operation further includes: connecting another preceding machine learning model block for another node to another following machine learning model block.
14. The system according to claim 1, wherein, The performance characteristics include a latency characteristic, which indicates the time delay for the corresponding machine learning model block to process the input and generate the output. The operation further includes: identifying the current machine learning model block based on the latency characteristic, wherein the current machine learning model block is after the preceding machine learning model block and before the following machine learning model block.
15. The system according to claim 1, wherein, The performance characteristics include computational complexity characteristics that indicate the computational requirements of the corresponding machine learning model block.
16. The system according to claim 1, wherein, The performance characteristics include memory characteristics that indicate the memory storage requirements of the corresponding machine learning model block.
17. The system according to claim 1, wherein, The iterative denoising process includes adding random noise and the output image generated during the previous iteration to the machine learning model to generate the output image of the current iteration.
18. The system according to claim 17, wherein, The output of the machine learning model is processed by a decoder to generate the output image for the current iteration.
19. A method comprising: Identify the performance characteristics of each machine learning model block in the iterative denoising process of a machine learning model; Identify the current machine learning model blocks to be removed from the machine learning model based on the identified performance characteristics; Identify the preceding machine learning model block connected to the input of the current machine learning model block and the following machine learning model block connected to the output of the current machine learning model block; Connect the preceding machine learning model block to the following machine learning model block; Recognize user prompts, which indicate the user's intent regarding the generated image; as well as The machine learning model is used to analyze data corresponding to the prompt to generate one or more images, the machine learning model being trained to generate images based on data corresponding to the prompt.
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: Identify the performance characteristics of each machine learning model block in the iterative denoising process of a machine learning model; Identify the current machine learning model blocks to be removed from the machine learning model based on the identified performance characteristics; Identify the preceding machine learning model block connected to the input of the current machine learning model block and the following machine learning model block connected to the output of the current machine learning model block; Connect the preceding machine learning model block to the following machine learning model block; Recognize user prompts, which indicate the user's intent regarding the generated image; as well as The machine learning model is used to analyze data corresponding to the prompt to generate one or more images, the machine learning model being trained to generate images based on data corresponding to the prompt.