comfyui-workflow-templates 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfyui_workflow_templates
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: ComfyUI workflow templates package
5
5
  Author: Comfy-Org
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -686,55 +686,33 @@ Description-Content-Type: text/markdown
686
686
  License-File: LICENSE
687
687
  Dynamic: license-file
688
688
 
689
- - [workflow\_templates](#workflow_templates)
690
- - [Adding New Templates](#adding-new-templates)
691
- - [1 — Find Templates Folder](#1--find-templates-folder)
692
- - [2 — Obtain Workflow](#2--obtain-workflow)
693
- - [3 — Obtain Thumbnails](#3--obtain-thumbnails)
694
- - [4 — Choose Thumbnail Type](#4--choose-thumbnail-type)
695
- - [5 — Rename and Move Files](#5--rename-and-move-files)
696
- - [6 — Add Entry to `index.json`](#6--add-entry-to-indexjson)
697
- - [7 — Embed Models](#7--embed-models)
698
- - [8 — Embed Node Versions (optional)](#8--embed-node-versions-optional)
699
- - [9 — Add Documentation Nodes (optional)](#9--add-documentation-nodes-optional)
700
- - [9 — Create PR](#9--create-pr)
701
- - [10 — Add Translations](#10--add-translations)
702
-
703
689
  # workflow_templates
704
690
 
705
691
  ComfyUI workflow templates hosted under <https://github.com/Comfy-Org/ComfyUI_frontend/tree/main/public>.
706
692
 
693
+ - [Adding New Templates](#adding-new-templates)
694
+ - [1 — Find Templates Folder](#1--find-templates-folder)
695
+ - [2 — Obtain Workflow](#2--obtain-workflow)
696
+ - [3 — Obtain Thumbnails](#3--obtain-thumbnails)
697
+ - [4 — Choose Thumbnail Type](#4--choose-thumbnail-type)
698
+ - [5 — Compress Assets](#5--compress-assets)
699
+ - [6 — Rename and Move Files](#6--rename-and-move-files)
700
+ - [7 — Add Entry to `index.json`](#7--add-entry-to-indexjson)
701
+ - [8 — Embed Models](#8--embed-models)
702
+ - [9 — Embed Node Versions (optional)](#9--embed-node-versions-optional)
703
+ - [10 — Add Documentation Nodes (optional)](#10--add-documentation-nodes-optional)
704
+ - [11 — Bump Version and Create PR](#11--bump-version-and-create-pr)
705
+ - [12 — Add Translations](#12--add-translations)
706
+
707
707
  ## Adding New Templates
708
708
 
709
709
  I will demonstrate how to add a new template by walking through the process of adding the Wan text to video template.
710
710
 
711
711
  ### 1 — Find Templates Folder
712
712
 
713
- **Option 1**: [Set up ComfyUI_frontend dev environment](https://github.com/Comfy-Org/ComfyUI_frontend?tab=readme-ov-file#development), start the dev server and use the `ComfyUI_frontend/public/templates` folder (create it if it doesn't exist)
714
-
715
- **Option 2**: Start the virtual environment you use to run ComfyUI (if applicable), then run this command in the terminal to print the location of the templates folder:
716
-
717
- ```bash
718
- python -c "import comfyui_frontend_package, os; print(os.path.join(comfyui_frontend_package.__path__[0], 'static', 'templates'))"
719
- ```
720
-
721
- **Options 3**: Specify the frontend version with the `--front-end-version` argument. For example if using `1.13.5`, use the command:
722
-
723
- ```bash
724
- python main.py --front-end-version Comfy-Org/ComfyUI_frontend@1.13.5
725
- ```
726
-
727
- The templates folder will then be at the location:
728
-
729
- ```
730
- ComfyUI/web_custom_versions/Comfy-Org_ComfyUI_frontend/1.13.5/templates
731
- ```
732
-
733
- If using option 3, keep in mind local changes will be overwritten when restarting ComfyUI.
713
+ [Set up ComfyUI_frontend dev environment](https://github.com/Comfy-Org/ComfyUI_frontend?tab=readme-ov-file#development), start the dev server.
734
714
 
735
- > [!IMPORTANT]
736
- >
737
- > Now that you know the location, you can test changes to the templates by modifying the contents of this folder
715
+ Copy the `templates` folder from this repository to the `ComfyUI_frontend/public` folder.
738
716
 
739
717
  ### 2 — Obtain Workflow
740
718
 
@@ -757,8 +735,8 @@ For my Wan 2.1 template, I'll just use [the webp video](https://comfyanonymous.g
757
735
 
758
736
  Choose the content type and hover effect (optional) for your thumbnail:
759
737
 
760
- | Content Types | Hover Effects |
761
- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
738
+ | Content Types | Hover Effects |
739
+ | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
762
740
  | ![Image Element](docs/pictures/thumbnail-variants/default.gif)<br>**Image**: Default image with no extra effect | ![Compare Slider](docs/pictures/thumbnail-variants/compare-slider.gif)<br>**Compare Slider**: Before/after comparison tool |
763
741
  | ![Video Player](docs/pictures/thumbnail-variants/video.gif)<br>**Video**: Webp animation | ![Hover Dissolve](docs/pictures/thumbnail-variants/hover-disolve.gif)<br>**Hover Dissolve**: Dissolves to 2nd image on hover |
764
742
  | ![Audio Controls](docs/pictures/thumbnail-variants/audio.gif)<br>**Audio**: Audio playback | ![Hover Zoom](docs/pictures/thumbnail-variants/hover-zoom.gif)<br>**Hover Zoom**: Same as default but zooms more |
@@ -769,7 +747,17 @@ Choose the content type and hover effect (optional) for your thumbnail:
769
747
 
770
748
  Since my Wan 2.1 thumbnail is already an animated video, I'll use a video thumbnail but choose not to add an effect.
771
749
 
772
- ### 5 — Rename and Move Files
750
+ ### 5 — Compress Assets
751
+
752
+ Attempt to compress the assets. Since the thumbnails will never be taking up a large portion of the screen, it is acceptable to lower their size. It's also good to convert them to a space-efficient file format like webp or jpeg, applying a lossy compression algorithm (e.g., convert at 65% quality).
753
+
754
+ [EzGif](https://ezgif.com/png-to-webp) has free tools for changing resolution, compressing, and converting file types. Use whatever tool you are comfortable with.
755
+
756
+ > [!TIP]
757
+ >
758
+ > Convert to webp first, then resize to a smaller resolution. You can maintain high quality and still get near 95% reduction if e.g., converting from png.
759
+
760
+ ### 6 — Rename and Move Files
773
761
 
774
762
  Give the workflow a filename that has no spaces, dots, or special characters. Then rename the thumbnail file(s) to match, but with a counter suffix.
775
763
 
@@ -788,7 +776,7 @@ text_to_video_wan-1.webp
788
776
 
789
777
  Then move the renamed files to your templates folder.
790
778
 
791
- ### 6 — Add Entry to `index.json`
779
+ ### 7 — Add Entry to `index.json`
792
780
 
793
781
  There's an [`index.json`](templates/index.json) file in the templates folder which is where template configurations are set. You will need to add your template to this file, using the fields outlined below:
794
782
 
@@ -822,6 +810,7 @@ If your template doesn't fit into an existing category, you can add a new one:
822
810
  + "mediaSubtype": "webp",
823
811
  + "description": "Your template"s description.",
824
812
  + "tutorialUrl": "https://link-to-some-helpful-docs-if-they-exist.como"
813
+ + "thumbnailVariant": "zoomHover",
825
814
  + },
826
815
  + ]
827
816
  + }
@@ -852,13 +841,15 @@ The Wan 2.1 template I'm adding already fits into the "Video" category, so I'll
852
841
  },
853
842
  ```
854
843
 
844
+ The `thumbnailVariant` field is where you add the choice of thumbnail variant.
845
+
855
846
  Now you can start ComfyUI (or refresh browser if already running) and test that your template works.
856
847
 
857
848
  > [!WARNING]
858
849
  >
859
850
  > Make sure to use double-quotes `"` instead of single-quotes `'` when adding things to json files
860
851
 
861
- ### 7 — Embed Models
852
+ ### 8 — Embed Models
862
853
 
863
854
  Now we need to embed metadata for any models the template workflow uses. This way, the user can download and run the workflow without ever leaving ComfyUI.
864
855
 
@@ -896,6 +887,8 @@ To add them to the workflow json, find each associated node and add the metadata
896
887
  + {
897
888
  + "name": "wan_2.1_vae.safetensors",
898
889
  + "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors?download=true",
890
+ + "hash": "2fc39d31359a4b0a64f55876d8ff7fa8d780956ae2cb13463b0223e15148976b"
891
+ + "hash_type": "SHA256",
899
892
  + "directory": "vae"
900
893
  + }
901
894
  + ]
@@ -928,6 +921,8 @@ To add them to the workflow json, find each associated node and add the metadata
928
921
  + {
929
922
  + "name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
930
923
  + "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors?download=true",
924
+ + "hash": "c3355d30191f1f066b26d93fba017ae9809dce6c627dda5f6a66eaa651204f68",
925
+ + "hash_type": "SHA256",
931
926
  + "directory": "text_encoders"
932
927
  + }
933
928
  + ]
@@ -964,6 +959,8 @@ To add them to the workflow json, find each associated node and add the metadata
964
959
  + {
965
960
  + "name": "wan2.1_t2v_1.3B_bf16.safetensors",
966
961
  + "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_t2v_1.3B_bf16.safetensors?download=true",
962
+ + "hash": "6f999b0d6cb9a72b3d98ac386ed96f57f8cecae13994a69232514ea4974ad5fd",
963
+ + "hash_type": "SHA256",
967
964
  + "directory": "diffusion_models"
968
965
  + }
969
966
  + ]
@@ -972,25 +969,17 @@ To add them to the workflow json, find each associated node and add the metadata
972
969
  },
973
970
  ```
974
971
 
975
- You can also specify the model hash if appropriate:
972
+ You can find the `hash` and `hash_type` for a model on huggingface (see below)or by calculating it yourself with a script or online tool.
976
973
 
977
- ```json
978
- {
979
- "name": "wan2.1_t2v_1.3B_bf16.safetensors",
980
- "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_t2v_1.3B_bf16.safetensors?download=true",
981
- "directory": "diffusion_models",
982
- "hash": "8743b52063cd84097a65d1633f5c74f5",
983
- "hash_type": "MD5"
984
- }
985
- ```
974
+ ![finding hash on hugginface](docs/pictures/finding-hugginface-hash.png)
986
975
 
987
- [Workflow spec](https://docs.comfy.org/specs/workflow_json#workflow-json) for more details.
976
+ [Workflow spec](https://docs.comfy.org/specs/workflow_json#workflow-json) and [ModelFile Zod schema](https://github.com/Comfy-Org/ComfyUI_frontend/blob/6bc03a624ecbc0439501d0c7c2b073ca90e9a742/src/schemas/comfyWorkflowSchema.ts#L34-L40) for more details.
988
977
 
989
978
  > [!CAUTION]
990
979
  >
991
980
  > Ensure that the filename being downloaded from the links matches the filenames in the `widgets_values` exactly.
992
981
 
993
- ### 8 — Embed Node Versions (optional)
982
+ ### 9 — Embed Node Versions (optional)
994
983
 
995
984
  If your template requires a specific version of Comfy or a custom node, you can specify that using the same process as with models.
996
985
 
@@ -1024,7 +1013,7 @@ The Wan 2.1 workflow requires the SaveWEBM node which wasn't fully supported unt
1024
1013
 
1025
1014
  This can help diagnose issues when others run the workflow and ensure the workflow is more reproducible.
1026
1015
 
1027
- ### 9 — Add Documentation Nodes (optional)
1016
+ ### 10 — Add Documentation Nodes (optional)
1028
1017
 
1029
1018
  If your template corresponds with a page on https://github.com/comfyanonymous/ComfyUI_examples, https://docs.comfy.org/custom-nodes/workflow_templates, etc., you can add a `MarkdownNote` node with links:
1030
1019
 
@@ -1040,19 +1029,22 @@ Raw markdown used:
1040
1029
  > [Wan 2.1 Tutorial - docs.comfy.org](https://docs.comfy.org/advanced/wan-video) — Explanation of concepts and step-by-step tutorial
1041
1030
  ```
1042
1031
 
1043
- ### 9 — Create PR
1032
+ ### 11Bump Version and Create PR
1044
1033
 
1045
1034
  1. Fully test the workflow: delete the models, input images, etc. and try it as a new user would. Ensure the process ahs no hiccups and you can generate the thumbnail image on the first execution (if applicable).
1046
1035
  2. Create a fork of https://github.com/Comfy-Org/workflow_templates
1047
1036
  3. Clone the fork to your system
1048
1037
  4. Copy your new workflow and thumbnail(s) into the `templates` folder
1049
1038
  5. Add your changes to the `templates/index.json` file
1050
- 6. Commit and push changes
1051
- 7. Create a PR on https://github.com/Comfy-Org/workflow_templates
1039
+ 6. Bump the version in `pyproject.toml` ([example](https://github.com/Comfy-Org/workflow_templates/pull/32))
1040
+ 7. Commit and push changes
1041
+ 8. Create a PR on https://github.com/Comfy-Org/workflow_templates
1052
1042
 
1053
1043
  Here is the PR I made for the Wan template: https://github.com/Comfy-Org/workflow_templates/pull/16
1054
1044
 
1055
- ### 10 Add Translations
1045
+ Once the PR is merged, if you followed step 6 correctly, a new version will be published to the [comfyui-workflow-templates PyPi package](https://pypi.org/project/comfyui-workflow-templates).
1046
+
1047
+ ### 12 — Add Translations
1056
1048
 
1057
1049
  Make a PR in https://github.com/Comfy-Org/ComfyUI_frontend adding the mapping from your template filename (without extension) to the English display name title. The mapping goes in [`ComfyUI_frontend/src/locales/en/main.json`](https://github.com/Comfy-Org/ComfyUI_frontend/blob/9f0abac57ba0d5752c51198bf8a075b8336fdda1/src/locales/en/main.json#L480-L487).
1058
1050
 
@@ -44,11 +44,11 @@ comfyui_workflow_templates/templates/flux_schnell-1.webp,sha256=fQ7jcpAp78BSu5t0
44
44
  comfyui_workflow_templates/templates/flux_schnell.json,sha256=t0H9W4oD76duF3gyYD1M_gHiaE-o4YsY3_YFbbN2O5g,6758
45
45
  comfyui_workflow_templates/templates/gligen_textbox_example-1.webp,sha256=4Lv5YE_FdAhd4WOYgyjtSeEUxLnbMnYlC1sJRa6ITmI,105278
46
46
  comfyui_workflow_templates/templates/gligen_textbox_example.json,sha256=BbfVZLIvBpAk4sks-9CQ8Q_g9lp53Z3NaqGpW1kbQw8,8907
47
- comfyui_workflow_templates/templates/hidream_i1_dev-1.png,sha256=EUdfUTHY6let-LNDwPruoAO8Ceo6kgrrDjK7n6AoPJk,1548930
47
+ comfyui_workflow_templates/templates/hidream_i1_dev-1.webp,sha256=SVb1Rx2j7PYQ3bLpS4ihDHGnEHzuLvcxA0a-vEYrw3A,30980
48
48
  comfyui_workflow_templates/templates/hidream_i1_dev.json,sha256=dGwH3hix6IjKEeT2NZtDk169q3aFH9qy-ftoCHBcBfU,14102
49
- comfyui_workflow_templates/templates/hidream_i1_fast-1.png,sha256=5V0kvId-LtxVXmHplAk2hgh05zsdL-F57zaiWXwX_3c,1190054
49
+ comfyui_workflow_templates/templates/hidream_i1_fast-1.webp,sha256=6RCa4l9uGFw5HnyJpWwaLHRmv_NH1uZusv15oBnKVUs,19014
50
50
  comfyui_workflow_templates/templates/hidream_i1_fast.json,sha256=a7rYf05gErHUqjriNwPWzQGN8vDAcczzMcHO2nQxudk,14028
51
- comfyui_workflow_templates/templates/hidream_i1_full-1.png,sha256=rgcizygcpFB9jVXC8ue_F1Gagr6T6b03MUlqZlLqvpE,778573
51
+ comfyui_workflow_templates/templates/hidream_i1_full-1.webp,sha256=44kCdFDcOV_TU9kDvc5SmlGVEEF8s0j2h9748DXuNc4,8832
52
52
  comfyui_workflow_templates/templates/hidream_i1_full.json,sha256=JvHLKt1t42TNS7cUl0S5rKfhM3Z0pNzUlbqkSzFgp58,13972
53
53
  comfyui_workflow_templates/templates/hiresfix_esrgan_workflow-1.webp,sha256=qwI-UaVLBvjdvN6PqKgZArO7JsxW1iBuwTBV1t_ub24,80022
54
54
  comfyui_workflow_templates/templates/hiresfix_esrgan_workflow.json,sha256=4Uyhq8sL6f-EbopDoRXQpbJTt0lsV4-D2tT47wiMpPQ,13353
@@ -70,7 +70,7 @@ comfyui_workflow_templates/templates/image_to_video-1.webp,sha256=-3fIlyNhM-troU
70
70
  comfyui_workflow_templates/templates/image_to_video.json,sha256=0HU8Cd0_AL-HJlBf6o_yvkToA8j0G5o4Kp-5HA91sUI,6625
71
71
  comfyui_workflow_templates/templates/image_to_video_wan-1.webp,sha256=cxtxeW5KepuVvqInT1G4d6ddKN_qCWzzWW4sv0Yl6PI,926424
72
72
  comfyui_workflow_templates/templates/image_to_video_wan.json,sha256=eJJzxJcRo-f2P1EW3OOPFm0Nx-6rxFdpdkRVcXPATs4,11813
73
- comfyui_workflow_templates/templates/index.json,sha256=gaFlk7FSmMoQDgTtFONtkge7aIlulzqGOkpDGbCap0M,16626
73
+ comfyui_workflow_templates/templates/index.json,sha256=IVrLph1NqHfBHTfLGPmk3dWngDy-U5QoU0yh3iqW1sY,19051
74
74
  comfyui_workflow_templates/templates/inpain_model_outpainting-1.webp,sha256=PVdIJ4LKvAGP-OzD1FmzQGFpcUKOMdXj-bBgQwIgZDI,116632
75
75
  comfyui_workflow_templates/templates/inpain_model_outpainting-2.webp,sha256=8I_BITesJrhvWdqebcz_BUsG2O5ltayxgIkwZCs-R9w,27708
76
76
  comfyui_workflow_templates/templates/inpain_model_outpainting.json,sha256=ovkgoh1C-grKfehN495pSUKTBGnSQ6Hm9GTVgQ3LjCU,8608
@@ -121,12 +121,15 @@ comfyui_workflow_templates/templates/text_to_video_wan-1.webp,sha256=Olfa2hHjGbq
121
121
  comfyui_workflow_templates/templates/text_to_video_wan.json,sha256=t2ngFOKrRNy7hU3CaLpW9UCtbsyO4bxGf_uV9b8TqPM,8581
122
122
  comfyui_workflow_templates/templates/txt_to_image_to_video-1.webp,sha256=IXxokwudVpNY0_bO7wVU5w8jZlPiUg-ptsSr-sKv5MY,740588
123
123
  comfyui_workflow_templates/templates/txt_to_image_to_video.json,sha256=OgF78IDS70E0rX_TLF-P24eP72FVyKFCUChyZx9f5vo,11438
124
- comfyui_workflow_templates/templates/wan2.1_fun_control-1.webp,sha256=LbGDA_8hyqU1yEEvvPEZypI8jNdJ4WBpLLHwjCYv9_c,5256208
124
+ comfyui_workflow_templates/templates/wan2.1_flf2v_720_f16-1.webp,sha256=XQ1iZ9f0-qigZ23pByTgPoszg7Ltm36_qkhdmKiPfDg,1356354
125
+ comfyui_workflow_templates/templates/wan2.1_flf2v_720_f16.json,sha256=FmBaPGjT1OAhvBSN5bXjLujuKt5S5KNx4NFgFldFGns,17248
126
+ comfyui_workflow_templates/templates/wan2.1_fun_control-1.webp,sha256=hOIglkDZd_pRJMqpSVNFqwrJGOxl8KvaCCEzmzsg1q0,1379780
127
+ comfyui_workflow_templates/templates/wan2.1_fun_control-2.webp,sha256=czOi3YuJI9HrCCo8qs-XWf6pNgpJtMLK5jlXYF5ZS4s,1181802
125
128
  comfyui_workflow_templates/templates/wan2.1_fun_control.json,sha256=DtwD0aCFtDAfmHFZ60SmVaTQCwAKy27Ggpi5YHTjdbE,20623
126
- comfyui_workflow_templates/templates/wan2.1_fun_inp-1.webp,sha256=MwXmlKZmm830PP7Qv-_TKsQxgglQjQYSCqwcHhpoB5Y,4674784
129
+ comfyui_workflow_templates/templates/wan2.1_fun_inp-1.webp,sha256=0xKRBDLFCbMrni6o5zFlVt6o5a38Rxg1_Q0ETU2hPHc,1578046
127
130
  comfyui_workflow_templates/templates/wan2.1_fun_inp.json,sha256=PFoDxG-3_scsi2TGnDukSJ31dMC6j8ZYLqLQ_uJE5xM,19174
128
- comfyui_workflow_templates-0.1.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
129
- comfyui_workflow_templates-0.1.1.dist-info/METADATA,sha256=Hk2Qey56Xxm2liqHprMYjLO-47rpb_nVC7ErL5RcjXU,54809
130
- comfyui_workflow_templates-0.1.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
131
- comfyui_workflow_templates-0.1.1.dist-info/top_level.txt,sha256=u4ElFwwqJ25NY9OpjIB2eFEaFoAIk4bHrlGJKPMwJOo,27
132
- comfyui_workflow_templates-0.1.1.dist-info/RECORD,,
131
+ comfyui_workflow_templates-0.1.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
132
+ comfyui_workflow_templates-0.1.3.dist-info/METADATA,sha256=wOC-FaNkcbDaLpjVJrOl5GVtzj-EHhIvgHKT5EY1jIk,55417
133
+ comfyui_workflow_templates-0.1.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
134
+ comfyui_workflow_templates-0.1.3.dist-info/top_level.txt,sha256=u4ElFwwqJ25NY9OpjIB2eFEaFoAIk4bHrlGJKPMwJOo,27
135
+ comfyui_workflow_templates-0.1.3.dist-info/RECORD,,