O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

AI-generated Art NFTs on FVM

Carregando em…3

Confira estes a seguir

1 de 38 Anúncio

Mais Conteúdo rRelacionado

Semelhante a AI-generated Art NFTs on FVM (20)

Mais recentes (20)


AI-generated Art NFTs on FVM

  1. 1. Ally Haire Developer Relations Engineer DeveloperAlly FVM x Bacalhau: Bridging compute over state & Compute over data #BuildWithBacalhau
  2. 2. Agenda aka the timestamps… ● Quick Project Demo & Tech Stack ● Bacal… what? The why’s and how’s of Bacalhau ● The code! ○ Hardhat hyperspace deploy ○ NFT.Storage ○ Bacalhau Stable Diffusion scripts ● Possibilities & Future for FVM x Bacalhau
  3. 3. FVM x Bacalhau Better Together…
  4. 4. Data, Data, Data! Data, information and knowledge are some of the most important assets of our connected era and have become critical to human development & cooperation
  5. 5. FVM brings on-chain user programmability to Filecoin Bacalhau brings off-chain verifiable compute - both unlocking the next layer of innovation and value Storage Computation over state On-chain Computation over data … Off-chain Storage is only the start…..
  6. 6. Computation over State vs Computation over data… Computation over state (on-chain compute): FVM enables computation over state. Allows monitoring and automation of chain activities such as monitoring and automating storage deals and markets and enabling tokenisation of data for dataDAOs + more. Computation over data (off-chain, verifiable compute): Bacalhau enables complex computation over data - any data In the context of Filecoin & FVM, Bacalhau will allow processing of activities monitored on chain in a verifiable and deterministic manner. It enables a rich layer of data processing for Filecoin & FVM
  7. 7. Bacalhau & FVM FVM - programmable data on small amounts of state Bacalhau - Computation over this or any data including big data with support for GPUs Future: Bacalhau + FVM - calling Bacalhau in your smart contracts!
  8. 8. What’s stored on Filecoin? If we look at some of the data stored on filecoin we’d find… - Climate, space & geo-spatial data - Academic research including quantum science data and genetics research from several top tier universities - Literature including an initiative for an Open Library with Harvard University - HIstorically significant data such as data from holocaust victims and the Ukraine - Public record data such as election campaigns, or New York city public data - Internet Archive’s cache of web information and pages - Millions of unique collections of creative work in the form of NFT metadata from art, videos, music, games and more
  9. 9. Bacalhau? Please allow me to introduce myself…
  10. 10. Bacal.. - what ?? Bacalhau is a network of open compute resources available to serve any data processing workload - It’s simple to use (you don’t need an AI degree!) - Requires minimal operational overhead or setup - It’s decentralised-first (or edge-first) principled - Aims to provide efficient distributed computation with batched tasks Learn more about Bacalhau! @BacalhauProject https://youtu.be/RZopDyTJ1pk
  11. 11. Bacalhau Platform Architecture Bacalhau provides a platform for public, transparent, and optionally verifiable computation. It enables users to run arbitrary Docker containers and WebAssembly (wasm) images as tasks against data stored in the InterPlanetary File System (IPFS) It operates as a peer-to-peer network of nodes where each node has both a requestor and compute component
  12. 12. Bacalhau System Components ● Requester node (component) ● Compute node (component) ● Transport layer (interface) ● Executer (interface) ● Storage Provider (interface) ● Verifier (interface) ● Publisher (interface)
  13. 13. Bacalhau Job Lifecycle Job Submission Job Acceptance Job Execution Job Verification Job Publishing Job Submission Job Acceptance Job Execution Job Verification Job Publishing
  14. 14. Project Text-to-NFT #BuildWithBacalhau
  15. 15. Project Architecture Tech Stack: - NextJS, Typescript - OZ Solidity ERC721 - based contract - Bacalhau Text-to-Image Stable Diffusion Script - NFT.Storage for Metadata storage - Deployment to Hyperspace testnet with Hardhat - Front-end DApp deployment on Fleek
  16. 16. Demo!! 🎉
  17. 17. Making & deploying an NFT Contract to FVM The contract, hardhat deployment & setup
  18. 18. The Contract Based off an Open Zeppelin ERC721 NFT contract. The Mint function takes in an IPFS CID = NFT Metadata, Contract emits an event once minted on the blockchain
  19. 19. Hardhat Deploy > npx hardhat run ./deployBacalhauFRC721. ts --network filecoinHyperspace
  20. 20. Open Source Text to Image (Stable Diffusion) Script Running Open Source Dall-E on Bacalhau!
  21. 21. Dockerised python script with Tensorflow @BacalhauProject YouTube https://www.youtube.com/watch?v=53uY48e 1lis&t=1452s Stable Diffusion Script aka the Text-to-Image script
  22. 22. The Python Text-to-Image Script This is the basic text to image script. It uses a keras/tensorflow implementation of stable diffusion (an ML model) and then generates the images from a given text string and finally displays the image generated. The ML weights are pre- calculated in the library
  23. 23. Fetch… AI?! Just a javascript fetch function! Under the hood this runs the dockerised script on the Bacalhau network. The Bacalhau GPU nodes will then run the job and return an IPFS CID of the results folder
  24. 24. Bacalhau Job Return Folder
  25. 25. Storing metadata with NFT.Storage #NotOnIPFSNotYourNFT
  26. 26. NFT.Storage Metadata An IPFS CID is returned..
  27. 27. Minting the NFT! Calling Hyperspace Contract
  28. 28. Minting the NFT on FVM I’m using ethers to connect to my contract and metamask wallet as a transaction signer.
  29. 29. Project Text to NFT - Mint your Own! Deployed on Fleek!
  30. 30. Possibilities for Bacalhau x FVM Better together! <3
  31. 31. Bacalhau Computation over Data - use cases Bacalhau lends itself well to performing repetitive, deterministic processing jobs over data. - ETL Processes - Machine Learning & AI - IOT data integration - Batch Processing including for - Financial and market data - Video & Image processing
  32. 32. Bacalhau x FVM…. - Help Onboarding and Offboarding of Filecoin data in the future - Help build a reputation and Quality of Service layer for Filecoin by processing data retrieved on-chain about deals and storage providers. - Bacalhau could provide computation for market & payment data - Bacalhau could help with processing data from DAO’s & DataDAOs - Bacalhau could help empower more automation for creative endeavours like video and images processing - Bacalhau can enable game and metaverse data processing including for VR & AR. - Bacalhau, IOT & Simulations are possible - AI & ML Applications Future: Bacalhau + FVM - calling Bacalhau in your smart contracts!
  33. 33. More inspiration - check out the examples!
  34. 34. #BuildWithBacalhau Get involved in the future of data
  35. 35. Join the discussion: - Twitter @BacalhauProject - YouTube @bacalhauproject - Slack #bacalhau @filecoinproject - Github @bacalhau.org - Forum github.com/filecoin-project /bacalhau/discussions See more examples: - docs.bacalhau.org Get Involved in the future of data!
  36. 36. Future Events & ETH Denver… - Compute Over Data WG @ Eth Denver - COD Summit 3 - Bacalhau Builders Program - 9-10th May Boston Launch
  37. 37. Alan Kay - Computer Scientist “The best way to predict the future is to create it”
  38. 38. DeveloperAlly Github: DeveloperAlly/ bacalhau-fvm-nft