QuintW commited on
Commit
c00969a
2 Parent(s): dace73d 783d2eb

Merge remote-tracking branch 'origin/main'

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -32
  2. header_patch_v2.py +1 -5
Dockerfile CHANGED
@@ -8,46 +8,18 @@ ENV DEBIAN_FRONTEND noninteractive
8
 
9
  RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && rm -rf /var/lib/apt/lists/*
10
 
11
- RUN adduser --disabled-password --gecos '' user
12
- RUN mkdir /content && chown -R user:user /content
13
- WORKDIR /content
14
- USER user
15
 
16
  RUN pip3 install --upgrade pip
17
  # RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl
18
  RUN pip install --pre triton
19
  RUN pip install numexpr torchmetrics==0.11.4
20
 
21
- # RUN git clone -b v1.6 https://github.com/camenduru/stable-diffusion-webui
22
- # RUN sed -i '$a fastapi==0.90.0' /content/stable-diffusion-webui/requirements_versions.txt
23
- # RUN sed -i -e '''/prepare_environment()/a\ os.system\(f\"""sed -i -e ''\"s/dict()))/dict())).cuda()/g\"'' /content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py""")''' /content/stable-diffusion-webui/launch.py
24
- #RUN sed -i -e 's/ start()/ #start()/g' /content/stable-diffusion-webui/launch.py
25
- # RUN cd stable-diffusion-webui && python launch.py --skip-torch-cuda-test
26
  RUN python launch.py --skip-torch-cuda-test
27
- #
28
- #ADD --chown=user https://github.com/camenduru/webui/raw/main/env_patch.py /content/env_patch.py
29
- #RUN sed -i -e '/import image_from_url_text/r /content/env_patch.py' /content/stable-diffusion-webui/modules/ui.py
30
- #ADD --chown=user https://github.com/camenduru/webui/raw/main/header_patch.py /content/header_patch.py
31
- #RUN sed -i -e '/demo:/r /content/header_patch.py' /content/stable-diffusion-webui/modules/ui.py
32
- #
33
- #RUN sed -i -e '/(modelmerger_interface, \"Checkpoint Merger\", \"modelmerger\"),/d' /content/stable-diffusion-webui/modules/ui.py
34
- #RUN sed -i -e '/(train_interface, \"Train\", \"ti\"),/d' /content/stable-diffusion-webui/modules/ui.py
35
- #RUN sed -i -e '/extensions_interface, \"Extensions\", \"extensions\"/d' /content/stable-diffusion-webui/modules/ui.py
36
- #RUN sed -i -e '/settings_interface, \"Settings\", \"settings\"/d' /content/stable-diffusion-webui/modules/ui.py
37
- #RUN sed -i -e "s/document.getElementsByTagName('gradio-app')\[0\].shadowRoot/!!document.getElementsByTagName('gradio-app')[0].shadowRoot ? document.getElementsByTagName('gradio-app')[0].shadowRoot : document/g" /content/stable-diffusion-webui/script.js
38
- #RUN sed -i -e 's/ show_progress=False,/ show_progress=True,/g' /content/stable-diffusion-webui/modules/ui.py
39
- #RUN sed -i -e 's/default_enabled=False/default_enabled=True/g' /content/stable-diffusion-webui/webui.py
40
- #RUN sed -i -e 's/ outputs=\[/queue=False, &/g' /content/stable-diffusion-webui/modules/ui.py
41
- #RUN sed -i -e 's/ queue=False, / /g' /content/stable-diffusion-webui/modules/ui.py
42
-
43
- #RUN rm -rfv /content/stable-diffusion-webui/scripts/
44
- #
45
- #ADD --chown=user https://github.com/camenduru/webui-docker/raw/main/shared-config.json /content/shared-config.json
46
- #ADD --chown=user https://github.com/camenduru/webui-docker/raw/main/shared-ui-config.json /content/shared-ui-config.json
47
-
48
- #ADD --chown=user https://huggingface.co/ckpt/anything-v3-vae-swapped/resolve/main/anything-v3-vae-swapped.ckpt /content/stable-diffusion-webui/models/Stable-diffusion/anything-v3-vae-swapped.ckpt
49
 
50
  EXPOSE 7860
51
 
52
- #CMD cd /content/stable-diffusion-webui && python webui.py --xformers --listen --disable-console-progressbars --enable-console-prompts --no-progressbar-hiding --ui-config-file /content/shared-ui-config.json --ui-settings-file /content/shared-config.json
53
  CMD python webui.py --xformers --listen --disable-console-progressbars --enable-console-prompts --no-progressbar-hiding --ui-config-file
 
8
 
9
  RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && rm -rf /var/lib/apt/lists/*
10
 
11
+ WORKDIR /
12
+
 
 
13
 
14
  RUN pip3 install --upgrade pip
15
  # RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl
16
  RUN pip install --pre triton
17
  RUN pip install numexpr torchmetrics==0.11.4
18
 
19
+
 
 
 
 
20
  RUN python launch.py --skip-torch-cuda-test
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  EXPOSE 7860
23
 
24
+
25
  CMD python webui.py --xformers --listen --disable-console-progressbars --enable-console-prompts --no-progressbar-hiding --ui-config-file
header_patch_v2.py CHANGED
@@ -1,8 +1,4 @@
1
  with gr.Box():
2
  gr.HTML(f'''
3
- <div>
4
- <p><a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui">AUTOMATIC1111 Stable Diffusion Web UI</a> | v1.6.0 | Model: <a href="https://civitai.com/models/118406/counterfeitxl">rqdwdw/counterfeitxl</a></p>
5
- <p><a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}?duplicate=true"><img style="margin: 0" src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a>&nbsp;&nbsp;<a style="display:inline-block" href="https://github.com/camenduru/stable-diffusion-webui-colab" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>&nbsp;&nbsp;<a style="display:inline-block" href="https://patreon.com/camenduru"><img style="margin: 0" alt="Become A Patreon" src="https://badgen.net/badge/become/a%20patron/F96854"></a>&nbsp;&nbsp;<a style="display:inline-block" href="https://ko-fi.com/camenduru" target="_blank"><img style="margin: 0" alt="Buy a Coffee" src="https://badgen.net/badge/buy/a%20coffee/green?icon=kofi"></a></p>
6
- <p>🐣 sparkles Please follow me for new updates <a href="https://twitter.com/camenduru">https://twitter.com/camenduru</a> 🔥 Please join our discord server <a href="https://discord.gg/k5BwmmvJJU">https://discord.gg/k5BwmmvJJU</a> 🥳 Please join my patreon community <a href="https://patreon.com/camenduru">https://patreon.com/camenduru</a></p>
7
- </div>
8
  ''')
 
1
  with gr.Box():
2
  gr.HTML(f'''
3
+ FF NIETS
 
 
 
 
4
  ''')