OpenViSTAI · Agents · Blockchain · Crypto
Menu
Image & Video AI

Adain Style

Adain Style is a Lua/Torch implementation of arbitrary image style transfer using Adaptive Instance Normalization, accompanying a research paper. It transforms content images with user-provided style images and provides controls for stylization strength, color preservation, mixing styles and applying different styles to masked image regions.

Independent OpenViST project profile, based on linked sources.

Adain Style — OpenViST project profile in Image & Video AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want a research-code workflow for transforming images with arbitrary reference styles and need controls such as stylization strength, color preservation, style interpolation or masked spatial control.

Who it is for

  • Researchers and developers exploring neural style transfer in Lua/Torch.
  • Image creators who want to stylize images with arbitrary reference styles.
  • Developers adapting image stylization or video stylization workflows.

Documented uses

  • Apply a chosen style image to a content image.
  • Adjust the degree of stylization or preserve the content image’s colors.
  • Blend multiple style images using interpolation weights.
  • Apply different styles to foreground and background regions with a binary mask.
  • Process video through the documented video-stylization scripts.
Before you choose

Requirements & limits

The public GitHub repository identifies the code as MIT-licensed. The documented implementation uses Lua/Torch and requires Torch7; no hosted service is described.

  • This is repository code, not a hosted image-editing service; the documented workflow runs scripts in a Torch environment.
  • The model weights are obtained separately using models/download_models.sh.
  • CUDA, cuDNN and related Torch packages are optional; ffmpeg is listed for video processing.
  • The README’s speed figure is specific to 512 × 512 images on a Pascal Titan X.
  • The README documents image and video use, but video processing follows a separate script workflow.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Apply a style to one content image

Generate a stylized image from a content image and a style image using the documented basic command.

Before you start

  • Lua/Torch environment with Torch7, as required by the repository.
  • A pretrained decoder and modified VGG-19 network downloaded using the repository’s model script.
  • Paths to a content image and a style image.

Steps

  1. Download the model files with the command below.

    Documented command
    bash models/download_models.sh
  2. Run th test.lua -content PATH_TO_CONTENT_IMAGE -style PATH_TO_STYLE_IMAGE, substituting the paths to the two images.

  3. Optionally add documented controls such as -alpha to adjust stylization strength, -preserveColor to retain content colors, or -crop to center-crop both images.

Expected outcome

The test script processes the specified content and style images and writes a stylized result to the output directory.

Guide limitations

  • CUDA, cuDNN and related Torch packages are optional rather than required by the listed dependencies.
  • The repository reports 15 FPS for 512 × 512 images on a Pascal Titan X; that figure does not establish performance on other systems.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
xunhuang1995/AdaIN-style · Official homepage title · retained in its source language