How it works

The Animetor app showcases the realm of possibilities Neural enables when merging decentralized infrastructure with mild trust assumptions. The app utilizes a standardized smart contract interface to interact with a network of off-chain nodes that respond to compute requests. The nodes transmit data via IPFS which dramatically increases the size of model inputs and outputs which would otherwise be infeasible for any blockchain.

Workflow

The overall workflow of Animetor can be summarized as follows:

  1. A user submits a prompt through the web app which is uploaded to IPFS with additional metadata

  2. The user submits the input IPFS hash to the Animetor contract

  3. Off-chain agents begin processing the compute request

  4. Off-chain agents fetch the model inputs from IPFS and send to the generative AI model

  5. The model output is uploaded to IPFS and submitted to chain through the watcher node

  6. Once compute is delivered to the Animetor contract a unique NFT is minted and transferred to the user containing the appropriate metadata

The following diagram illustrates the flow of information during the process described above.

On-Chain Components

The on-chain components of Animetor serve as a transparent ledger leveraging the power of the Neural blockchain.

  1. Animetor Smart Contract: This contract acts as the central authority, managing the state of the application and communicating with off-chain agents. The Animetor smart contract emits events at various stages of the process, acting as triggers for the off-chain agents to respond and fulfill requests. Additionally, the Animetor smart contract handles the task of minting and transferring NFTs which are immutable records solely created by the Animetor contract.

  2. Animetor NFT: This contract is owned by the Animetor smart contract which controls issuance and transfers. Any changes to the NFT are logged using events which are can be audited by inspecting the chain history. Finally, NFT metadata is stored on IPFS to utilize off-chain storage.

Off-Chain Components

While the on-chain components ensure fairness and transparency using decentralized infrastructure, the off-chain components are responsible for powering the AI capabilities that drive the applications experience.

  1. Off-Chain Agents: The off-chain agents play a critical role in facilitating the communication and coordination between the on-chain and off-chain components. These agents continuously monitor the Animetor smart contract for specific events, acting as intermediaries between the blockchain and the AI systems. When an event triggers the agent, the input IPFS hash is collected and the contents are read then sent to a generative AI image model. After the model is complete an output IPFS hash is published back to chain

  2. Generative AI Image Model: Under the hood, we are utilizing the Animagine XL 3.1 which is an open-source, anime-themed text-to-image model. The model has been optimized for generating anime-style images with higher quality. It includes a broader range of characters from well-known anime series, a curated dataset, and new aesthetic tags for better image creation. Built on Stable Diffusion XL, Animagine XL 3.1 is a valuable resource for anime fans, artists, and content creators by producing accurate and detailed representations of anime characters.

Last updated