sd naruto diffusers

lambdalabs

Introduction

The SD-Naruto-Diffusers model by Lambda Labs is a fine-tuned version of Stable Diffusion designed to generate images in the style of Naruto. It leverages text-to-image capabilities to transform various prompts into Naruto-style artwork.

Architecture

This model utilizes the Stable Diffusion pipeline, which is part of the Diffusers library. It has been fine-tuned specifically for creating images with Naruto-like characteristics, using a unique dataset for training.

Training

The model was trained on BLIP-captioned Naruto images using two A6000 GPUs on the Lambda GPU Cloud. The training process involved approximately 30,000 steps over 12 hours, incurring a cost of around $20.

Guide: Running Locally

To run the model locally, follow these steps:

  1. Install Dependencies:

    !pip install diffusers==0.3.0
    !pip install transformers scipy ftfy
    
  2. Initialize the Model:

    import torch
    from diffusers import StableDiffusionPipeline
    from torch import autocast
    
    pipe = StableDiffusionPipeline.from_pretrained("lambdalabs/sd-naruto-diffusers", torch_dtype=torch.float16)  
    pipe = pipe.to("cuda")
    
  3. Generate Images:

    prompt = "Yoda"
    scale = 10
    n_samples = 4
    
    disable_safety = False
    
    if disable_safety:
      def null_safety(images, **kwargs):
          return images, False
      pipe.safety_checker = null_safety
    
    with autocast("cuda"):
      images = pipe(n_samples*[prompt], guidance_scale=scale).images
    
    for idx, im in enumerate(images):
      im.save(f"{idx:06}.png")
    
  4. Cloud GPUs: Consider using cloud services like Lambda GPU Cloud for efficient processing.

License

The licensing information for the SD-Naruto-Diffusers model is not specified in the provided document. Please refer to the respective repositories or contact Lambda Labs for detailed licensing terms.

More Related APIs in Text To Image