Add ImageToImage capabilities

Created on 20 June 2025, 4 months ago

Problem/Motivation

DreamStudio has many awesome things - add them to the new ImageToImage operation type.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany marcus_johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @marcus_johansson
  • πŸ‡¬πŸ‡§United Kingdom yautja_cetanu
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Switching to the correct tag

  • πŸ‡¨πŸ‡­Switzerland dan2k3k4 Zurich

    Marcus asked me to test this alongside https://www.drupal.org/project/ai/issues/3531212 ✨ Create Image-To-Image operation type Active

    Testing Steps

    Set up a new local Drupal, then added modules with source via:

    composer require 'drupal/ai:1.2.x-dev' -W --prefer-source
    composer require 'drupal/ai_provider_dreamstudio:1.0.x-dev' -W --prefer-source
    

    Enabled modules via (AI gets enabled as it's a dependency):

    drush en -y ai_provider_dreamstudio
    drush en -y ai_api_explorer
    

    Added a new Key with my API key from DreamStudio / Stability AI
    Set up the provider for the Image-to-Image

    Went to the Image-to-Image Explorer page at: /admin/config/ai/explorers/image_to_image_generator

    I tried a few options.

    The Outpaint does not seem to generate a new image.
    The Erase sort of works, at least the image is edited but it might have been the combination of the image and mask image that produced a weird overlay effect.
    The Remove Background worked as expected.

    One thing I noticed, when I first loaded the explorer, I think I clicked on Upscale but the "prompt" field was not showing up on first load, so when I clicked generate I got this error - but I think this is unrelated to this provider issue
    Error invoking model response: The Dreamstudio API returned an error: {"errors":["prompt: string must contain at least 1 character(s)"],"id":"f470c1eeea8ba89398fc93769c9adfaa","name":"bad_request"} with code 400

  • πŸ‡¨πŸ‡­Switzerland dan2k3k4 Zurich

    @Marcus, should this be "Needs review" or RTBC? It was "Active" when I tested it but I wasn't sure if you were planning further changes to the MR

Production build 0.71.5 2024