Skip to content

Commit

Permalink
fix: file not allow and cors
Browse files Browse the repository at this point in the history
  • Loading branch information
OhYee committed Nov 20, 2023
1 parent dc76336 commit c6913e6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ help: ## 帮助文件

NAMESPACE=aliyun-fc
REPO=fc-stable-diffusion
BASE_TAG=basev8
BASE_TAG=basev9

SD15_VERSION=v12
ANIME_VERSION=v12
REALMAN_VERSION=v12
LITE_VERSION=v4
SD15_VERSION=v13
ANIME_VERSION=v13
REALMAN_VERSION=v13
LITE_VERSION=v5


push: push-jp push-beijing push-shanghai push-shenzhen push-hangzhou ## push 镜像到所有 registry
Expand Down Expand Up @@ -113,7 +113,7 @@ all-ap: build-base build push-base-ap push-ap
all: all-ap push push-base

dev: build-anime ## 使用动漫风格进行测试
docker run --rm -it --name=sd --net=host -v ${shell pwd}/nas:/mnt/auto stable-diffusion:anime-${ANIME_VERSION}
docker run --rm -it --gpus=all --name=sd --net=host -v ${shell pwd}/nas:/mnt/auto stable-diffusion:anime-${ANIME_VERSION}

exec: ## 登入容器实例
docker exec -it sd /bin/bash
2 changes: 1 addition & 1 deletion src/code/images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
ultralytics==8.0.145 py-cpuinfo protobuf==3.20 rembg==2.0.38 \
deepdanbooru onnxruntime-gpu jsonschema opencv_contrib_python opencv_python opencv_python_headless packaging Pillow tqdm \
chardet PyExecJS lxml pathos cryptography openai aliyun-python-sdk-core aliyun-python-sdk-alimt send2trash \
insightface==0.7.3 tensorflow ifnude && \
insightface==0.7.3 tensorflow ifnude diffusers["torch"] httpx==0.24.1 && \
pip install xformers==0.0.20 taming-transformers-rom1504 && \
pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu118

Expand Down
2 changes: 1 addition & 1 deletion src/code/images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ if [ -f "/mnt/auto/sd/startup.sh" ]; then
popd
fi

CLI_ARGS="${CLI_ARGS:---xformers --enable-insecure-extension-access --skip-version-check --no-download-sd-model}"
CLI_ARGS="${CLI_ARGS:---xformers --enable-insecure-extension-access --skip-version-check --no-download-sd-model --gradio-allowed-path=/}"
EXTRA_ARGS="${EXTRA_ARGS:-}"
DISABLE_AGENT="${DISABLE_AGENT:-}"

Expand Down
Binary file modified src/code/images/sd-agent
Binary file not shown.
3 changes: 3 additions & 0 deletions src/code/images/sd-resource/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,8 @@
"stable-diffusion-webui-dataset-tag-editor"
],
"upscaling_max_images_in_cache": 5,
"extra_options_txt2img": [
"face_restoration"
],
"disable_mmap_load_safetensors": true
}
2 changes: 1 addition & 1 deletion src/s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vars:
region: "{{ region }}"
serviceName: "{{ serviceName }}"
functionName: "{{ functionName }}"
imageUrl: "registry.{{region}}.aliyuncs.com/aliyun-fc/fc-stable-diffusion:{{ if type === '动漫风格' }}anime-v12{{ else if type === '真人风格'}}realman-v12{{else if type === '轻量版'}}lite-v4{{ else }}sd1.5-v12{{/if}}"
imageUrl: "registry.{{region}}.aliyuncs.com/aliyun-fc/fc-stable-diffusion:{{ if type === '动漫风格' }}anime-v13{{ else if type === '真人风格'}}realman-v13{{else if type === '轻量版'}}lite-v5{{ else }}sd1.5-v13{{/if}}"
filemgrToken: "{{ filemgrToken || '' }}"
extraArgs: "{{ extraArgs || '' }}{{ if webuiEnabled === false }} --nowebui{{/if}}{{ if webuiAuth !== '' && webuiAuth !== undefined }} --gradio-auth {{webuiAuth}}{{/if}}{{ if apiEnabled }} --api{{/if}}{{ if apiAuth !== '' && apiAuth !== undefined }} --api-auth {{apiAuth}}{{/if}}"
enableCollect: "{{ enableCollect || '' }}"
Expand Down

0 comments on commit c6913e6

Please sign in to comment.