Stable Diffusion

Running a Stable Diffusion Job from a smart contract with Lilypad v0

Open this contract in Remix -> Click here

Introduction

This example uses the Stable Diffusion Docker image found on the Bacalhau Docs.

For more info on how to create the Stable Diffusion Script and Docker Image see this tutorial or watch the video below.

Code

This example can be found in the Examples folder in the Lilypad Project Github.

To run this example, you can simply deploy it to any supported network and pass in the contact address to the constructor which corresponds to your network. See Deployed Network Details.

Open this example in remix -> click here

Job Results

In this example the Lilypad Stable Diffusion Job Results are returned as an IPFS v0 CID. You can use Brave browser or an IPFS gateway to see the results.

For example for a given return CID, type the following into your browser url

  • In Brave: ipfs://[CID]

  • In Other Browsers: www.w3s.link/ipfs/[CID] or www.ipfs.io/ipfs/[CID]

A folder of the Outputs will be shown:

You can also access the image directly by navigating to

  • In Brave: ipfs://[CID]/outputs/image0.png

  • In Other Browsers: www.w3s.link/ipfs/[CID] or www.ipfs.io/ipfs/[CID]/outputs/image0.png

Last updated

Logo