Skip to content

Commit

Permalink
Merge pull request #197 from konieshadow/dev
Browse files Browse the repository at this point in the history
v0.3.30
  • Loading branch information
konieshadow authored Jan 26, 2024
2 parents 04ff41b + 59b457c commit 11341d7
Show file tree
Hide file tree
Showing 17 changed files with 154 additions and 190 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ You can add `-e PIP_INDEX_URL={pypi-mirror-url}` to docker run command to change
- `--sync-repo SYNC_REPO` Sync dependent git repositories to local, 'skip' for skip sync action, 'only' for only do the sync action and not launch app
- `--skip-pip` Skip automatic pip install when setup
- `--preload-pipeline` Preload pipeline before start http server
- `--queue-size QUEUE_SIZE` Working queue size, default: 3, generation requests exceeding working queue size will return failure
- `--queue-size QUEUE_SIZE` Working queue size, default: 100, generation requests exceeding working queue size will return failure
- `--queue-history QUEUE_HISTORY` Finished jobs reserve size, tasks exceeding the limit will be deleted, including output image files, default: 0, means no limit
- `--webhook-url WEBHOOK_URL` Webhook url for notify generation result, default: None
- `--persistent` Store history to db
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ docker run -d --gpus=all \
- `--sync-repo SYNC_REPO` 同步 Fooocus 仓库到本地,`skip` 用于在启动时跳过同步,`only` 只同步不启动程序
- `--skip-pip` 跳过启动时的 pip 安装
- `--preload-pipeline` 启动 http server 之前加载 pipeline
- `--queue-size QUEUE_SIZE` 工作队列大小,默认是 3 ,超过队列的请求会返回失败
- `--queue-size QUEUE_SIZE` 工作队列大小,默认是 100 ,超过队列的请求会返回失败
- `--queue-history QUEUE_HISTORY` 保留的作业历史,默认 0 即无限制,超过会被删除,包括生成的图像
- `--webhook-url WEBHOOK_URL` 通知生成结果的 webhook 地址,默认为 None
- `--persistent` 持久化历史记录到SQLite数据库,默认关闭
Expand Down
8 changes: 4 additions & 4 deletions docs/api_doc_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ print(json.dumps(result, indent=4, ensure_ascii=False))
**base info:**

```yaml
EndPoint_V1: /v1/generation/image-inpait-outpaint
EndPoint_V2: /v2/generation/image-inpait-outpaint
EndPoint_V1: /v1/generation/image-inpaint-outpaint
EndPoint_V2: /v2/generation/image-inpaint-outpaint
Method: Post
DataType: form|json
```
Expand Down Expand Up @@ -232,7 +232,7 @@ def inpaint_outpaint(params: dict, input_image: bytes, input_mask: bytes = None)
"""
example for inpaint outpaint v1
"""
response = requests.post(url=f"{host}/v1/generation/image-inpait-outpaint",
response = requests.post(url=f"{host}/v1/generation/image-inpaint-outpaint",
data=params,
files={"input_image": input_image,
"input_mask": input_mask})
Expand Down Expand Up @@ -287,7 +287,7 @@ def inpaint_outpaint(params: dict) -> dict:
"""
example for inpaint outpaint v2
"""
response = requests.post(url=f"{host}/v2/generation/image-inpait-outpaint",
response = requests.post(url=f"{host}/v2/generation/image-inpaint-outpaint",
data=json.dumps(params),
headers={"Content-Type": "application/json"})
return response.json()
Expand Down
8 changes: 4 additions & 4 deletions docs/api_doc_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ print(json.dumps(result, indent=4, ensure_ascii=False))
**基础信息:**

```yaml
EndPoint_V1: /v1/generation/image-inpait-outpaint
EndPoint_V2: /v2/generation/image-inpait-outpaint
EndPoint_V1: /v1/generation/image-inpaint-outpaint
EndPoint_V2: /v2/generation/image-inpaint-outpaint
Method: Post
DataType: form|json
```
Expand Down Expand Up @@ -232,7 +232,7 @@ def inpaint_outpaint(params: dict, input_image: bytes, input_mask: bytes = None)
"""
局部重绘 v1 接口示例
"""
response = requests.post(url=f"{host}/v1/generation/image-inpait-outpaint",
response = requests.post(url=f"{host}/v1/generation/image-inpaint-outpaint",
data=params,
files={"input_image": input_image,
"input_mask": input_mask})
Expand Down Expand Up @@ -287,7 +287,7 @@ def inpaint_outpaint(params: dict) -> dict:
"""
局部重绘 v1 接口示例
"""
response = requests.post(url=f"{host}/v2/generation/image-inpait-outpaint",
response = requests.post(url=f"{host}/v2/generation/image-inpaint-outpaint",
data=json.dumps(params),
headers={"Content-Type": "application/json"})
return response.json()
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
" \"\"\"\n",
" Partial redraw v1 interface example\n",
" \"\"\"\n",
" response = requests.post(url=f\"{host}/v1/generation/image-inpait-outpaint\",\n",
" response = requests.post(url=f\"{host}/v1/generation/image-inpaint-outpaint\",\n",
" data=params,\n",
" files={\"input_image\": input_image,\n",
" \"input_mask\": input_mask})\n",
Expand Down Expand Up @@ -182,7 +182,7 @@
" \"\"\"\n",
" Partial redraw v2 interface example\n",
" \"\"\"\n",
" response = requests.post(url=f\"{host}/v2/generation/image-inpait-outpaint\",\n",
" response = requests.post(url=f\"{host}/v2/generation/image-inpaint-outpaint\",\n",
" data=json.dumps(params),\n",
" headers={\"Content-Type\": \"application/json\"})\n",
" return response.json()\n",
Expand Down
6 changes: 3 additions & 3 deletions examples/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class Config():
text2img = '/v1/generation/text-to-image'
img_upscale = '/v2/generation/image-upscale-vary'
img_upscale1 = '/v1/generation/image-upscale-vary'
inpaint_outpaint = '/v2/generation/image-inpait-outpaint'
inpaint_outpaint1 = '/v1/generation/image-inpait-outpaint'
inpaint_outpaint = '/v2/generation/image-inpaint-outpaint'
inpaint_outpaint1 = '/v1/generation/image-inpaint-outpaint'
img_prompt = '/v2/generation/image-prompt'
img_prompt1 = '/v1/generation/image-prompt'

Expand Down Expand Up @@ -131,5 +131,5 @@ def image_prompt_with_inpaint(img_prompt: list, input_image: str, input_mask: st
]
# print(upscale_vary(image=image_base64))
# print(inpaint_outpaint(input_image=s_base64, input_mask=m_base64))
# print(image_prompt(img_prompt=img_prompt, params=img_prompt_params))
print(image_prompt(img_prompt=img_prompt, params=img_prompt_params))
print(image_prompt_with_inpaint(img_prompt=img_prompt, input_image=s_base64, input_mask=m_base64, params=img_prompt_params))
2 changes: 1 addition & 1 deletion fooocus_api_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '0.3.29'
version = '0.3.30'
Loading

0 comments on commit 11341d7

Please sign in to comment.