Yasunori Ozaki commited on
Commit
b1f91d8
1 Parent(s): 1417b95

Update README

Browse files
Files changed (2) hide show
  1. README.md +14 -15
  2. README_en.md +13 -14
README.md CHANGED
@@ -14,7 +14,7 @@ tags:
14
  English version is [here](README_en.md).
15
 
16
  # はじめに
17
- Cool Japan Diffusion (for learning) はStable Diffsionをファインチューニングして、アニメやマンガ、ゲームなどのクールジャパンを表現することに特化したモデルです。なお、内閣府のクールジャパン戦略とは特に関係はありません。
18
 
19
  # ライセンスについて
20
  ライセンスについては、もとのライセンス CreativeML Open RAIL++-M License に例外を除き商用利用禁止を追加しただけです。
@@ -38,9 +38,9 @@ Cool Japan Diffusion (for learning) はStable Diffsionをファインチュー
38
  したがって、法的な側面ではなく、倫理的な側面を調査する目的も本配布は兼ねていると考えてください。
39
 
40
  # 使い方
41
- 手軽に楽しみたい方は、こちらの[Space](https://huggingface.co/spaces/alfredplpl/cool-japan-diffusion-2-1-0)をお使いください。
42
- 詳しい本モデルの取り扱い方は[こちらの取扱説明書](https://alfredplpl.hatenablog.com/entry/2022/12/30/102636)にかかれています。
43
- モデルは[ここ](https://huggingface.co/aipicasso/cool-japan-diffusion-2-1-0/resolve/main/v2-1-0.ckpt)からダウンロードできます。
44
 
45
  以下、一般的なモデルカードの日本語訳です。
46
 
@@ -71,7 +71,7 @@ Stable Diffusion v2と同じ使い方です。
71
 
72
  ### Web UIの場合
73
 
74
- こちらの[取扱説明書](https://alfredplpl.hatenablog.com/entry/2022/12/30/102636)に従って作成してください。
75
 
76
  ### Diffusersの場合
77
 
@@ -86,20 +86,19 @@ pip install --upgrade git+https://github.com/huggingface/diffusers.git transform
86
  次のスクリプトを実行し、画像を生成してください。
87
 
88
  ```python
89
- from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
90
  import torch
91
 
92
- model_id = "aipicasso/cool-japan-diffusion-2-1-1-beta"
93
 
94
- scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
95
- pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16)
96
  pipe = pipe.to("cuda")
97
 
98
- prompt = "anime, a portrait of a girl with black short hair and red eyes, kimono, full color illustration, official art, 4k, detailed"
99
- negative_prompt="low quality, bad face, bad anatomy, bad hand, lowres, jpeg artifacts, 2d, 3d, cg, text"
100
- image = pipe(prompt,negative_prompt=negative_prompt).images[0]
101
-
102
- image.save("girl.png")
103
 
104
  ```
105
 
@@ -174,7 +173,7 @@ Stable Diffusionと同じバイアスが掛かっています。
174
  - VAEについて
175
  - Danbooruなどの無断転載サイトを除いた日本の国内法を遵守したデータ: 60万種類 (データ拡張により無限枚作成)
176
  - U-Netについて
177
- - Danbooruなどの無断転載サイトを除いた日本の国内法を遵守したデータ: 100万ペア
178
 
179
  **学習プロセス**
180
 
 
14
  English version is [here](README_en.md).
15
 
16
  # はじめに
17
+ Cool Japan Diffusion はStable Diffsionをファインチューニングして、アニメやマンガ、ゲームなどのクールジャパンを表現することに特化したモデルです。なお、内閣府のクールジャパン戦略とは特に関係はありません。
18
 
19
  # ライセンスについて
20
  ライセンスについては、もとのライセンス CreativeML Open RAIL++-M License に例外を除き商用利用禁止を追加しただけです。
 
38
  したがって、法的な側面ではなく、倫理的な側面を調査する目的も本配布は兼ねていると考えてください。
39
 
40
  # 使い方
41
+ 手軽に楽しみたい方は、こちらの[Space](https://huggingface.co/spaces/aipicasso/cool-japan-diffusion-latest-demo)をお使いください。
42
+ 詳しい本モデルの取り扱い方は[こちらの取扱説明書](https://alfredplpl.hatenablog.com/entry/2023/01/11/182146)にかかれています。
43
+ モデルは[ここ](https://huggingface.co/aipicasso/cool-japan-diffusion-2-1-1/resolve/main/v2-1-1.ckpt)からダウンロードできます。
44
 
45
  以下、一般的なモデルカードの日本語訳です。
46
 
 
71
 
72
  ### Web UIの場合
73
 
74
+ こちらの[取扱説明書](https://alfredplpl.hatenablog.com/entry/2023/01/11/182146)に従って作成してください。
75
 
76
  ### Diffusersの場合
77
 
 
86
  次のスクリプトを実行し、画像を生成してください。
87
 
88
  ```python
89
+ from diffusers import StableDiffusionPipeline, EulerAncestralDiscreteScheduler
90
  import torch
91
 
92
+ model_id = "aipicasso/cool-japan-diffusion-2-1-1"
93
 
94
+ scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
95
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16)#,use_auth_token="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")
96
  pipe = pipe.to("cuda")
97
 
98
+ prompt = "anime, masterpiece, a portrait of a girl, good pupil, 4k, detailed"
99
+ negative_prompt="deformed, blurry, bad anatomy, bad pupil, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, bad hands, fused fingers, messy drawing, broken legs censor, low quality, mutated hands and fingers, long body, mutation, poorly drawn, bad eyes, ui, error, missing fingers, fused fingers, one hand with more than 5 fingers, one hand with less than 5 fingers, one hand with more than 5 digit, one hand with less than 5 digit, extra digit, fewer digits, fused digit, missing digit, bad digit, liquid digit, long body, uncoordinated body, unnatural body, lowres, jpeg artifacts, 3d, cg, text, japanese kanji"
100
+ images = pipe(prompt,negative_prompt=negative_prompt, num_inference_steps=20).images
101
+ images[0].save("girl.png")
 
102
 
103
  ```
104
 
 
173
  - VAEについて
174
  - Danbooruなどの無断転載サイトを除いた日本の国内法を遵守したデータ: 60万種類 (データ拡張により無限枚作成)
175
  - U-Netについて
176
+ - Danbooruなどの無断転載サイトを除いた日本の国内法を遵守したデータ: 180万ペ���
177
 
178
  **学習プロセス**
179
 
README_en.md CHANGED
@@ -3,7 +3,7 @@
3
  ![eyecatch](eyecatch.jpg)
4
 
5
  # Introduction
6
- Cool Japan Diffusion (for learning) is the latent diffusion model created from Stable Diffsion.
7
  Cool Japan Diffusion is suitable for genetrating Cool Japan images such as Anime, Manga, and Game.
8
 
9
  # Legal and ethical information
@@ -14,9 +14,9 @@ Therefore, we cannot use the model for commercially except for news reporting.
14
  TBA.
15
 
16
  # Usage
17
- You can try the model by our [Space](https://huggingface.co/spaces/alfredplpl/cool-japan-diffusion-2-1-0).
18
  I recommend to use the model by Web UI.
19
- You can download the model [here](https://huggingface.co/aipicasso/cool-japan-diffusion-2-1-0/resolve/main/v2-1-0.ckpt).
20
 
21
  ## Model Details
22
  - **Developed by:** Robin Rombach, Patrick Esser, Alfred Increment
@@ -42,7 +42,7 @@ You can download the model [here](https://huggingface.co/aipicasso/cool-japan-di
42
  - Diffusers
43
 
44
  ## Web UI
45
- Download the model [here]().
46
  Then, install [Web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) by AUTIMATIC1111.
47
 
48
  ## Diffusers
@@ -56,20 +56,19 @@ pip install --upgrade git+https://github.com/huggingface/diffusers.git transform
56
  Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to EulerDiscreteScheduler):
57
 
58
  ```python
59
- from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
60
  import torch
61
 
62
- model_id = "aipicasso/cool-japan-diffusion-2-1-1-beta"
63
 
64
- scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
65
- pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16)
66
  pipe = pipe.to("cuda")
67
 
68
- prompt = "anime, a portrait of a girl with black short hair and red eyes, kimono, full color illustration, official art, 4k, detailed"
69
- negative_prompt="low quality, bad face, bad anatomy, bad hand, lowres, jpeg artifacts, 2d, 3d, cg, text"
70
- image = pipe(prompt,negative_prompt=negative_prompt).images[0]
71
-
72
- image.save("girl.png")
73
 
74
  ```
75
 
@@ -78,4 +77,4 @@ image.save("girl.png")
78
  - If you have low GPU RAM available, make sure to add a `pipe.enable_attention_slicing()` after sending it to `cuda` for less VRAM usage (to the cost of speed)
79
 
80
 
81
- *This model card was written by: Alfred Increment and is based on the [Stable Diffusion v2](https://huggingface.co/stabilityai/stable-diffusion-2/raw/main/README.md)
 
3
  ![eyecatch](eyecatch.jpg)
4
 
5
  # Introduction
6
+ Cool Japan Diffusion is the latent diffusion model created from Stable Diffsion.
7
  Cool Japan Diffusion is suitable for genetrating Cool Japan images such as Anime, Manga, and Game.
8
 
9
  # Legal and ethical information
 
14
  TBA.
15
 
16
  # Usage
17
+ You can try the model by our [Space](https://huggingface.co/spaces/aipicasso/cool-japan-diffusion-latest-demo).
18
  I recommend to use the model by Web UI.
19
+ You can download the model [here](https://huggingface.co/aipicasso/cool-japan-diffusion-2-1-1/resolve/main/v2-1-1.ckpt). Safetensor version is [here](https://huggingface.co/aipicasso/cool-japan-diffusion-2-1-1/resolve/main/v2-1-1.safetensors). Japanese manual is [here](https://alfredplpl.hatenablog.com/entry/2023/01/11/182146).
20
 
21
  ## Model Details
22
  - **Developed by:** Robin Rombach, Patrick Esser, Alfred Increment
 
42
  - Diffusers
43
 
44
  ## Web UI
45
+ Download the model [here](https://huggingface.co/aipicasso/cool-japan-diffusion-2-1-1/resolve/main/v2-1-1.ckpt).
46
  Then, install [Web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) by AUTIMATIC1111.
47
 
48
  ## Diffusers
 
56
  Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to EulerDiscreteScheduler):
57
 
58
  ```python
59
+ from diffusers import StableDiffusionPipeline, EulerAncestralDiscreteScheduler
60
  import torch
61
 
62
+ model_id = "aipicasso/cool-japan-diffusion-2-1-1"
63
 
64
+ scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
65
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16)#,use_auth_token="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")
66
  pipe = pipe.to("cuda")
67
 
68
+ prompt = "anime, masterpiece, a portrait of a girl, good pupil, 4k, detailed"
69
+ negative_prompt="deformed, blurry, bad anatomy, bad pupil, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, bad hands, fused fingers, messy drawing, broken legs censor, low quality, mutated hands and fingers, long body, mutation, poorly drawn, bad eyes, ui, error, missing fingers, fused fingers, one hand with more than 5 fingers, one hand with less than 5 fingers, one hand with more than 5 digit, one hand with less than 5 digit, extra digit, fewer digits, fused digit, missing digit, bad digit, liquid digit, long body, uncoordinated body, unnatural body, lowres, jpeg artifacts, 3d, cg, text, japanese kanji"
70
+ images = pipe(prompt,negative_prompt=negative_prompt, num_inference_steps=20).images
71
+ images[0].save("girl.png")
 
72
 
73
  ```
74
 
 
77
  - If you have low GPU RAM available, make sure to add a `pipe.enable_attention_slicing()` after sending it to `cuda` for less VRAM usage (to the cost of speed)
78
 
79
 
80
+ *This model card was written by: Alfred Increment and is based on the [Stable Diffusion v2](https://huggingface.co/stabilityai/stable-diffusion-2/raw/main/README.md)