Sign up
Log in
Sign up
Log in
On-demand webinar
Learn from our technical deep dive into using function calling to develop AI agents.
Watch now
Home
Blog

IP Adapter for Creative Content Production

Blog Author - Janisha Anand
Blog Author - Brunno Goldstein

Jun 25, 2024

5 minutes
IP Adapter example of input image and AI using to apply to a newly created image

OctoAI has unveiled a groundbreaking enhancement to its Media Generation Solution: the Image Prompt (IP) Adapter. This tool redefines how businesses can generate diverse image variations while preserving original colors, style, and composition. As an extension of Stable Diffusion XL (SDXL), the IP Adapter revolutionizes image generation by allowing images to serve as prompts, thus seamlessly transferring subject matter or style to new generations. This blog post will guide you through leveraging this innovative feature using OctoAI’s Image Generation API.

Intro to the IP Adapter

The IP Adapter is an integral part of OctoAI’s commitment to providing advanced and versatile image generation solutions. It offers businesses the ability to:

  • Create Diverse Image Variations: Generate multiple adaptations of an image while retaining the core elements such as colors, styles, and compositions.
  • Efficiently Transfer Styles and Compositions: Utilize existing images to maintain brand consistency across various adaptations.
  • Broad Application Scope: Ideal for creating characters and backgrounds for gaming, designing new apparel in fashion, and more.

OctoAI’s IP Adapter integrates with SDXL models, enhancing its adaptability and functionality when used with style presets, checkpoints, and LoRAs. However, it currently does not support ControlNets.

A walkthrough of using IP Adapter

In this walkthrough, we’ll explore the practical application of the IP Adapter. Imagine you are part of an AI Fashion Design Platform, tasked with creating new apparel designs by leveraging styles and compositions from existing ones. Here’s how you can achieve this using the IP Adapter.

Prerequisites

Before you begin, ensure you have:

Refer to the OctoAI API documentation for detailed setup instructions.

Exploring IP Adapter configurations

The IP Adapter offers several parameters for fine-tuning image generation. Let’s dive into some examples.

#1 Full Transfer of Style and Composition

For our first example, we will take an embroidery pattern from a fabric and impose a similar pattern on a garment.

  • Parameter Settings:
    • ip_adapter_method : full
    • ip_adapter_scale : Adjust for optimal results
    • ip_adapter_image : BASE_64 image
    • prompt: Desired text prompt
Output: A garment featuring the transferred embroidery pattern, retaining both the style and composition of the original fabric.
IP Adapter method: full
{
    "prompt": "A mannequin wearing a long v-neck dress, sleeveless. The mannequin is black, minimalistic, and headless, set against a neutral background.",
    "negative_prompt": "deformed, ugly, wrong proportion, low res, bad anatomy, worst quality, low quality",
    "sampler": "DPM_PLUS_PLUS_2M_KARRAS",
    "checkpoint": "octoai:RealVisXL",
    "cfg_scale": 7,
    "num_images": 1,
    "width": 1024,
    "height": 1024,
    "steps": 30,
    "use_refiner": "False",
    "ip_adapter_scale": 0.9,
    "ip_adapter_method": "full",
    "ip_adapter_image": <BASE_64>
    }

#2 Style transfer only

Next, we’ll generate apparel that embodies the style of a golden spherical ball with intricate patterns, without replicating its composition.

  • Parameter Settings:
    • ip_adapter_method : style
    • ip_adapter_scale : Adjust for optimal results
    • ip_adapter_image : BASE_64 image
    • prompt : Desired text prompt
Output: A garment reflecting the intricate style and colors of the golden sphere.
IP Adapter method: style
{
    "prompt": "A mannequin wearing a long v-neck dress, sleeveless. The mannequin is black, minimalistic, and headless, set against a neutral background.",
    "negative_prompt": "deformed, ugly, wrong proportion, low res, bad anatomy, worst quality, low quality",
    "sampler": "DDIM",
    "checkpoint": "octoai:default-sdxl",
     "sampler": "DPM_PLUS_PLUS_2M_KARRAS",
    "checkpoint": "octoai:RealVisXL",
    "cfg_scale": 7,
    "num_images": 1,
    "width": 1024,
    "height": 1024,
    "steps": 30,
    "use_refiner": "False",
    "ip_adapter_scale": 0.9,
    "ip_adapter_method": "style",
    "ip_adapter_image":<BASE_64>
    }

