KJMAN678 commited on
Commit
885ea0d
1 Parent(s): 05acc27

ローカル実行可能なNotebookを作成

Browse files
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .venv
2
+ *.png
3
+
4
+ !/sample_output_images/**
.ipynb_checkpoints/StableDiffusionByCpu-checkpoint.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
.ipynb_checkpoints/StableDiffusionSample-checkpoint.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
README.md CHANGED
@@ -26,22 +26,49 @@
26
  ##### right: 1000th Generation! Pair Herbivorous Ferocious alien from Mars
27
 
28
  <div align="center">
29
- <img src="./images/first_generation.png" alt="エビフライトライアングル" title="サンプル" style="width:240px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
30
- <img src="./images/500th_generation.png" alt="エビフライトライアングル" title="サンプル" style="width:240px;"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
31
- <img src="./images/1000th_generation.png" alt="エビフライトライアングル" title="サンプル" style="width:240px;"/>
32
  </div>
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  ### File Organization / ファイル構成
35
 
36
- - StableDiffusionSample.ipynb
37
  - An executable file that performs image generation. Sory You Need to Login Hugging Face Infomation!
38
  - 画像生成を行う実行ファイル。Hugging Face へのログイン情報が必要。
39
  - simulation.py
40
  - A file with a genetic algorithm simulation running in StableDiffusionSample.ipynb
41
  - StableDiffusionSample.ipynb で実行する、遺伝的アルゴリズムによるシミュレーションを行っているファイル。
42
- - images
43
  - Folder containing the Output image described above.
44
- - 上述のOutput画像が入ったフォルダ
45
-
46
- ### Reference material / 参考資料
47
- - [StableDiffusionSample.ipynb on Colab](https://colab.research.google.com/drive/1Uaqmq3ibMmEwepnn4OWHf2TVboUVa14O?usp=sharing))
 
26
  ##### right: 1000th Generation! Pair Herbivorous Ferocious alien from Mars
27
 
28
  <div align="center">
29
+ <img src="./sample_output_images/first_generation.png" alt="エビフライトライアングル" title="サンプル" style="width:240px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
30
+ <img src="./sample_output_images/500th_generation.png" alt="エビフライトライアングル" title="サンプル" style="width:240px;"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
31
+ <img src="./sample_output_images/1000th_generation.png" alt="エビフライトライアングル" title="サンプル" style="width:240px;"/>
32
  </div>
33
 
34
+ ### How to Execute / 実行方法
35
+
36
+ - On Colab
37
+ - Open [StableDiffusionSample.ipynb on Colab](https://colab.research.google.com/drive/1Uaqmq3ibMmEwepnn4OWHf2TVboUVa14O?usp=sharing)
38
+ - Upload simulation.py to the current directory of Colab
39
+
40
+ - On Local
41
+ - Install requirements.txt library in a virtual environment, etc.
42
+ - Launch notebook StableDiffusionByCpu.ipynb.
43
+
44
+ - Common
45
+ - Create a Hugging Face account.
46
+ - Create an access token in Hugging Face Setting.
47
+ - Allow the use of the model you want to use (e.g. CompVis/stable-diffusion-v1-4), referring to the explanation on the official site.
48
+ - Run a Colab or Local notebook, enter the Hugging Face token into the notebook, login and run the notebook.
49
+
50
+ - グーグルコラボ
51
+ - [StableDiffusionSample.ipynb on Colab](https://colab.research.google.com/drive/1Uaqmq3ibMmEwepnn4OWHf2TVboUVa14O?usp=sharing)を開く
52
+ - Colab のカレントディレクトリに simulation.py をアップロードする
53
+
54
+ - ローカル環境
55
+ - 仮想環境などに requirements.txt のライブラリをインストールする
56
+ - StableDiffusionByCpu を立ち上げるする。
57
+
58
+ - 共通
59
+ - [Hugging Face](https://huggingface.co/)のアカウントを作成する
60
+ - [Hugging Face の Setting](https://huggingface.co/settings/tokens)でアクセストークンを作成する
61
+ - [公式サイトの解説](https://huggingface.co/docs/hub/security-tokens)を参考に、使用するモデル(例: CompVis/stable-diffusion-v1-4)の使用を許可する
62
+ - Colab または Local のノートブックを実行し、Hugging Face のトークンをノートブックに入力しログインしてノートブックを実行する。
63
+
64
  ### File Organization / ファイル構成
65
 
66
+ - StableDiffusionByCpu.ipynb
67
  - An executable file that performs image generation. Sory You Need to Login Hugging Face Infomation!
68
  - 画像生成を行う実行ファイル。Hugging Face へのログイン情報が必要。
69
  - simulation.py
70
  - A file with a genetic algorithm simulation running in StableDiffusionSample.ipynb
71
  - StableDiffusionSample.ipynb で実行する、遺伝的アルゴリズムによるシミュレーションを行っているファイル。
72
+ - sample_output_images
73
  - Folder containing the Output image described above.
74
+ - 上述のOutput画像が入ったフォルダ
 
 
 
StableDiffusionByCpu.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
StableDiffusionSample.ipynb DELETED
The diff for this file is too large to render. See raw diff
 
__pycache__/simulation.cpython-37.pyc ADDED
Binary file (10.5 kB). View file
 
requirements.txt CHANGED
@@ -1,7 +1,10 @@
1
- # Python 3.7
2
  diffusers==0.3.0
3
  transformers==4.22.2
4
- scipy
5
- ftfy
6
  gradio==3.4.0
7
- ipywidgets>=7,<8
 
 
 
 
 
 
1
+ # Python 3.7.13
2
  diffusers==0.3.0
3
  transformers==4.22.2
 
 
4
  gradio==3.4.0
5
+ ipywidgets==7.7.2
6
+ google-colab==1.0.0
7
+ notebook==6.4.12
8
+ pandas==1.3.5
9
+ ftfy==6.1.1
10
+ spacy==3.4.1
{images → sample_output_images}/1000th_generation.png RENAMED
File without changes
{images → sample_output_images}/500th_generation.png RENAMED
File without changes
{images → sample_output_images}/first_generation.png RENAMED
File without changes