diff --git a/workflows/comfy/Dockerfile b/workflows/comfy/Dockerfile index 885af86..0d62bc2 100644 --- a/workflows/comfy/Dockerfile +++ b/workflows/comfy/Dockerfile @@ -4,7 +4,6 @@ # Nvidia does not provide a CUDA 11.6 with Ubuntu 22.04, which mirrors my own desktop machine. Their CUDA 11.6 + Ubuntu 20.04 image has # a stale Python (3.8), so we have to use the DeadSnakes PPA to install a more modern version. # Gross. -# FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 FROM nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04 # See: https://github.com/opencontainers/image-spec/blob/master/annotations.md @@ -60,7 +59,6 @@ WORKDIR /app # Copy files to container COPY --chown=appuser:appgroup install.py /app/install.py -COPY --chown=appuser:appgroup list-repos.sh /app/list-repos.sh RUN chmod -R 777 /app # download & install comfy ui and its dependencies @@ -83,6 +81,7 @@ COPY --chown=appuser:appgroup dependencies.json /app/dependencies.json COPY --chown=appuser:appgroup server_requirements.txt /app/server_requirements.txt COPY --chown=appuser:appgroup initialize_comfy_extensions.py /app/initialize_comfy_extensions.py +COPY --chown=appuser:appgroup list-repos.sh /app/list-repos.sh COPY --chown=appuser:appgroup ComfyLauncher /app/ComfyLauncher COPY --chown=appuser:appgroup format_video.py /app/format_video.py COPY --chown=appuser:appgroup facefusion-runner.sh /app/facefusion-runner.sh diff --git a/workflows/preview_server/Dockerfile b/workflows/preview_server/Dockerfile index ad06211..a8801dd 100644 --- a/workflows/preview_server/Dockerfile +++ b/workflows/preview_server/Dockerfile @@ -4,7 +4,7 @@ # Nvidia does not provide a CUDA 11.6 with Ubuntu 22.04, which mirrors my own desktop machine. Their CUDA 11.6 + Ubuntu 20.04 image has # a stale Python (3.8), so we have to use the DeadSnakes PPA to install a more modern version. # Gross. -FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 +FROM nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04 # See: https://github.com/opencontainers/image-spec/blob/master/annotations.md LABEL org.opencontainers.image.title='Storyteller ML: Voice Conversion' @@ -57,23 +57,20 @@ COPY ./pip.conf /root/.config/pip/pip.conf WORKDIR /app # Copy files to container -COPY --chown=appuser:appgroup initialize_comfy_extensions.py /app/initialize_comfy_extensions.py COPY --chown=appuser:appgroup install.py /app/install.py RUN chmod -R 777 /app - - -RUN python3 install.py --comfy-ui-url https://github.com/comfyanonymous/ComfyUI.git --comfy-ui-commit eda87043862f743b0a0467735f8531f7c4709b3a -RUN python3 -m venv ComfyUI/venv -RUN ComfyUI/venv/bin/python -m pip install -r ComfyUI/requirements.txt --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ && \ - ComfyUI/venv/bin/python -m pip cache purge +RUN python3 install.py --comfy-ui-url https://github.com/comfyanonymous/ComfyUI.git --comfy-ui-commit faa57430b0ff882275b1afcf6610e8e9f8a5929b +RUN python3 -m venv venv +RUN venv/bin/python -m pip install -r ComfyUI/requirements.txt --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ && \ + venv/bin/python -m pip cache purge COPY --chown=appuser:appgroup required_requirements.txt /app/required_requirements.txt -RUN ComfyUI/venv/bin/python -m pip install -r required_requirements.txt --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ && \ - ComfyUI/venv/bin/python -m pip uninstall onnxruntime onnxruntime-gpu -y && \ - ComfyUI/venv/bin/python -m pip install onnxruntime-gpu ort-nightly-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ && \ - ComfyUI/venv/bin/python -m pip cache purge +RUN venv/bin/python -m pip install -r required_requirements.txt --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ && \ + venv/bin/python -m pip uninstall onnxruntime onnxruntime-gpu -y && \ + venv/bin/python -m pip install onnxruntime-gpu==1.17.1 ort-nightly-gpu --index-url=https://pkgs.dev.azure.com/onnxruntime/onnxruntime/_packaging/onnxruntime-cuda-12/pypi/simple/ --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ && \ + venv/bin/python -m pip cache purge COPY --chown=appuser:appgroup repos.json /app/repos.json RUN python3 install.py --repos-json repos.json @@ -81,13 +78,10 @@ RUN python3 install.py --repos-json repos.json COPY --chown=appuser:appgroup dependencies.json /app/dependencies.json COPY --chown=appuser:appgroup preview_server.py /app/preview_server.py COPY --chown=appuser:appgroup server_requirements.txt /app/server_requirements.txt +COPY --chown=appuser:appgroup initialize_comfy_extensions.py /app/initialize_comfy_extensions.py + ENV COMFY_ROOT_DIRECTORY=/app/ComfyUI ENV V2V_WORKFLOWS_DIRECTORY=/workflow_configs -ENV PREVIEW_WORKFLOW_NAME=workflow_api_instantpreview.json # protobuf use python implementation (weird error without) -ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python - -# rclone copy --progress --transfers=40 vocodes-s3:kasisnu-test-area-private/comfyui-deps/ vocodes-s3:kasisnu-test-area-private/comfyui-preview-deps/ - -# rclone copy --progress --transfers=40 . --include 'ComfyUI/models' vocodes-s3:kasisnu-test-area-private/comfyui-preview-deps/ \ No newline at end of file +ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python \ No newline at end of file diff --git a/workflows/preview_server/preview_server.py b/workflows/preview_server/preview_server.py index b656463..239ca01 100644 --- a/workflows/preview_server/preview_server.py +++ b/workflows/preview_server/preview_server.py @@ -69,7 +69,7 @@ COMFY_ROOT_DIRECTORY = os.environ.get("COMFY_ROOT_DIRECTORY", "/home/kasisnu/go/src/github.com/comfyanonymous/ComfyUI") SERVER_START_TIMEOUT = int(os.environ.get("SERVER_START_TIMEOUT", 60)) STYLE_LOCK = os.environ.get("STYLE_LOCK", None) -PREVIEW_WORKFLOW_NAME = os.environ.get("PREVIEW_WORKFLOW_NAME", 'workflow_api_instantpreview.json') +PREVIEW_WORKFLOW_NAME = os.environ.get("PREVIEW_WORKFLOW_NAME", 'yae_vid2vid_InstantPreview_14-05_API.json') MAPPING_NAME = os.environ.get("MAPPING_NAME", "mapping_two.json") AUTH_URL = os.environ.get("AUTH_URL", "https://api.fakeyou.com/v1/session") @@ -110,7 +110,8 @@ style_to_filename = { "cyberpunk_anime": "30_cyberpunk_anime.json", "dragonball": "31_dragonball.json", "realistic_matrix": "32_realistic_matrix.json", - "realistic_cyberpunk": "33_realistic_cyberpunk.json" + "realistic_cyberpunk": "33_realistic_cyberpunk.json", + "dreamer": "34_dreamer.json", } allowed_keys = ["style", "positive_prompt", "negative_prompt"] @@ -398,7 +399,7 @@ if __name__ == "__main__": signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) - comfyui_process = subprocess.Popen(["venv/bin/python", "main.py", "--highvram", "--disable-metadata"], cwd=COMFY_ROOT_DIRECTORY) + comfyui_process = subprocess.Popen(["../venv/bin/python", "main.py", "--highvram", "--disable-metadata"], cwd=COMFY_ROOT_DIRECTORY) # block until comfyUI server is up diff --git a/workflows/preview_server/repos.json b/workflows/preview_server/repos.json index 7f5de6d..cf82cc5 100644 --- a/workflows/preview_server/repos.json +++ b/workflows/preview_server/repos.json @@ -1,18 +1,8 @@ [ { - "folder": "ComfyUI/custom_nodes/ComfyUI-Logic", - "commit": "fb8897351f715ea75eebf52e74515b6d07c693b8", - "url": "https://github.com/theUpsider/ComfyUI-Logic.git" - }, - { - "folder": "ComfyUI/custom_nodes/comfyui-auto-nodes-layout", - "commit": "82bf0511c973e4c2a486a29a7ec9a3c8fe3d01a1", - "url": "https://github.com/phineas-pta/comfyui-auto-nodes-layout" - }, - { - "folder": "ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet", - "commit": "33d9884b76e8d7a2024691c5d98308e7e61bf38d", - "url": "https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet.git" + "folder": "ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation", + "commit": "5e11679995c68f33891c306a393915feefe234b5", + "url": "https://github.com/Fannovel16/ComfyUI-Frame-Interpolation.git" }, { "folder": "ComfyUI/custom_nodes/ComfyUI-Video-Matting", @@ -20,39 +10,9 @@ "url": "https://github.com/Fannovel16/ComfyUI-Video-Matting.git" }, { - "folder": "ComfyUI/custom_nodes/ComfyUI-KJNodes", - "commit": "df86fd77ac7f832b35ddaa748e4cf421ce9bf9e1", - "url": "https://github.com/kijai/ComfyUI-KJNodes.git" - }, - { - "folder": "ComfyUI/custom_nodes/ComfyMath", - "commit": "be9beab9923ccf5c5e4132dc1653bcdfa773ed70", - "url": "https://github.com/evanspearman/ComfyMath" - }, - { - "folder": "ComfyUI/custom_nodes/comfyui-art-venture", - "commit": "16fb21d67bdd6883cf7be0e976aec812c568ed3e", - "url": "https://github.com/sipherxyz/comfyui-art-venture" - }, - { - "folder": "ComfyUI/custom_nodes/ComfyUI_Comfyroll_CustomNodes", - "commit": "d78b780ae43fcf8c6b7c6505e6ffb4584281ceca", - "url": "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git" - }, - { - "folder": "ComfyUI/custom_nodes/ComfyUI-Manager", - "commit": "6c553d1228978352767f4914c4dd7787b00f6769", - "url": "https://github.com/ltdrdata/ComfyUI-Manager.git" - }, - { - "folder": "ComfyUI/custom_nodes/ComfyUI-Impact-Pack", - "commit": "e374bd304a4a5b44d0deae2b2afaf4d5faad4810", - "url": "https://github.com/ltdrdata/ComfyUI-Impact-Pack.git" - }, - { - "folder": "ComfyUI/custom_nodes/was-node-suite-comfyui", - "commit": "6c3fed70655b737dc9b59da1cadb3c373c08d8ed", - "url": "https://github.com/WASasquatch/was-node-suite-comfyui.git" + "folder": "ComfyUI/custom_nodes/comfyui_controlnet_aux", + "commit": "c0b33402d9cfdc01c4e0984c26e5aadfae948e05", + "url": "https://github.com/Fannovel16/comfyui_controlnet_aux.git" }, { "folder": "ComfyUI/custom_nodes/ComfyUI_FizzNodes", @@ -60,78 +20,123 @@ "url": "https://github.com/FizzleDorf/ComfyUI_FizzNodes.git" }, { - "folder": "ComfyUI/custom_nodes/ComfyUI_essentials", - "commit": "0283ce45272fc0737e3420c0aa2c5c30a74f7a36", - "url": "https://github.com/cubiq/ComfyUI_essentials.git" + "folder": "ComfyUI/custom_nodes/rembg-comfyui-node", + "commit": "fac7df6c3f42e158a2829b511b37f13e4cc834eb", + "url": "https://github.com/Jcd1230/rembg-comfyui-node.git" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet", + "commit": "7a456aa04e65e4cdaf67200b1bb6195bc544c64e", + "url": "https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet.git" }, { "folder": "ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved", "commit": "0c028a926492f02042b22dcb00f41b81c0779756", "url": "https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved.git" }, - { - "folder": "ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation", - "commit": "5e11679995c68f33891c306a393915feefe234b5", - "url": "https://github.com/Fannovel16/ComfyUI-Frame-Interpolation.git" - }, - { - "folder": "ComfyUI/custom_nodes/comfy-image-saver", - "commit": "65e6903eff274a50f8b5cd768f0f96baf37baea1", - "url": "https://github.com/giriss/comfy-image-saver.git" - }, - { - "folder": "ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus", - "commit": "d76bdbd2b59cb4164adb662359dc59b5aa213548", - "url": "https://github.com/cubiq/ComfyUI_IPAdapter_plus.git" - }, { "folder": "ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite", "commit": "f94597739f20dac331f9918a245149b6b00a60f2", "url": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git" }, { - "folder": "ComfyUI/custom_nodes/ComfyUI-Crystools", - "commit": "bfbfd121a245d04ce7d06ccc36acdb9873c47d9d", - "url": "https://github.com/crystian/ComfyUI-Crystools.git" - }, - { - "folder": "ComfyUI/custom_nodes/ComfyUI-Custom-Scripts", - "commit": "edc5321bfd3d8f77cace0a69b46e129d99b53c3d", - "url": "https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git" - }, - { - "folder": "ComfyUI/custom_nodes/comfyui_segment_anything", - "commit": "681d977c2cc244de729fd9e08145ff365c609262", - "url": "https://github.com/storyicon/comfyui_segment_anything.git" - }, - { - "folder": "ComfyUI/custom_nodes/efficiency-nodes-comfyui", - "commit": "3b7e89d969c02b80ff3662f34813679167b835fa", - "url": "https://github.com/jags111/efficiency-nodes-comfyui.git" - }, - { - "folder": "ComfyUI/custom_nodes/comfy_mtb", - "commit": "1070edd0245fb235183d5f38cd1bebf6e0405f97", - "url": "https://github.com/melMass/comfy_mtb.git" - }, - { - "folder": "ComfyUI/custom_nodes/comfyui_controlnet_aux", - "commit": "c0b33402d9cfdc01c4e0984c26e5aadfae948e05", - "url": "https://github.com/Fannovel16/comfyui_controlnet_aux.git" - }, - { - "folder": "ComfyUI/custom_nodes/rembg-comfyui-node", - "commit": "fac7df6c3f42e158a2829b511b37f13e4cc834eb", - "url": "https://github.com/Jcd1230/rembg-comfyui-node.git" + "folder": "ComfyUI/custom_nodes/ComfyUI_Comfyroll_CustomNodes", + "commit": "d78b780ae43fcf8c6b7c6505e6ffb4584281ceca", + "url": "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git" }, { "folder": "ComfyUI/custom_nodes/ComfyUi_NNLatentUpscale", "commit": "08105da31dbd7a54569661e135835e73bd8064b0", "url": "https://github.com/Ttl/ComfyUi_NNLatentUpscale.git" }, + { + "folder": "ComfyUI/custom_nodes/was-node-suite-comfyui", + "commit": "6c3fed70655b737dc9b59da1cadb3c373c08d8ed", + "url": "https://github.com/WASasquatch/was-node-suite-comfyui.git" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyUI-Crystools", + "commit": "bfbfd121a245d04ce7d06ccc36acdb9873c47d9d", + "url": "https://github.com/crystian/ComfyUI-Crystools.git" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus", + "commit": "d76bdbd2b59cb4164adb662359dc59b5aa213548", + "url": "https://github.com/cubiq/ComfyUI_IPAdapter_plus.git" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyUI_essentials", + "commit": "0283ce45272fc0737e3420c0aa2c5c30a74f7a36", + "url": "https://github.com/cubiq/ComfyUI_essentials.git" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyMath", + "commit": "be9beab9923ccf5c5e4132dc1653bcdfa773ed70", + "url": "https://github.com/evanspearman/ComfyMath" + }, + { + "folder": "ComfyUI/custom_nodes/comfy-image-saver", + "commit": "65e6903eff274a50f8b5cd768f0f96baf37baea1", + "url": "https://github.com/giriss/comfy-image-saver.git" + }, + { + "folder": "ComfyUI/custom_nodes/efficiency-nodes-comfyui", + "commit": "3b7e89d969c02b80ff3662f34813679167b835fa", + "url": "https://github.com/jags111/efficiency-nodes-comfyui.git" + }, + { + "folder": "ComfyUI/custom_nodes/comfyui-various", + "commit": "ec58185387c75b74ee93d6f835ff480772dbc64d", + "url": "https://github.com/jamesWalker55/comfyui-various" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyUI-KJNodes", + "commit": "df86fd77ac7f832b35ddaa748e4cf421ce9bf9e1", + "url": "https://github.com/kijai/ComfyUI-KJNodes.git" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyUI-Impact-Pack", + "commit": "e374bd304a4a5b44d0deae2b2afaf4d5faad4810", + "url": "https://github.com/ltdrdata/ComfyUI-Impact-Pack.git" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyUI-Manager", + "commit": "6c553d1228978352767f4914c4dd7787b00f6769", + "url": "https://github.com/ltdrdata/ComfyUI-Manager.git" + }, + { + "folder": "ComfyUI/custom_nodes/comfy_mtb", + "commit": "1070edd0245fb235183d5f38cd1bebf6e0405f97", + "url": "https://github.com/melMass/comfy_mtb.git" + }, + { + "folder": "ComfyUI/custom_nodes/comfyui-auto-nodes-layout", + "commit": "82bf0511c973e4c2a486a29a7ec9a3c8fe3d01a1", + "url": "https://github.com/phineas-pta/comfyui-auto-nodes-layout" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyUI-Custom-Scripts", + "commit": "edc5321bfd3d8f77cace0a69b46e129d99b53c3d", + "url": "https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git" + }, { "folder": "ComfyUI/custom_nodes/rgthree-comfy", "commit": "9021670e9ff887d40e031334fc9f3e92c599d161", "url": "https://github.com/rgthree/rgthree-comfy.git" + }, + { + "folder": "ComfyUI/custom_nodes/comfyui-art-venture", + "commit": "16fb21d67bdd6883cf7be0e976aec812c568ed3e", + "url": "https://github.com/sipherxyz/comfyui-art-venture" + }, + { + "folder": "ComfyUI/custom_nodes/comfyui_segment_anything", + "commit": "681d977c2cc244de729fd9e08145ff365c609262", + "url": "https://github.com/storyicon/comfyui_segment_anything.git" + }, + { + "folder": "ComfyUI/custom_nodes/ComfyUI-Logic", + "commit": "fb8897351f715ea75eebf52e74515b6d07c693b8", + "url": "https://github.com/theUpsider/ComfyUI-Logic.git" } ] diff --git a/workflows/preview_server/test_request.py b/workflows/preview_server/test_request.py index 4cfb695..23126ba 100644 --- a/workflows/preview_server/test_request.py +++ b/workflows/preview_server/test_request.py @@ -7,9 +7,9 @@ TEST_INPUT_FILE = 'test_image_10pc.jpg' # url = 'http://b3104:8005/preview/' # url = "http://207.189.112.61:31605/preview" -# url = 'http://localhost:8000/preview/' +url = 'http://localhost:8000/preview/' -url = 'https://funnel.tailce84f.ts.net/preview/' +# url = 'https://funnel.tailce84f.ts.net/preview/' style_to_filename = { "anime_2_5d": "1_2.5d_anime_model.json", "anime_2d_flat": "2_2d_flat_anime_model.json", @@ -27,6 +27,24 @@ style_to_filename = { "realistic_2": "14_realistic_2.json", "anime_retro_neon": "15_retro_neon_anime_90.json", "anime_standard": "16_standard_anime_model.json", + "hr_giger": "17_hr_giger.json", + "simpsons": "18_simpsons.json", + "carnage": "19_carnage.json", + "pastel_cute_anime": "20_pastel_cute_anime.json", + "bloom_lighting": "21_bloom_lighting.json", + "25d_horror": "22_25D_Horror.json", + "creepy": "23_creepy.json", + "creepy_vhs": "24_creepy_vhs.json", + "trail_cam_footage": "25_trail_cam_footage.json", + "old_black_white_movie": "26_old_black_white_movie.json", + "horror_noir_black_white": "27_horror_noir_black_white.json", + "techno_noir_black_white": "28_techno_noir_black_white.json", + "black_white_20s": "29_black_white_20s.json", + "cyberpunk_anime": "30_cyberpunk_anime.json", + "dragonball": "31_dragonball.json", + "realistic_matrix": "32_realistic_matrix.json", + "realistic_cyberpunk": "33_realistic_cyberpunk.json", + "dreamer": "34_dreamer.json", } all_styles = list(style_to_filename.keys()) @@ -34,13 +52,13 @@ all_styles = list(style_to_filename.keys()) import random random.shuffle(all_styles) -styles = list(all_styles)[:6] +styles = list(all_styles)[:] # random.shuffle(styles) test_style_list = styles + styles # for style, filename in list(style_to_filename.items())[:2]: for style in all_styles: - for i in range(3): + for i in range(1): # print(f"Testing style: {style}") payload = {"style": style, "positive_prompt": "test pos in", "negative_prompt": "test neg in"} with open(TEST_INPUT_FILE , 'rb') as input_file: