# 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](https://github.com/huggingface/diffusers) For more information about our training method, see [train_ja_model.py](https://github.com/svjack/Stable-Diffusion-Pokemon/blob/main/train_ja_model.py). ## Model Details - **Developed by:** Zhipeng Yang - **Model type:** Diffusion-based text-to-image generation model - **Language(s):** Japanese - **License:** [The CreativeML OpenRAIL M license](https://huggingface.co/spaces/CompVis/stable-diffusion-license) is an [Open RAIL M license](https://www.licenses.ai/blog/2022/8/18/naming-convention-of-responsible-ai-licenses), adapted from the work that [BigScience](https://bigscience.huggingface.co/) and [the RAIL Initiative](https://www.licenses.ai/) are jointly carrying in the area of responsible AI licensing. See also [the article about the BLOOM Open RAIL license](https://bigscience.huggingface.co/blog/the-bigscience-rail-license) on which our license is based. - **Model Description:** This is a model that can be used to generate and modify images based on text prompts. It is a [Latent Diffusion Model (LDM)](https://arxiv.org/abs/2112.10752) that used [Stable Diffusion](https://github.com/CompVis/stable-diffusion) as a pre-trained model. - **Resources for more information:** [https://github.com/svjack/Stable-Diffusion-Pokemon](https://github.com/svjack/Stable-Diffusion-Pokemon) ## Examples Firstly, install our package as follows. This package is modified [🤗's Diffusers library](https://github.com/huggingface/diffusers) to run Japanese Stable Diffusion. ```bash 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: ```bash huggingface-cli login ``` Running the pipeline with the LMSDiscreteScheduler scheduler: ```python 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") ```