animagine xl 3.1

cagliostrolab

Introduction

Animagine XL 3.1 is an advanced text-to-image generation model focusing on anime-style images. It is an evolution from Animagine XL 3.0, offering improved image quality and a diverse character range. Built on Stable Diffusion XL, it is designed for anime enthusiasts and creators.

Architecture

  • Developer: Cagliostro Research Lab in collaboration with SeaArt.ai.
  • Type: Diffusion-based generative model.
  • Features: Enhanced understanding of hand anatomy, concept interpretation, and prompt processing.

Training

Animagine XL 3.1 was trained using 2x A100 80GB GPUs over approximately 15 days. The training involved:

  • Pretraining Stage: Utilized 870k images.
  • Finetuning Stages: Focused on aesthetic datasets to refine style and rendering.

Guide: Running Locally

  1. Installation:
    pip install diffusers transformers accelerate safetensors --upgrade
    
  2. Running the Model:
    import torch
    from diffusers import DiffusionPipeline
    
    pipe = DiffusionPipeline.from_pretrained(
        "cagliostrolab/animagine-xl-3.1", 
        torch_dtype=torch.float16, 
        use_safetensors=True, 
    )
    pipe.to('cuda')
    
    prompt = "1girl, souryuu asuka langley, neon genesis evangelion, solo, upper body, v, smile, looking at viewer, outdoors, night"
    negative_prompt = "nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]"
    
    image = pipe(
        prompt, 
        negative_prompt=negative_prompt,
        width=832,
        height=1216, 
        guidance_scale=7,
        num_inference_steps=28
    ).images[0]
    
    image.save("./output/asuka_test.png")
    
  3. Cloud GPUs: Consider using services like Google Colab or AWS for cloud-based GPU support to optimize performance.

License

Animagine XL 3.1 is released under the Fair AI Public License 1.0-SD. Key points include:

  • Modifications must be shared with the original license.
  • If network-accessible, provide source code access.
  • Distributions must adhere to the same or similar license terms.
  • Compliance issues must be resolved within 30 days to maintain the license.

More Related APIs in Text To Image