svjack's picture
Update README.md
2d8b334
metadata
language: ja
license: other
tags:
  - stable-diffusion
  - stable-diffusion-diffusers
  - text-to-image
  - ja
  - japanese
inference: false
extra_gated_prompt: >-
  One more step before getting this model.

  This model is open access and available to all, with a CreativeML OpenRAIL-M
  license further specifying rights and usage.

  The CreativeML OpenRAIL License specifies: 


  1. You can't use the model to deliberately produce nor share illegal or
  harmful outputs or content 

  2. rinna Co., Ltd. claims no rights on the outputs you generate, you are free
  to use them and are accountable for their use which must not go against the
  provisions set in the license

  3. You may re-distribute the weights and use the model commercially and/or as
  a service. If you do, please be aware you have to include the same use
  restrictions as the ones in the license and share a copy of the CreativeML
  OpenRAIL-M to all your users (please read the license entirely and carefully)

  Please read the full license here:
  https://huggingface.co/spaces/CompVis/stable-diffusion-license


  By clicking on "Access repository" below, you accept that your *contact
  information* (email address and username) can be shared with the model authors
  as well.
    
extra_gated_fields:
  I have read the License and agree with its terms: checkbox

Japanese Stable Diffusion Pokemon Model Card

Stable-Diffusion-Pokemon-ja is a Japanese-specific latent text-to-image diffusion model capable of generating Pokemon images given any text input.

This model was trained by using a powerful text-to-image model, diffusers For more information about our training method, see train_ja_model.py.

Model Details

Examples

Firstly, install our package as follows. This package is modified 🤗's Diffusers library to run Japanese Stable Diffusion.

pip install git+https://github.com/rinnakk/japanese-stable-diffusion
sudo apt-get install git-lfs
git clone https://huggingface.co/svjack/Stable-Diffusion-Pokemon-ja

Run this command to log in with your HF Hub token if you haven't before:

huggingface-cli login

Running the pipeline with the LMSDiscreteScheduler scheduler:

from japanese_stable_diffusion import JapaneseStableDiffusionPipeline
import torch

from torch import autocast
from diffusers import LMSDiscreteScheduler

scheduler = LMSDiscreteScheduler(beta_start=0.00085, beta_end=0.012,
     beta_schedule="scaled_linear", num_train_timesteps=1000)

#pretrained_model_name_or_path = "jap_model_26000"

#### sudo apt-get install git-lfs
#### git clone https://huggingface.co/svjack/Stable-Diffusion-Pokemon-ja
pretrained_model_name_or_path = "Stable-Diffusion-Pokemon-ja"

pipe = JapaneseStableDiffusionPipeline.from_pretrained(pretrained_model_name_or_path,
                                                           scheduler=scheduler, use_auth_token=True)

pipe = pipe.to("cuda")

#### disable safety_checker
pipe.safety_checker = lambda images, clip_input: (images, False)

imgs = pipe("鉢植えの植物を頭に載せた漫画のキャラクター",
                    num_inference_steps = 100
)
image = imgs.images[0]
    
image.save("output.png")

Generator Results comparison

https://github.com/svjack/Stable-Diffusion-Pokemon

0 1 2