A complete guide to Arcane Diffusion
Published: 2023-04-29 11:34:28

The [arcane-diffusion model](https://www.replicatecodex.com/models/116) lets you create stylized artwork from text prompts.

Ever wished you could create images that capture the essence of the [Arcane](https://en.wikipedia.org/wiki/Arcane_(TV_series)?ref=notes.replicatecodex.com) TV show? Well, the Arcane Diffusion model is here to turn your dreams into reality. In this guide, we will explore how this AI-powered image generation model helps you generate captivating visuals in the iconic Arcane style. This model is currently ranked Ranked 50th on Replicate Codex (a database of popular AI models), with more than 98,000 runs.

In this guide, we'll discover how to use Node.js to interact with the model via the Replicate API and see how to use Replicate Codex to find similar models and decide which one we like. We'll also learn more about how the model works, what inputs and outputs it expects, and discuss some of its limitations. Let's begin.

![Screenshot of the TV show Arcane](https://notes.replicatecodex.com/content/images/2023/04/AAAABVd0WGKifTvnfHARZ0-Jr5RAmtdDvYppJaNIdB5YXodfkU3kHHKModHWPh9p_NjwkifYUIDYhhxTxankJO7y0NnHjvIJtLCsBXk2.jpeg align="left")

You can watch [Arcane](https://www.netflix.com/title/81435684?ref=notes.replicatecodex.com) on Netflix

### About Arcane

Arcane is an adult animated steampunk action-adventure television series created by Christian Linke and Alex Yee for Netflix. Produced by the French animation studio Fortiche under Riot Games' supervision, Arcane is set in the League of Legends fictional universe and primarily focuses on sisters Vi and Jinx. First released in November 2021, the series has garnered a massive following, leading to the production of a second season.

### About the Arcane Diffusion Model

The Arcane Diffusion model is an AI model designed to generate stunning images based on textual prompts. Trained on images from the Arcane TV show, this model is perfect for fans looking to create their own Arcane-inspired visuals. The model was created by [tstramer](https://www.replicatecodex.com/creators/tstramer?ref=notes.replicatecodex.com). who has a ton of other models from popular culture, like [waifu-diffusion](https://notes.replicatecodex.com/the-magical-world-of-waifu-diffusion-creating-dreamy-anime-art-with-ai/), [elden-ring-diffusion](https://www.replicatecodex.com/models/112?ref=notes.replicatecodex.com), and [cyberpunk-anime-diffusion](https://notes.replicatecodex.com/mastering-the-cyberpunk-anime-diffusion-model/).

## Understanding the Inputs and Outputs of the Arcane Diffusion Model

### Inputs

The Arcane Diffusion model takes several inputs to generate images:

* `prompt` (string): The main input prompt describing the scene you want to create. For example, "a photo of an astronaut riding a horse on Mars."
    
* `negative_prompt` (string): Specify things you don't want to see in the output.
    
* `width` (integer): Width of the output image. Maximum size is 1024x768 or 768x1024 due to memory limits.
    
* `height` (integer): Height of the output image. Maximum size is 1024x768 or 768x1024 due to memory limits.
    
* `prompt_strength` (number): Prompt strength when using an initial image. 1.0 corresponds to full destruction of information in the initial image.
    
* `num_outputs` (integer): Number of images to output.
    
* `num_inference_steps` (integer): Number of denoising steps.
    
* `guidance_scale` (number): Scale for classifier-free guidance.
    
* `scheduler` (string): Choose a scheduler, with options including DDIM, K\_EULER, DPMSolverMultistep, K\_EULER\_ANCESTRAL, PNDM, and KLMS.
    
* `seed` (integer): Random seed. Leave blank to randomize the seed.
    

### Outputs

The output of the Arcane Diffusion model is an array of image URLs generated according to the input parameters provided. Here's the output format:

```json
{
  "type": "array",
  "items": {
    "type": "string",
    "format": "uri"
  },
  "title": "Output"
}
```

## A Step-by-Step Guide to Using the Arcane Diffusion Model

If you're not up for coding, you can interact directly with this model's "demo" on Replicate via their UI. Use this [link](https://replicate.com/tstramer/arcane-diffusion/examples?ref=notes.replicatecodex.com) to interact with the interface and try it out! This is a great way to play with the model's parameters and get some quick feedback and validation.

If you're more technical and looking to build a cool tool on top of this model, you can follow these simple steps to generate Arcane-inspired images using the Arcane Diffusion model on Replicate. Be sure to create a Replicate account first! You'll need your API key for this project.

### Step 1: Install the Replicate Node.js Client

Install the Replicate Node.js client by running:

```bash
npm install replicate
```

### Step 2: Set Up Your API Token

Copy your API token and authenticate by setting it as an environment variable:

```bash
export REPLICATE_API_TOKEN=[token]
```

### Step 3: Run the Model

Run the model using the following code:

```js
import Replicate from "replicate";

const replicate = new Replicate({
  auth: process.env.REPLICATE_API_TOKEN,
});

const output = await replicate.run(
  "tstramer/arcane-diffusion:4cbb3f91f9ba049151efb8922fdecc6703d419ea682b87ff94c5876addabfb19",
   {
      input: {
         prompt: "a photo of an astronaut riding a horse on mars"
      }
   }
);
```

You can also specify a webhook URL to be called when the prediction is complete. For example:

```js
const prediction = await replicate.predictions.create({
  version: "4cbb3f91f9ba049151efb8922fdecc6703d419ea682b87ff94c5876addabfb19",
  input: {
    prompt: "a photo of an astronaut riding a horse on mars, arcane style"
  },
  webhook: "https://example.com/your-webhook",
  webhook_events_filter: ["completed"]
});
```

To learn more, check out the [Node.js library documentation](https://replicate.com/docs/get-started/nodejs?ref=notes.replicatecodex.com). **Important note!** You should include the token "arcane style" at the end of your prompt for the best results - otherwise, the model will not match the intended art style.

In our example, we can pass a text prompt of: "a magical princess with golden hair, arcane style" to get an output that looks like the image below.

![Arcane Diffusion model output for a sample prompt.](https://notes.replicatecodex.com/content/images/2023/04/out-0--4-.png align="left")

Example output file using the sample prompt information.

Here are the other settings used to produce the example image - you can pass all of these into the model as part of the JSON input object:

* `width`: 512
    
* `height`: 512
    
* `scheduler`: K-LMS
    
* `num_outputs`: 1
    
* `guidance_scale`: 7.5
    
* `prompt_strength`: 0.8
    
* `num_inference_steps`: 50
    

## Taking it Further - Finding Other Image Generation Models with Replicate Codex

Replicate Codex is a fantastic resource for discovering AI models catering to various creative needs, including image generation, image-to-image conversion, and more. It's a fully searchable, filterable, tagged database of all the models on Replicate, allowing you to compare models, sort by price, or explore by creator. It's free, and it also has a digest email alerting you when new models come out so you can try them.

If you're interested in finding similar models to Arcane Diffusion...

### Step 1: Visit Replicate Codex

Head over to [ReplicateCodex](https://www.replicatecodex.com/?ref=notes.replicatecodex.com) to begin your search for similar models.

### Step 2: Use the Search Bar

Use the search bar at the top of the page to search for models with specific keywords, such as "image generation," "text-to-image," or "arcane." This will show you a list of models related to your search query. In this case, I searched by "tstramer," who is the creator for this model.

### Step 3: Filter or Sort the Results

On the left side of the search results page, you'll find several filters that can help you narrow down the list of models. You can filter and sort by models by type (Image-to-Image, Text-to-Image, etc.), cost, popularity, or even specific creators.

By applying these filters, you can find the models that best suit your specific needs and preferences. For example, if you're looking for an image generation model that's the most popular or has the best reviews, you can just search and then sort by the relevant metric.

![Screenshot of Replicate Codex](https://notes.replicatecodex.com/content/images/2023/04/screenshotr_2023-4-4T14-14-15.png align="left")

Viewing additional models by the same creator on Replicate Codex

In my case, I sorted the results by Runs - Descending to find [tstramer's](https://www.replicatecodex.com/creators/tstramer?ref=notes.replicatecodex.com) most popular models. If I'm interested in creating more stylized [cyberpunk art](https://notes.replicatecodex.com/mastering-the-cyberpunk-anime-diffusion-model/) while working with a similar model from the same creator, now I can!

## Conclusion

In this guide, we explored the Arcane Diffusion model, an AI-powered solution to generate stunning images inspired by the popular TV show Arcane. We provided a step-by-step guide on how to use the model to create images and showcased the various input parameters that can be adjusted to achieve different results.

We also discussed how to leverage the search and filter features in Replicate Codex to find similar models and compare their outputs, allowing us to broaden our horizons in the world of AI-powered image generation.

I hope this guide has inspired you to explore the creative possibilities of AI and bring your imagination to life. Don't forget to subscribe for more tutorials, updates on new and improved AI models, and a wealth of inspiration for your next creative project. Happy image enhancing and exploring the world of AI with Replicate Codex!

<iframe src="https://replicatecodex.substack.com/embed" width="100%" height="auto"></iframe>

*Subscribe or follow me on* [*Twitter*](https://twitter.com/mikeyoung44) *for more content like this!*