| title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned |
|---|---|---|---|---|---|---|---|
Alien on Mars |
👽 |
pink |
blue |
streamlit |
1.2.0 |
app.py |
false |
- Mr. Takeo (竹尾さん)
- Mr. Matsubara (松原さん)
- Me, Shimizu (清水(記))
-
簡単な火星の環境をシミュレートした遺伝的アルゴリズムにより導き出した究極生命体の特徴(=画像生成に与えるキーワード)を画像生成プログラムに与えて未来に生き残る究極生命体の画像を生成する。
-
The image generation program is given the characteristics of the ultimate life form (= keywords for image generation) derived by a genetic algorithm that simulates a simple Martian environment to generate images of the ultimate life form that will survive in the future.
-
Verify execution with M1 Mac, Python 3.7.13
-
On Colab
- Open StableDiffusionSample.ipynb on Colab
- Upload simulation.py to the current directory of Colab
-
On Local
- Install requirements.txt library in a virtual environment, etc.
# Create a virtual environment
python -m venv .venv
# Activate your virtual environment.
source .venv/bin/activate
# Upgrade pip
python -m pip install --upgrade pip
# Install library
pip install -r requirements.txt
-
Launch notebook StableDiffusionByCpu.ipynb.
-
Common
- Create a Hugging Face account.
- Create an access token in Hugging Face Setting.

- 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.
- Run a Colab or Local notebook, enter the Hugging Face token into the notebook, login and run the notebook.

-
M1 Mac, Python 3.7.13 で実行を確認
-
グーグルコラボ
- StableDiffusionSample.ipynb on Colabを開く
- Colab のカレントディレクトリに simulation.py をアップロードする
-
ローカル環境
- 仮想環境などに requirements.txt のライブラリをインストールする
# 仮想環境の作成
python -m venv .venv
# 仮想環境のアクティベート
source .venv/bin/activate
# pip のアップグレード
python -m pip install --upgrade pip
# ライブラリのインストール
pip install -r requirements.txt
-
stable_diffusion_cpu.ipynb を立ち上げる
-
共通
- Hugging Faceのアカウントを作成する
- Hugging Face の Settingでアクセストークンを作成する

- 公式サイトの解説を参考に、使用するモデル(例: CompVis/stable-diffusion-v1-4)の使用を許可する
- Colab または Local のノートブックを実行し、Hugging Face のトークンをノートブックに入力しログインしてノートブックを実行する。

- stable_diffusion_cpu.ipynb
- An executable file that performs image generation locally.
- ローカルで画像生成を行う実行ファイル。
- simulation.py
- File with genetic algorithm simulations, required for both Colab and local.
- 遺伝的アルゴリズムによるシミュレーションを行っているファイル。Colab、ローカルいずれの場合も必要。
- sample_output_images
- Folder containing the Output image described above.
- 上述の Output 画像が入ったフォルダ
- app.py
- Web (by streamlit) 上で画像生成(ただし重いので最終世代のみ)を行うためのファイル。