#3 Color palette transfer

For our third example, we’ll apply a color palette to generate apparel by transferring only the colors.

  • Parameter Settings:
    • ip_adapter_method : style
    • ip_adapter_scale : Adjust for optimal results
    • ip_adapter_image : BASE_64 image
    • prompt : Desired text prompt
Output: Garments displaying colors from the provided palette, with variations based on the ip_adapter_scale.
IP Adapter Method: style
{
    "prompt": "A mannequin wearing a long v-neck dress, sleeveless. Background is ((neutral)).",
    "negative_prompt": "deformed, ugly, wrong proportion, low res, bad anatomy, worst quality, low quality",
    "sampler": "DPM_PLUS_PLUS_2M_KARRAS",
    "checkpoint": "octoai:RealVisXL",
    "cfg_scale": 7,
    "num_images": 1,
    "width": 1024,
    "height": 1024,
    "steps": 30,
    "use_refiner": "False",
    "ip_adapter_scale": 0.99,
    "ip_adapter_method": "style",
    "ip_adapter_image":<BASE_64>
    }

#4 Composition transfer

Lastly, let’s focus on transferring the composition from a fluffy ballroom gown and fairy wings to generate new apparel.

  • Parameter Settings:
    • ip_adapter_method : composition
    • ip_adapter_scale : Adjust to achieve the desired outline and structure
    • ip_adapter_image : BASE_64 image
    • prompt : Desired text prompt
Output: New designs showcasing the transferred composition while allowing for style variations.
IP Adapter Method: composition
{
    "prompt": "A mannequin wearing a blue dress. Background is ((neutral)).",
    "negative_prompt": "deformed, ugly, wrong proportion, low res, bad anatomy, worst quality, low quality",
    "sampler": "DPM_PLUS_PLUS_2M_KARRAS",
    "checkpoint": "octoai:RealVisXL",
    "cfg_scale": 7,
    "num_images": 1,
    "width": 1024,
    "height": 1024,
    "steps": 30,
    "use_refiner": "False",
    "ip_adapter_scale": 0.8,
    "ip_adapter_method": "composition",
    "ip_adapter_image":<BASE_64>
    }

#5 Generating variations without text prompts

To generate variations of a reference apparel without using text prompts:

  • Use the reference image directly as a prompt and experiment with different parameters for diverse outputs.

  • Parameter Settings:
    • ip_adapter_method : full
    • ip_adapter_scale : Adjust for optimal results
    • ip_adapter_image : BASE_64 image
    • prompt : None
Output: Multiple variations of the original apparel, reflecting different styles or minor tweaks.
IP Adapter Method: full, No text prompt
{
    "sampler": "DPM_PLUS_PLUS_2M_KARRAS",
    "checkpoint": "octoai:RealVisXL",
    "cfg_scale": 7,
    "num_images": 1,
    "width": 1024,
    "height": 1024,
    "steps": 30,
    "use_refiner": "False",
    "ip_adapter_scale": 0.8,
    "ip_adapter_method": "full",
    "ip_adapter_image":<BASE_64>
    }

Conclusion

The IP Adapter feature in OctoAI’s Media Generation Solution opens new frontiers for creative content production. By leveraging the IP Adapter, businesses can generate consistent, visually appealing images across various applications—from fashion and gaming to marketing and beyond. Whether crafting new apparel designs or creating dynamic game assets, the IP Adapter offers unparalleled flexibility and control.

Explore the endless possibilities with OctoAI’s IP Adapter to transform your image generation processes. For more details, visit the OctoAI documentation.

Start using the IP Adapter today

Please join us on Discord to engage with the team and our community. We’ll use Discord to share about upcoming features, promotions and competitions. Stay tuned to learn more, and I look forward to see the applications and imagery you build using OctoAI Image Gen Solution.