Update READEME.
This commit is contained in:
		
							parent
							
								
									a74e2bd648
								
							
						
					
					
						commit
						22b8ab721f
					
				
							
								
								
									
										45
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								README.md
									
									
									
									
									
								
							@ -7,7 +7,10 @@ This is a Diffusers-based script for running Stable Diffusion on [Modal](https:/
 | 
				
			|||||||
## Features
 | 
					## Features
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1. Image generation using txt2img or img2img.
 | 
					1. Image generation using txt2img or img2img.
 | 
				
			||||||
   
 | 
					  
 | 
				
			||||||
 | 
					  Available versions:
 | 
				
			||||||
 | 
					    - SDXL
 | 
				
			||||||
 | 
					    - 1.5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2. Upscaling
 | 
					2. Upscaling
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -58,10 +61,8 @@ Images are generated and output to the `outputs/` directory.
 | 
				
			|||||||
├── README.md
 | 
					├── README.md
 | 
				
			||||||
├── cmd/                      # A directory with scripts to run inference.
 | 
					├── cmd/                      # A directory with scripts to run inference.
 | 
				
			||||||
│   ├── outputs/                # Images are outputted this directory.
 | 
					│   ├── 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.
 | 
					│   └── txt2img_handler.py         # A script to run txt2img inference.
 | 
				
			||||||
│   ├── sdxl_txt2img.py         # A script to run sdxl_txt2img inference.
 | 
					 | 
				
			||||||
│   └── util.py
 | 
					 | 
				
			||||||
└── app/                # A directory with config files.
 | 
					└── app/                # A directory with config files.
 | 
				
			||||||
    ├── __main__.py             # A main script to run inference.
 | 
					    ├── __main__.py             # A main script to run inference.
 | 
				
			||||||
    ├── Dockerfile              # To build a base image.
 | 
					    ├── Dockerfile              # To build a base image.
 | 
				
			||||||
@ -133,20 +134,30 @@ Set the prompt to Makefile.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
```makefile
 | 
					```makefile
 | 
				
			||||||
# ex)
 | 
					# ex)
 | 
				
			||||||
run:
 | 
					img_by_sdxl_txt2img:
 | 
				
			||||||
 cd ./cmd && modal run txt2img.py \
 | 
					  cd ./cmd && modal run txt2img_handler.py::main \
 | 
				
			||||||
 --prompt "hogehoge" \
 | 
					  --version "sdxl" \
 | 
				
			||||||
 --n-prompt "mogumogu" \
 | 
					  --prompt "A dog is running on the grass" \
 | 
				
			||||||
 --height 768 \
 | 
					  --n-prompt "" \
 | 
				
			||||||
 --width 512 \
 | 
					  --height 1024 \
 | 
				
			||||||
 --samples 1 \
 | 
					  --width 1024 \
 | 
				
			||||||
 --steps 30 \
 | 
					  --samples 1 \
 | 
				
			||||||
 --seed 12321 |
 | 
					  --steps 30 \
 | 
				
			||||||
 --use-upscaler "True" \
 | 
					  --use-upscaler "True" \
 | 
				
			||||||
 --fix-by-controlnet-tile "True" \
 | 
					  --output-format "avif"
 | 
				
			||||||
 --output-fomart "avif"
 | 
					 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- prompt: Specifies the prompt.
 | 
				
			||||||
 | 
					- n-prompt: Specifies a negative prompt.
 | 
				
			||||||
 | 
					- height: Specifies the height of the image.
 | 
				
			||||||
 | 
					- width: Specifies the width of the image.
 | 
				
			||||||
 | 
					- samples: Specifies the number of images to generate.
 | 
				
			||||||
 | 
					- steps: Specifies the number of steps.
 | 
				
			||||||
 | 
					- seed: Specifies the seed.
 | 
				
			||||||
 | 
					- use-upscaler: Enables the upscaler to increase the image resolution.
 | 
				
			||||||
 | 
					- fix-by-controlnet-tile: Specifies whether to use ControlNet 1.1 Tile. If enabled, it will repair broken images and generate high-resolution images. Only sd15 is supported.
 | 
				
			||||||
 | 
					- output-format: Specifies the output format. Only avif and png are supported.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### 5. Deploy an application
 | 
					### 5. Deploy an application
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Execute the below command. An application will be deployed on Modal.
 | 
					Execute the below command. An application will be deployed on Modal.
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										39
									
								
								README_ja.md
									
									
									
									
									
								
							
							
						
						
									
										39
									
								
								README_ja.md
									
									
									
									
									
								
							@ -5,8 +5,10 @@
 | 
				
			|||||||
## このスクリプトでできること
 | 
					## このスクリプトでできること
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1. txt2imgまたはimt2imgによる画像生成ができます。
 | 
					1. txt2imgまたはimt2imgによる画像生成ができます。
 | 
				
			||||||
 | 
					  
 | 
				
			||||||

 | 
					  利用可能なバージョン:
 | 
				
			||||||
 | 
					    - SDXL
 | 
				
			||||||
 | 
					    - 1.5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2. アップスケーラーとControlNet Tileを利用した高解像度な画像を生成することができます。
 | 
					2. アップスケーラーとControlNet Tileを利用した高解像度な画像を生成することができます。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -58,10 +60,8 @@ modal token new
 | 
				
			|||||||
├── README.md
 | 
					├── README.md
 | 
				
			||||||
├── cmd/                      # A directory with scripts to run inference.
 | 
					├── cmd/                      # A directory with scripts to run inference.
 | 
				
			||||||
│   ├── outputs/                # Images are outputted this directory.
 | 
					│   ├── 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.
 | 
					│   └── txt2img_handler.py         # A script to run txt2img inference.
 | 
				
			||||||
│   ├── sdxl_txt2img.py         # A script to run sdxl_txt2img inference.
 | 
					 | 
				
			||||||
│   └── util.py
 | 
					 | 
				
			||||||
└── app/                # A directory with config files.
 | 
					└── app/                # A directory with config files.
 | 
				
			||||||
    ├── __main__.py             # A main script to run inference.
 | 
					    ├── __main__.py             # A main script to run inference.
 | 
				
			||||||
    ├── Dockerfile              # To build a base image.
 | 
					    ├── Dockerfile              # To build a base image.
 | 
				
			||||||
@ -135,18 +135,17 @@ model:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
```makefile
 | 
					```makefile
 | 
				
			||||||
# 設定例
 | 
					# 設定例
 | 
				
			||||||
run:
 | 
					img_by_sdxl_txt2img:
 | 
				
			||||||
 cd ./cmd && modal run txt2img.py \
 | 
					  cd ./cmd && modal run txt2img_handler.py::main \
 | 
				
			||||||
 --prompt "hogehoge" \
 | 
					  --version "sdxl" \
 | 
				
			||||||
 --n-prompt "mogumogu" \
 | 
					  --prompt "A dog is running on the grass" \
 | 
				
			||||||
 --height 768 \
 | 
					  --n-prompt "" \
 | 
				
			||||||
 --width 512 \
 | 
					  --height 1024 \
 | 
				
			||||||
 --samples 1 \
 | 
					  --width 1024 \
 | 
				
			||||||
 --steps 30 \
 | 
					  --samples 1 \
 | 
				
			||||||
 --seed 12321 |
 | 
					  --steps 30 \
 | 
				
			||||||
 --use-upscaler "True" \
 | 
					  --use-upscaler "True" \
 | 
				
			||||||
 --fix-by-controlnet-tile "True" \
 | 
					  --output-format "avif"
 | 
				
			||||||
 --output-fomart "png"
 | 
					 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- prompt: プロンプトを指定します。
 | 
					- prompt: プロンプトを指定します。
 | 
				
			||||||
@ -157,8 +156,8 @@ run:
 | 
				
			|||||||
- steps: ステップ数を指定します。
 | 
					- steps: ステップ数を指定します。
 | 
				
			||||||
- seed: seedを指定します。
 | 
					- seed: seedを指定します。
 | 
				
			||||||
- use-upscaler: 画像の解像度を上げるためのアップスケーラーを有効にします。
 | 
					- use-upscaler: 画像の解像度を上げるためのアップスケーラーを有効にします。
 | 
				
			||||||
- fix-by-controlnet-tile: ControlNet 1.1 Tileの利用有無を指定します。有効にすると、崩れた画像を修復しつつ、高解像度な画像を生成します。
 | 
					- fix-by-controlnet-tile: ControlNet 1.1 Tileの利用有無を指定します。有効にすると、崩れた画像を修復しつつ、高解像度な画像を生成します。sd15のみ対応。
 | 
				
			||||||
- output-format: 出力フォーマットを指定します。avifも指定可能です。
 | 
					- output-format: 出力フォーマットを指定します。avifとpngのみ対応。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### 5. アプリケーションをデプロイする
 | 
					### 5. アプリケーションをデプロイする
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user