⌛Quickstart
Installation
To install Diffusechain, use the following pip command:
For more details and alternative installation options, refer to our comprehensive installation guide.
Environment Setup
Using DiffuseChain often involves integrating with various models and APIs. For this guide, we will demonstrate how to use DiffuseChain with Automatic1111's API.
Automatic1111
Automatic1111 Setup
First, ensure you have an instance of Automatic1111 running. If you haven't set it up yet, follow the Setup Guide to get started. Once your instance is running, make note of the base URL provided by Automatic1111.
Now, let's integrate Automatic1111 with DiffuseChain. In your Python script, import the Automatic1111 class from diffusechain:
Next, initialize the API instance with the base URL you obtained from Automatic1111:
Generating Your First Image
Now that the environment is set up, let's generate an image using DiffuseChain with the Automatic1111 API. For this example, we'll create an image based on the prompt "Elon Musk" while avoiding the negative prompts "ugly" and "out of frame."
Displaying and Saving the Image
To access and visualize the generated image, use the image
attribute of the result
object:
To save the image to a file, you can use the save
method:
Congratulations! You've successfully generated and saved your first image using Diffusechain and the Automatic1111 API.
If you encounter any issues or have any questions, feel free to seek support from our community or open an issue on GitHub. Happy generating!
Last updated