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 acd26cf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ NAMESPACE=aliyun-fc
REPO=fc-stable-diffusion
BASE_TAG=basev8

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
4 changes: 2 additions & 2 deletions src/code/images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ 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:-}"

export ARGS="${CLI_ARGS} ${EXTRA_ARGS}"
export ARGS=$(echo "$CLI_ARGS $EXTRA_ARGS" | awk '{for(i=1;i<=NF;i++) if (!arr[$i]++) printf "%s ", $i}')
export PYTHONPATH="${PYTHONPATH:-}:${NAS_DIR}/python"
export SD_WEBUI_CACHE_FILE="/mnt/auto/sd/cache.json"

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
}

0 comments on commit acd26cf

Please sign in to comment.