From 16cda3a7e26f0cf1f43ce20a9ccec4bbd6a32506 Mon Sep 17 00:00:00 2001 From: hodanov <1031hoda@gmail.com> Date: Fri, 29 Dec 2023 13:12:36 +0900 Subject: [PATCH] Modify README and Makefile. --- Makefile | 8 ++++---- README.md | 10 +++++----- README_ja.md | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index f7631e8..38a5d95 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ app: - cd ./setup_files && modal deploy __main__.py + cd ./app && modal deploy __main__.py # `--upscaler` is a name of upscaler you want to use. # You can use upscalers the below: @@ -8,7 +8,7 @@ app: # - `RealESRGAN_x4plus_anime_6B` # - `RealESRGAN_x2plus` img_by_sd15_txt2img: - cd ./sdcli && modal run sd15_txt2img.py \ + cd ./cmd && modal run sd15_txt2img.py \ --prompt "a photograph of an astronaut riding a horse" \ --n-prompt "" \ --height 512 \ @@ -21,7 +21,7 @@ img_by_sd15_txt2img: --output-format "avif" img_by_sd15_img2img: - cd ./sdcli && modal run sd15_img2img.py \ + cd ./cmd && modal run sd15_img2img.py \ --prompt "cat wizard, gandalf, lord of the rings, detailed, fantasy, cute, adorable, Pixar, Disney, 8k" \ --n-prompt "" \ --samples 1 \ @@ -33,7 +33,7 @@ img_by_sd15_img2img: --base-image-url "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png" img_by_sdxl_txt2img: - cd ./sdcli && modal run sdxl_txt2img.py \ + cd ./cmd && modal run sdxl_txt2img.py \ --prompt "A dog is running on the grass" \ --height 1024 \ --width 1024 \ diff --git a/README.md b/README.md index e33f1c0..0a54640 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Please see [the documentation of Modal](https://modal.com/docs/guide) for modals To use the script, execute the below. 1. git clone the repository. -2. Copy `./setup_files/config.sample.yml` to `./setup_files/config.yml` +2. Copy `./app/config.sample.yml` to `./app/config.yml` 3. Open the Makefile and set prompts. 4. Execute `make app` command. An application will be deployed to Modal. 5. Execute `make img_by_sd15_txt2img` command. @@ -56,13 +56,13 @@ Images are generated and output to the `outputs/` directory. ├── .env # Secrets manager ├── Makefile ├── README.md -├── sdcli/ # A directory with scripts to run inference. +├── cmd/ # A directory with scripts to run inference. │   ├── outputs/ # Images are outputted this directory. │   ├── sd15_img2img.py # A script to run sd15_img2img inference. │   ├── sd15_txt2img.py # A script to run sd15_txt2img inference. │   ├── sdxl_txt2img.py # A script to run sdxl_txt2img inference. │   └── util.py -└── setup_files/ # A directory with config files. +└── app/ # A directory with config files. ├── __main__.py # A main script to run inference. ├── Dockerfile # To build a base image. ├── config.yml # To set a model, vae and some tools. @@ -91,7 +91,7 @@ This script downloads and uses a model from HuggingFace, but if you want to use HUGGING_FACE_TOKEN="Write your hugging face token here." ``` -### 3. Add the model to ./setup_files/config.yml +### 3. Add the model to ./app/config.yml Add the model used for inference. Use the Safetensors file as is. VAE, LoRA, and Textual Inversion are also configurable. @@ -124,7 +124,7 @@ Set the prompt to Makefile. ```makefile # ex) run: - cd ./sdcli && modal run txt2img.py \ + cd ./cmd && modal run txt2img.py \ --prompt "hogehoge" \ --n-prompt "mogumogu" \ --height 768 \ diff --git a/README_ja.md b/README_ja.md index 125bc18..cb38415 100644 --- a/README_ja.md +++ b/README_ja.md @@ -44,7 +44,7 @@ modal token new 下記の手順で画像が生成され、outputs ディレクトリに出力されます。 1. リポジトリをgit clone -2. ./setup_files/config.example.yml を ./setup_files/config.ymlにコピー +2. ./app/config.example.yml を ./app/config.ymlにコピー 3. Makefile を開いてプロンプトを設定 4. make appをコマンドラインで実行(Modal上にアプリケーションが構築されます) 5. make img_by_sd15_txt2img(スクリプトが起動します) @@ -56,13 +56,13 @@ modal token new ├── .env # Secrets manager ├── Makefile ├── README.md -├── sdcli/ # A directory with scripts to run inference. +├── cmd/ # A directory with scripts to run inference. │   ├── outputs/ # Images are outputted this directory. │   ├── sd15_img2img.py # A script to run sd15_img2img inference. │   ├── sd15_txt2img.py # A script to run sd15_txt2img inference. │   ├── sdxl_txt2img.py # A script to run sdxl_txt2img inference. │   └── util.py -└── setup_files/ # A directory with config files. +└── app/ # A directory with config files. ├── __main__.py # A main script to run inference. ├── Dockerfile # To build a base image. ├── config.yml # To set a model, vae and some tools. @@ -91,7 +91,7 @@ Hugging FaceのトークンをHUGGING_FACE_TOKENに記入します。 HUGGING_FACE_TOKEN="ここにHuggingFaceのトークンを記載する" ``` -### 3. ./setup_files/config.ymlを設定する +### 3. ./app/config.ymlを設定する 推論に使うモデルを設定します。Safetensorsファイルをそのまま利用します。VAE、LoRA、Textual Inversionも設定可能です。 @@ -126,7 +126,7 @@ loras: ```makefile # 設定例 run: - cd ./sdcli && modal run txt2img.py \ + cd ./cmd && modal run txt2img.py \ --prompt "hogehoge" \ --n-prompt "mogumogu" \ --height 768 \