Bacalhau Project Report – March 14, 2023
Waterlily, Amplify & Airflow
Happy Pi day! Last week we had a huge push on getting an FVM launch demo ready, made great progress on the Amplify project, and published docs for the Airflow operator.
Ethical AI Art with Waterlily
Just over 10 days ago, we started a high speed project to deliver a distributed app (dApp) which combines Bacalhau for GPU-enabled compute with a real financial use-case on FVM (FEVM being the Ethereum-compatibility layer for the FVM smart contract system launching today).
The use case that was chosen was that of Ethical AI Art: there’s a lot of debate over whether AI models like Stable Diffusion that generate art in the style of an artist are somehow stealing from that artist. Whatever your view on AI art, I’m sure you’ll agree that being able to pay artists a royalty when AI images are paid for that were trained (or fine-tuned) on a specific artist’s work is pretty cool. The Waterlily project does just this! For example:
Here a user has connected their Metamask wallet to the Filecoin network, and paid ⨎0.07 (about US$0.50) for four beautiful images of a dragon holding a golden egg. At present, 100% of the fee goes straight to the artist’s Filecoin wallet!
Here’s a diagram of how it Waterlily works along with our Lilypad bridge:
On the right hand side, we have the user’s contract. In this case, this is the Waterlily contract that we wrote. This contract depends on the LilypadEvents contract, and makes a function call into it:
The smart contract also implements the Lilypad interface by defining two functions, lilypadFulfilled and lilypadCancelled. These get called back when the Bacalhau job either completes or fails.
The Lilypad bridge contract then puts events onto the FVM blockchain, and the Lilypad bridge itself, which we operate, listens for those events and makes calls into the Bacalhau network. For this project, we decided to operate a separate bridge and Bacalhau cluster with 5 GPU nodes, to keep things simpler (so we don’t have to deal with the complexity of untrusted nodes running paid jobs — yet!)
We’ll write more about this project soon (e.g. how we fine-tuned stable diffusion) and share a video demo, for now I’ll just finish by saying everyone involved in this project made a Herculean effort to land it in the extremely short timeframe we had, well done everyone!
Automatic Metadata with Amplify 🔊
Project Amplify is now well underway — it’s a project to automatically ingest new CIDs on IPFS and eventually Filecoin, automatically classify the content-type and then based on the content-type, do content-specific things like generate metadata about the data, transcode or even automatically transcribe or segment audio/images using — yes — more AI models :-)
Here’s a video demo of one of our engineers showing the latest progress on this project:
Airflow docs! 📄
We now have some rather excellent public documentation about how to chain Bacalhau jobs together into a DAG (directed acyclic graph).
I’ll just leave these here.
We are really excited about this because loads of data scientists use Airflow to create pipelines today. Now they can run those jobs on a public Bacalhau network, or their own private cluster!
What’s next? ⏩
Further Station integration
Insulated Jobs demo
Retries in the Requester
Updated Metrics Dashboard
Questions/comments? Let us know!
Thanks for reading!
Your Humble Bacalhau Team