Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+75
- custom_nodes/ComfyUI-Crystools/.editorconfigAdded+20
- custom_nodes/ComfyUI-Crystools/.eslintrc.cjsAdded+164
- custom_nodes/ComfyUI-Crystools/.github/ISSUE_TEMPLATE/bug_report.mdAdded+47
- custom_nodes/ComfyUI-Crystools/.github/ISSUE_TEMPLATE/feature_request.mdAdded+20
- custom_nodes/ComfyUI-Crystools/.github/workflows/publish.ymlAdded+25
- custom_nodes/ComfyUI-Crystools/.gitignoreAdded+156
- custom_nodes/ComfyUI-Crystools/.others/ComfyUI.run.xmlAdded+25
- custom_nodes/ComfyUI-Crystools/.others/lint.run.xmlAdded+12
- custom_nodes/ComfyUI-Crystools/.others/pre-commitAdded+33
- custom_nodes/ComfyUI-Crystools/.others/typescript.run.xmlAdded+12
- custom_nodes/ComfyUI-Crystools/.others/version.pyAdded+60
- custom_nodes/ComfyUI-Crystools/LICENSEAdded+21
- custom_nodes/ComfyUI-Crystools/README.mdAdded+649
- custom_nodes/ComfyUI-Crystools/__init__.pyAdded+106
- custom_nodes/ComfyUI-Crystools/__pycache__/__init__.cpython-312.pycAdded
- custom_nodes/ComfyUI-Crystools/core/__init__.pyAdded+6
- custom_nodes/ComfyUI-Crystools/core/__pycache__/__init__.cpython-312.pycAdded
- custom_nodes/ComfyUI-Crystools/core/__pycache__/common.cpython-312.pycAdded
- custom_nodes/ComfyUI-Crystools/core/__pycache__/config.cpython-312.pycAdded
- custom_nodes/ComfyUI-Crystools/core/__pycache__/keys.cpython-312.pycAdded
- custom_nodes/ComfyUI-Crystools/core/__pycache__/logger.cpython-312.pycAdded
- custom_nodes/ComfyUI-Crystools/core/__pycache__/types.cpython-312.pycAdded
- custom_nodes/ComfyUI-Crystools/core/__pycache__/version.cpython-312.pycAdded
- custom_nodes/ComfyUI-Crystools/core/common.pyAdded+119
- custom_nodes/ComfyUI-Crystools/core/config.pyAdded+7
- custom_nodes/ComfyUI-Crystools/core/keys.pyAdded+29
- custom_nodes/ComfyUI-Crystools/core/logger.pyAdded+39
- custom_nodes/ComfyUI-Crystools/core/types.pyAdded+36
- custom_nodes/ComfyUI-Crystools/core/version.pyAdded+1
- custom_nodes/ComfyUI-Crystools/docs/crystools-save.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/debugger-show-any.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/debugger-show-json.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/debugger-show-metadata.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/image-load.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/image-preview-diff.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/image-preview-metadata.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/image-preview.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/image-resolution.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/image-save.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/jake.gifAdded
- custom_nodes/ComfyUI-Crystools/docs/list-any.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/list-string.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/menu.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/metadata-comparator-mark.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/metadata-comparator.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/metadata-extractor-photoshop.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/metadata-extractor.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/monitor-settings.pngAdded
- custom_nodes/ComfyUI-Crystools/docs/monitor.pngAdded
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911032 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/debugger-show-any.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/debugger-show-json.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/debugger-show-metadata.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/image-load.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/image-preview-diff.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/image-preview-metadata.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/image-preview.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/image-resolution.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/image-save.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/jake.gif filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/metadata-comparator-mark.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/metadata-comparator.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/metadata-extractor-photoshop.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/metadata-extractor.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/monitor1.webp filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/monitor3.webp filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/pipe-0.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/pipe-1.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/pipe-2.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/pipe-3.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/utils-json-comparator.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Crystools/docs/utils-stats.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/All_in_one_v1_3.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/anime0.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/anime1.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/bocchi0.jpg filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/bocchi1.jpg filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/real0.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/real1.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/rick/00003.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/rick/00004.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/rick/00005.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/violet0.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/demo_frames/violet1.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/example.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/interpolation_schedule.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Frame-Interpolation/test_vfi_schedule.gif filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-KJNodes/docs/images/2024-04-03_20_49_29-ComfyUI.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-KJNodes/fonts/FreeMono.ttf filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-KJNodes/fonts/FreeMonoBoldOblique.otf filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-KJNodes/fonts/TTNorms-Black.otf filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-KJNodes/nodes/__pycache__/image_nodes.cpython-312.pyc filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-KJNodes/nodes/__pycache__/nodes.cpython-312.pyc filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Lora-Manager/static/images/android-chrome-512x512.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Lora-Manager/static/images/screenshot.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Lora-Manager/static/images/tips/civitai-download.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Lora-Manager/static/images/tips/recipes.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Lora-Manager/static/images/tips/search.webp filter=lfs diff=lfs merge=lfs -textcustom_nodes/ComfyUI-Manager/glob/__pycache__/manager_core.cpython-312.pyc filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/NotoSans-Regular.ttf filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/CNAuxBanner.jpg filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/ExecuteAll.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/ExecuteAll1.jpg filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/ExecuteAll2.jpg filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/comfyui-controlnet-aux-logo.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_animal_pose.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_anime_face_segmentor.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_anyline.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_densepose.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_depth_anything.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_depth_anything_v2.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_dsine.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_marigold.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_marigold_flat.jpg filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_mesh_graphormer.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_metric3d.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_recolor.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_save_kps.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_teed.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_torchscript.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/examples/example_unimatch.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/src/custom_controlnet_aux/mesh_graphormer/hand_landmarker.task filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/src/custom_controlnet_aux/tests/test_image.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_controlnet_aux/tests/pose.png filter=lfs diff=lfs merge=lfs -textcustom_nodes/comfyui_ipadapter_plus/examples/demo_workflow.jpg filter=lfs diff=lfs merge=lfs -text
1234567891011121314151617181920# EditorConfig helps developers define and maintain consistent# coding styles between different editors and IDEs# editorconfig.org
root = true
[*]# Change these settings to your own preferenceindent_style = spaceindent_size = 2max_line_length = 120
end_of_line = lfcharset = utf-8trim_trailing_whitespace = trueinsert_final_newline = true
[*.md]max_line_length = offtrim_trailing_whitespace = false123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-type-checked', 'plugin:@typescript-eslint/stylistic-type-checked' ], parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint', 'import'], parserOptions: { // tsconfigRootDir: __dirname, sourceType: 'module', ecmaVersion: 'latest', ecmaFeatures: { // experimentalObjectRestSpread: true, modules: true, legacyDecorators: true }, project: ['./tsconfig.json'], }, rules: { // 'import/extensions': [ // 'error', // "ignorePackages", // { // "js": "always", // "ts": "never" // } // ], 'import/no-unresolved': ['off'], 'class-methods-use-this': ['off'], 'radix': ['off'], 'import/prefer-default-export': ['off'], 'implicit-arrow-linebreak': ['off'], 'no-trailing-spaces': [ 'error', { 'skipBlankLines': true, 'ignoreComments': true, }, ], 'max-len': [ 'error', { 'code': 120, }, ], 'prefer-rest-params': ['off'],
'import/no-extraneous-dependencies': [ 'error', { 'devDependencies': ['**/__tests__/*.ts', '**/__mocks__/*.ts'], }, ],
'one-var': ['off'],
// false positive https://github.com/typescript-eslint/typescript-eslint/issues/2483 'no-shadow': 'off', 'object-curly-newline': ["error", { "ObjectExpression": { "multiline": true, "minProperties": 8 }, "ObjectPattern": { "multiline": true, "minProperties": 8 }, "ImportDeclaration": {"multiline": true, "minProperties": 8 }, "ExportDeclaration": { "multiline": true, "minProperties": 8 } }], "@typescript-eslint/explicit-function-return-type": 'error', '@typescript-eslint/triple-slash-reference': 'off', '@typescript-eslint/no-shadow': 'error', '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/prefer-nullish-coalescing': 'off', '@typescript-eslint/consistent-type-definitions': 'off', '@typescript-eslint/no-unused-expressions': [ 'error', { 'allowShortCircuit': true, 'allowTernary': true, }, ], '@typescript-eslint/no-use-before-define': ['off'], '@typescript-eslint/no-unused-vars': [ 'error', {'argsIgnorePattern': '^_'}, ], '@typescript-eslint/explicit-module-boundary-types': [ 'off', { allowArgumentsExplicitlyTypedAsAny: true, }, ], '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/ban-ts-comment': [ 'off', {'ts-expect-error': 'allow-with-description'}, ], '@typescript-eslint/no-empty-function': [ 'error', { 'allow': [ 'methods', 'asyncMethods', ], }, ],
'lines-between-class-members': 'off', '@typescript-eslint/lines-between-class-members': 'off',
'curly': ['error', 'multi-line', 'consistent'], 'no-unused-vars': 'off', 'jest/no-test-prefixes': 'off', 'jest/no-focused-tests': 'off', 'comma-dangle': ['error', 'only-multiline'], 'linebreak-style': ['error', 'unix'], 'quotes': ['error', 'single'], 'semi': ['error', 'always'], 'eqeqeq': ['error', 'always'], 'complexity': [ 'error', { max: 8, }, ], 'block-scoped-var': 'error', 'no-else-return': [ 'error', { allowElseIf: true, }, ], 'no-debugger': 'off', 'no-eval': 'error', 'no-lone-blocks': 'error', 'no-multi-spaces': 'error', 'no-useless-return': 'error', 'no-var': 'error', 'no-console': [ // 'error', { // allow: ['warn', 'error'], // }, 'off', ], 'no-throw-literal': 'error', 'newline-per-chained-call': [ 'error', { ignoreChainWithDepth: 4, }, ], 'no-extra-boolean-cast': [ 'error', { enforceForLogicalOperands: true, }, ], 'no-fallthrough': 'error', 'no-use-before-define': 'off', 'no-case-declarations': 'off', }, ignorePatterns: [ 'node_modules', 'web/**/*.d.ts', 'web/**/*.js' ], globals: {},}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647---name: Bug reportabout: Create a report to help us improvetitle: ''labels: ''assignees: ''
---
**Describe the bug** A clear and concise description of what the bug is.
**To Reproduce** __Please attach a workflow file to make it easier for others to reproduce the error!__
**Expected behavior** A clear and concise description of what you expected to happen.
**Screenshots** If applicable, add screenshots to help explain your problem.
**Error in console:** If applicable, add the error message from the console.
**Versions:** Copy the output of the console (4 parts), like this:```** Python version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]``````Total VRAM 12287 MB, total RAM 130996 MBSet vram state to: NORMAL_VRAM``````[Crystools INFO] Crystools version: 1.9.2[Crystools INFO] CPU: AMD Ryzen 9 5950X 16-Core Processor - Arch: AMD64 - OS: Windows 10[Crystools INFO] GPU/s:[Crystools INFO] 0) NVIDIA GeForce RTX 3080 Ti[Crystools INFO] NVIDIA Driver: 546.33``````### Loading: ComfyUI-Manager (V1.25.3)### ComfyUI Revision: 1886 [6a10640f] | Released on '2024-01-08'```
**Additional context** Add any other context about the problem here.1234567891011121314151617181920---name: Feature requestabout: Suggest an idea for this projecttitle: ''labels: ''assignees: ''
---
**Is your feature request related to a problem? Please describe.**A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**A clear and concise description of what you want to happen.
**Describe alternatives you've considered**A clear and concise description of any alternative solutions or features you've considered.
**Additional context**Add any other context or screenshots about the feature request here.12345678910111213141516171819202122232425name: Publish to Comfy registryon: workflow_dispatch: push: branches: - main paths: - "pyproject.toml"
permissions: issues: write
jobs: publish-node: name: Publish Custom Node to registry runs-on: ubuntu-latest if: ${{ github.repository_owner == 'crystian' }} steps: - name: Check out code uses: actions/checkout@v4 - name: Publish Custom Node uses: Comfy-Org/publish-node-action@v1 with: ## Add your own personal access token to your Github Repository secrets and reference it here. personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156# Byte-compiled / optimized / DLL files__pycache__/*.py[cod]*$py.class
# C extensions*.so
# Distribution / packaging.Pythonbuild/develop-eggs/downloads/eggs/.eggs/lib/lib64/parts/sdist/var/wheels/share/python-wheels/*.egg-info/.installed.cfg*.eggMANIFEST
# PyInstaller# Usually these files are written by a python script from a template# before PyInstaller builds the exe, so as to inject date/other infos into it.*.manifest*.spec
# Installer logspip-log.txtpip-delete-this-directory.txt
# Unit test / coverage reportshtmlcov/.tox/.nox/.coverage.coverage.*.cachenosetests.xmlcoverage.xml*.cover*.py,cover.hypothesis/.pytest_cache/cover/
# Translations*.mo*.pot
# Django stuff:*.loglocal_settings.pydb.sqlite3db.sqlite3-journal
# Flask stuff:instance/.webassets-cache
# Scrapy stuff:.scrapy
# Sphinx documentationdocs/_build/
# PyBuilder.pybuilder/target/
# Jupyter Notebook.ipynb_checkpoints
# IPythonprofile_default/ipython_config.py
# pyenv# For a library or package, you might want to ignore these files since the code is# intended to run in multiple environments; otherwise, check them in:# .python-version
# pipenv# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.# However, in case of collaboration, if having platform-specific dependencies or dependencies# having no cross-platform support, pipenv may install dependencies that don't work, or not# install all needed dependencies.#Pipfile.lock
# poetry# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.# This is especially recommended for binary packages to ensure reproducibility, and is more# commonly ignored for libraries.# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control#poetry.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow__pypackages__/
# Celery stuffcelerybeat-schedulecelerybeat.pid
# SageMath parsed files*.sage.py
# Environments.env.venvenv/venv/ENV/env.bak/venv.bak/
# Spyder project settings.spyderproject.spyproject
# Rope project settings.ropeproject
# mkdocs documentation/site
# mypy.mypy_cache/.dmypy.jsondmypy.json
# Pyre type checker.pyre/
# pytype static type analyzer.pytype/
# Cython debug symbolscython_debug/
# PyCharm# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore# and can be added to the global gitignore or merged into this file. For a more nuclear# option (not recommended) you can uncomment the following to ignore the entire idea folder.#.idea/*.pyc
.idea/node_modules/node.zip12345678910111213141516171819202122232425<component name="ProjectRunConfigurationManager"> <configuration default="false" name="ComfyUI" type="PythonConfigurationType" factoryName="Python"> <module name="ComfyUI" /> <option name="ENV_FILES" value="" /> <option name="INTERPRETER_OPTIONS" value="" /> <option name="PARENT_ENVS" value="true" /> <envs> <env name="PYTHONUNBUFFERED" value="1" /> <env name="CRYSTOOLS_LOGLEVEL" value="10" /> </envs> <option name="SDK_HOME" value="" /> <option name="WORKING_DIRECTORY" value="X:\comfy\ComfyUI" /> <option name="IS_MODULE_SDK" value="true" /> <option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/main.py" /> <option name="PARAMETERS" value="--extra-model-paths-config ..\extra_model_paths.yaml --output-directory ..\..\comfyUI.output --input-directory ..\..\comfyUI.input --disable-auto-launch --preview-size 1024 --front-end-version aComfy-Org/ComfyUI_frontend@latest" /> <option name="SHOW_COMMAND_LINE" value="false" /> <option name="EMULATE_TERMINAL" value="false" /> <option name="MODULE_MODE" value="false" /> <option name="REDIRECT_INPUT" value="false" /> <option name="INPUT_FILE" value="" /> <method v="2" /> </configuration></component>123456789101112<component name="ProjectRunConfigurationManager"> <configuration default="false" name="lint" type="js.build_tools.npm"> <package-json value="$PROJECT_DIR$/custom_nodes/ComfyUI-Crystools/package.json" /> <command value="run" /> <scripts> <script value="lint" /> </scripts> <node-interpreter value="project" /> <envs /> <method v="2" /> </configuration></component>123456789101112131415161718192021222324252627282930313233#!/bin/bash# REMEMBER TO COPY THIS FILE INTO .git/hooks/pre-commit
cd ../comfy/ComfyUIrm ./custom_nodes/ComfyUI-Crystools/web/*.js -f
LOCAL_COMMAND="npm --prefix ./custom_nodes/ComfyUI-Crystools run validate"OUTPUT=$($LOCAL_COMMAND 2>&1)EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]; then echo "Validate ok" cd ../../ComfyUI-Crystoolselse echo "Validate KO!" echo $OUTPUT exit 1fi
LOCAL_COMMAND="python .others/version.py"
OUTPUT=$($LOCAL_COMMAND 2>&1)EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]; then echo "Version changed"else echo "Can't change the version! check the .other/version.py" echo $OUTPUT exit 1fi
git add version pyproject.toml __init__.py core/version.py web/*.js123456789101112<component name="ProjectRunConfigurationManager"> <configuration default="false" name="typescript" type="js.build_tools.npm"> <package-json value="$PROJECT_DIR$/package.json" /> <command value="run" /> <scripts> <script value="start" /> </scripts> <node-interpreter value="W:/!Workstation/nodejs/node" /> <envs /> <method v="2" /> </configuration></component>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960import os
print("-- Setting up the version --")
versionLabel = "@version:"version_file = os.path.join(os.path.dirname(__file__), "../version")
with open(version_file, "r") as f: version = f.read().strip()
if version is None or version == "": raise RuntimeError(f"File without version: {version_file}")
print(f"Version to set: {version}")
# modify the __init__.py file with @versionfile1 = os.path.join(os.path.dirname(__file__), "../__init__.py")print(f"> File1: {file1}")
file1VersionFound = False# lines = Nonewith open(file1, "r") as f: lines = f.readlines() for line in lines: if versionLabel in line: file1VersionFound = True lines[lines.index(line)] = f"{versionLabel} {version}\n"
if not file1VersionFound: raise RuntimeError(f"Version label not found in file: {file1}")
with open(file1, "w") as f2: f2.writelines(lines)
file2 = os.path.join(os.path.dirname(__file__), "../core/version.py")print(f"> File2 {file2}")
with open(file2, "w") as f2: f2.writelines([f"version = \"{version}\"\n"])
# modify pyproject.toml file with @versionfile3 = os.path.join(os.path.dirname(__file__), "../pyproject.toml")print(f"> File3: {file3}")
file3VersionFound = False# lines = Nonewith open(file3, "r") as f: lines = f.readlines() for line in lines:
if "version = " in line: file3VersionFound = True lines[lines.index(line)] = f"version = \"{version}\"\n"
if not file3VersionFound: raise RuntimeError(f"Version label not found in file: {file3}")
with open(file3, "w") as f3: f3.writelines(lines)123456789101112131415161718192021MIT License
Copyright (c) 2023 Crystian
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649# ComfyUI-Crystools [](https://hits.seeyoufarm.com) [](https://paypal.me/crystian77) <a src="https://colab.research.google.com/assets/colab-badge.svg" href="https://colab.research.google.com/drive/1xiTiPmZkcIqNOsLQPO1UNCdJZqgK3U5k?usp=sharing"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab"></a>
**_🪛 A powerful set of tools for your belt when you work with ComfyUI 🪛_**
With this suit, you can see the resources monitor, progress bar & time elapsed, metadata and compare between two images, compare between two JSONs, show any value to console/display, pipes, and more!This provides better nodes to load/save images, previews, etc, and see "hidden" data without loading a new workflow.

# Table of contents- [General](#general)- [Metadata](#metadata)- [Debugger](#debugger)- [Image](#image)- [Pipe](#pipe)- [Utils](#utils)- [Primitives](#primitives)- [List](#list)- [Switch](#switch)- Others: [About](#about), [To do](#to-do), [Changelog](#changelog), [Installation](#installation), [Use](#use)
---
## General
### Resources monitor
**🎉Finally, you can see the resources used by ComfyUI (CPU, GPU, RAM, VRAM, GPU Temp and space) on the menu in real-time!**
Horizontal: 
Vertical: 
Now you can identify the bottlenecks in your workflow and know when it's time to restart the server, unload models or even close some tabs!
You can configure the refresh rate which resources to show:

> **Notes:**> - The GPU data is only available when you use CUDA (only NVIDIA cards, sorry AMD users).> - This extension needs ComfyUI 1915 (or higher).> - The cost of the monitor is low (0.1 to 0.5% of utilization), you can disable it from settings (`Refres rate` to `0`).> - Data comes from these libraries:> - [psutil](https://pypi.org/project/psutil/)> - [torch](https://pytorch.org/)> - [pynvml](https://pypi.org/project/pynvml/) (official NVIDIA library)
### Progress bar
You can see the progress of your workflow with a progress bar on the menu!

https://github.com/crystian/ComfyUI-Crystools/assets/3886806/35cc1257-2199-4b85-936e-2e31d892959c
Additionally, it shows the time elapsed at the end of the workflow, and you can `click` on it to see the **current working node.**
> **Notes:**> - If you don't want to see it, you can turn it off from settings (`Show progress bar in menu`)
## Metadata
### Node: Metadata extractor
This node is used to extract the metadata from the image and handle it as a JSON source for other nodes. You can see **all information**, even metadata from other sources (like Photoshop, see sample).
The input comes from the [load image with metadata](#node-load-image-with-metadata) or [preview from image](#node-preview-from-image) nodes (and others in the future).

**Sample:** [metadata-extractor.json](./samples/metadata-extractor.json)
><details>> <summary>Other metadata sample (photoshop)</summary>> > With metadata from Photoshop></details>
><details>> <summary><i>Parameters</i></summary>>> - input: > - metadata_raw: The metadata raw from the image or preview node> - Output:> - prompt: The prompt used to produce the image.> - workflow: The workflow used to produce the image (all information about nodes, values, etc).> - file info: The file info of the image/metadata (resolution, size, etc) is human readable.> - raw to JSON: The entire metadata is raw but formatted/readable.> - raw to property: The entire metadata is raw in "properties" format.> - raw to csv: The entire metadata is raw in "csv" format.></details>
<br />
### Node: Metadata comparator
This node is so useful for comparing two metadata and seeing the differences (**the main reason why I created this extension!**)
You can compare 3 inputs: "Prompt", "Workflow" and "Fileinfo"
There are three potential "outputs": `values_changed`, `dictionary_item_added`, and `dictionary_item_removed` (in this order of priority).

**Sample:** [metadata-comparator.json](./samples/metadata-comparator.json)
**Notes:** - I use [DeepDiff](https://pypi.org/project/deepdiff) for that. For more info check the link. - If you want to compare two JSONs, you can use the [JSON comparator](#node-JSON-comparator) node.
><details>> <summary><i>Parameters</i></summary>>> - options:> - what: What to compare, you can choose between "Prompt", "Workflow" and "Fileinfo" > - input: > - metadata_raw_old: The metadata raw to start comparing> - metadata_raw_new: The metadata raw to compare> - Output:> - diff: This is the same output you can see in the display of the node; you can use it on other nodes.></details>
<br />
---
## Debugger
### Node: Show Metadata
With this node, you will be able to see the JSON produced from your entire prompt and workflow so that you can know all the values (and more) of your prompt quickly without opening the file (PNG or JSON).

**Sample:** [debugger-metadata.json](./samples/debugger-metadata.json)
><details>> <summary><i>Parameters</i></summary>>> - Options:> - Active: Enable/disable the node > - Parsed: Show the parsed JSON or plain text > - What: Show the prompt or workflow (prompt are values to produce the image, and workflow is the entire workflow of ComfyUI)></details>
<br />
### Node: Show any
You can see on the console or display any text or data from the nodes. Connect it to what you want to inspect, and you will see it.

**Sample:** [debugger-any.json](./samples/debugger-any.json)
><details>> <summary><i>Parameters</i></summary>>> - Input:> - any_value: Any value to show, which can be a string, number, etc.> - Options:> - Console: Enable/disable write to console > - Display: Enable/disable write on this node > - Prefix: Prefix to console></details>
<br />
### Node: Show any to JSON
It is the same as the previous one, but it formatted the value to JSON (only display).

**Sample:** [debugger-json.json](./samples/debugger-json.json)
><details>> <summary><i>Parameters</i></summary>>> - Input:> - any_value: Any value to try to convert to JSON> - Output:> - string: The same string is shown on the display></details>
<br />
---
## Image
### Node: Load image with metadataThis node is the same as the default one, but it adds three features: Prompt, Metadata, and supports **subfolders** of the "input" folder.

**Sample:** [image-load.json](./samples/image-load.json)
><details>> <summary><i>Parameters</i></summary>>> - Input:> - image: Read the images from the input folder (and subfolder) (you can drop the image here or even paste an image from the clipboard)> - Output:> - Image/Mask: The same as the default node > - Prompt: The prompt used to produce the image (not the workflow) > - Metadata RAW: The metadata raw of the image (full workflow) as string></details>
**Note:** The subfolders support inspired on: [comfyui-imagesubfolders](https://github.com/catscandrive/comfyui-imagesubfolders)
<br />
### Node: Save image with extra metadataThis node is the same as the default one, but it adds two features: Save the workflow in the png or not, and you can add any piece of metadata (as JSON).
This saves custom data on the image, so you can share it with others, and they can see the workflow and metadata (see [preview from metadata](#node-preview-from-metadata)), even your custom data.
It can be any type of information that supports text and JSON.

**Sample:** [image-save.json](./samples/image-save.json)
><details>> <summary><i>Parameters</i></summary>>> - options:> - with_workflow: If you want to save into the image workflow (special to share the workflow with others)> - Input:> - image: The image to save (same as the default node)> - Output:> - Metadata RAW: The metadata raw of the image (full workflow) as string></details>
**Note:** The data is saved as special "exif" (as ComfyUI does) in the png file; you can read it with [Load image with metadata](#node-load-image-with-metadata).
> **Important:**> - If you want to save your workflow with a particular name and your data as creator, you need to use the [ComfyUI-Crystools-save](https://github.com/crystian/ComfyUI-Crystools-save) extension; try it!
<br />
### Node: Preview from image
This node is used to preview the image with the **current prompt** and additional features.

**Feature:** It supports cache (shows as "CACHED") (not permanent yet!), so you can disconnect the node and still see the image and data, so you can use it to compare with others!

As you can see the seed, steps, and cfg were changed
**Sample:** [image-preview-image.json](./samples/image-preview-image.json)
><details>> <summary><i>Parameters</i></summary>>> - Input:> - image: Any kind of image link> - Output:> - Metadata RAW: The metadata raw of the image and full workflow. > - You can use it to **compare with others** (see [metadata comparator](#node-metadata-comparator))> - The file info like filename, resolution, datetime and size with **the current prompt, not the original one!** (see important note)></details>
> **Important:**> - If you want to read the metadata of the image, you need to use the [load image with metadata](#node-load-image-with-metadata) and use the output "metadata RAW" not the image link.> - To do a preview, it is necessary to save it first on the temporal folder, and the data shown is from the temporal image, **not the original one** even **the prompt!**
<br />
### Node: Preview from metadata
This node is used to preview the image from the metadata and shows additional data (all around this one). It supports the same features as [preview from image](#node-preview-from-image) (cache, metadata raw, etc.). But the important difference is you see **real data from the image** (not the temporal one or the current prompt). 
**Sample:** [image-preview-metadata.json](./samples/image-preview-metadata.json)
<br />
### Node: Show resolution
This node is used to show the resolution of an image.
> Can be used with any image link.

**Sample:** [image-resolution.json](./samples/image-resolution.json)
><details>> <summary><i>Parameters</i></summary>>> - Input:> - image: Any kind of image link> - Output:> - Width: The width of the image > - Height: The height of the image></details>
<br />
---
## Pipe
### Nodes: Pipe to/edit any, Pipe from any
This powerful set of nodes is used to better organize your pipes.
The "Pipe to/edit any" node is used to encapsulate multiple links into a single one. It includes support for editing and easily adding the modified content back to the same pipe number.
The "Pipe from any" node is used to extract the content of a pipe. Typical example:

With pipes:

**Sample:** [pipe-1.json](./samples/pipe-1.json)
Editing pipes:

**Sample:** [pipe-2.json](./samples/pipe-2.json)
><details>> <summary><i>Parameters</i></summary>>> - Input:> - CPipeAny: This is the type of this pipe you can use to edit (see the sample)> - any_*: 6 possible inputs to use> - Output:> - CPipeAny: You can continue the pipe with this output; you can use it to bifurcate the pipe (see the sample)></details>
>**Important:**> - Please note that it supports "any," meaning it does not validate (not yet!) the correspondence of input nodes with the output ones. When creating the link, it is recommended to link consciously number by number.> - "RecursionError" It's crucial to note that the flow of links **must be in the same direction**, and they cannot be mixed with other flows that use the result of this one. Otherwise, this may lead to recursion and block the server (you need to restart it!)
><details>> <summary><i>Bad example with "RecursionError: maximum recursion depth exceeded"</i></summary>>> If you see something like this on your console, you need to check your pipes. That is bad sample of pipes, you can't mix the flows.></details>
<br />
---
## Utils
Some useful nodes to use in your workflow.
### Node: JSON comparator
This node is so useful to compare two JSONs and see the differences.

**Sample:** [utils-json-comparator.json](./samples/utils-json-comparator.json)
><details>> <summary><i>Parameters</i></summary>>> - input: > - json_old: The first JSON to start compare> - json_new: The JSON to compare> - Output:> - diff: A new JSON with the differences></details>
**Notes:** As you can see, it is the same as the [metadata comparator](#node-metadata-comparator) but with JSONs. The other is intentionally simple to compare two images metadata; this is more generic. The main difference is that you can compare any JSON, not only metadata.
<br />
### Node: Stats system
This node is used to show the system stats (RAM, VRAM, and Space). It **should** connect as a pipe.

**Sample:** [utils-stats.json](./samples/utils-stats.json)
><details>> <summary><i>Parameters</i></summary>>> - input: > - latent: The latent to use to measure the stats> - Output:> - latent: Return the same latent to continue the pipe></details>
**Notes:** The original is in [WAS](https://github.com/WASasquatch/was-node-suite-comfyui), I only show it on the display.
<br />
---
## Primitives
### Nodes: Primitive boolean, Primitive integer, Primitive float, Primitive string, Primitive string multiline
A set of nodes with primitive values to use in your prompts.

<br />
---
## ListA set of nodes with a list of values (any or strings/texts) for any proposal (news nodes to use it coming soon!).
> **Important:** You can use other nodes like "Show any" to see the values of the list
### Node: List of strings
**Feature:** You can concatenate them.

**Sample:** [list-strings.json](./samples/list-strings.json)
><details>> <summary><i>Parameters</i></summary>>> - Input:> - string_*: 8 possible inputs to use> - delimiter: Use to concatenate the values on the output> - Output:> - concatenated: A string with all values concatenated> - list_string: The list of strings (only with values)></details>
<br />
### Node: List of any
You can concatenate any value (it will try to convert it to a string and show the value), so it is util to see several values at the same time.

**Sample:** [list-any.json](./samples/list-any.json)
><details>> <summary><i>Parameters</i></summary>>> - Input:> - any_*: 8 possible inputs to use> - Output:> - list_any: The list of any elements (only with values)></details>
<br />
---
## SwitchA set of nodes to switch between flows.
All switches are boolean; you can switch between flows by simply changing the value of the switch. You have predefined switches (string, latent, image, conditioning) but you can use "Switch any" for any value/type.

**Sample:** [switch.json](./samples/switch.json)
<br />
---
## About
**Notes from the author:**- This is my first project in python ¯\\_(ツ)_/¯ (PR are welcome!)- I'm a software engineer but in other languages (web technologies)- My Instagram is: https://www.instagram.com/crystian.ia I'll publish my works on it, so consider following me for news! :)- I'm not a native English speaker, so sorry for my English :P
---
## To do- [ ] Several unit tests- [ ] Add permanent cache for preview/metadata image (to survive to F5! or restart the server)
---
## Changelog
### Crystools
### 1.20.0 (21/10/2024)- BETA of JSON file reader and extractor, to allow you to read your own JSON files and extract the values to use in your workflow
### 1.19.0 (06/10/2024)- HORIZONTAL UI! New version is ready! 🎉
### 1.18.0 (21/09/2024)- HORIZONTAL UI! 🎉- Configurable size of monitors on settings menu
### 1.17.0 (21/09/2024)- Settings menu reorganized- Preparing for horizontal UI- Update from ComfyUI (typescript and new features)
### 1.16.0 (31/07/2024)- Rollback of AMD support by manager does not support other repository parameter (https://test.pypi.org/simple by pyrsmi)
### 1.15.0 (21/07/2024)- AMD Branch merged to the main branch, should work for AMD users on **Linux**
### 1.14.0 (15/07/2024)- Tried to use AMD info, but it breaks installation on windows, so I removed it ¯\_(ツ)_/¯- AMD Branch added, if you use AMD and Linux, you can try it (not tested for me)
### 1.13.0 (01/07/2024)- Integrate with new ecosystem of ComfyUI- Webp support added on load image with metadata node
### 1.12.0 (27/03/2024)- GPU Temperature added
### 1.10.0 (17/01/2024)- Multi-gpu added
### 1.9.2 (15/01/2024)- Big refactor on hardwareInfo and monitor.ts, gpu was separated on another file, preparing for multi-gpu support
### 1.8.0 (14/01/2024) - internal- HDD monitor selector on settings
### 1.7.0 (11/01/2024) - internal- Typescript added!
### 1.6.0 (11/01/2024)- Fix issue [#7](https://github.com/crystian/ComfyUI-Crystools/issues/7) to the thread deadlock on concurrency
### 1.5.0 (10/01/2024)- Improvements on the resources monitor and how handle the threads- Some fixes
### 1.3.0 (08/01/2024)- Added in general Resources monitor (CPU, GPU, RAM, VRAM, and space)- Added this icon to identify this set of tools: 🪛
### 1.2.0 (05/01/2024)- progress bar added ### 1.1.0 (29/12/2023)- Node added: "Save image with extra metadata"- Support to **read** Jpeg metadata added (not save)
### 1.0.0 (26/12/2023)- First release
### Crystools-save
### 1.1.0 (07/01/2024)- Labeling updated according to the new version of Crystools (this project)
### 1.0.0 (29/12/2023)- Created another extension to save the info about the author on workflow: [ComfyUI-Crystools-save](https://github.com/crystian/ComfyUI-Crystools-save)
---
## Installation
### Install from GitHub1. Install [ComfyUi](https://github.com/comfyanonymous/ComfyUI).2. Clone this repo into `custom_modules`: ``` cd ComfyUI/custom_nodes git clone https://github.com/crystian/ComfyUI-Crystools.git cd ComfyUI-Crystools pip install -r requirements.txt ```3. Start up ComfyUI.
#### For AMD usersIf you are an AMD user with Linux, you can try the AMD branch:
**ATTENTION:** Don't install with the manager, you need to install manually:
``` cd ComfyUI/custom_nodes git clone -b AMD https://github.com/crystian/ComfyUI-Crystools.git cd ComfyUI-Crystools pip install -r requirements.txt ```
### Install from manager
Search for `crystools` in the [manager](https://github.com/ltdrdata/ComfyUI-Manager.git) and install it.
### Using on Google Colab
You can use it on Google Colab, but you need to install it manually:
[Google Colab](https://colab.research.google.com/drive/1xiTiPmZkcIqNOsLQPO1UNCdJZqgK3U5k?usp=sharing)
* Run the first cell to install ComfyUI and launch the server* After it finishes, use the link to open the a new tab, looking a line like this:```This is the URL to access ComfyUI: https://identifying-complications-fw-some.trycloudflare.com ```
---
## Use
You can use it as any other node, just using the menu in the category `crystools` or double clicking on the canvas (I recommended using the "oo" to fast filter), all nodes were post fixing with `[Crystools]`.

If for some reason you need to see the logs, you can define the environment variable `CRYSTOOLS_LOGLEVEL` and set the [value](https://docs.python.org/es/3/howto/logging.html).
---
Made with ❤️ by Crystian.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106"""
@author: Crystian
@title: Crystools
@nickname: Crystools
@version: 1.22.1
@project: "https://github.com/crystian/ComfyUI-Crystools",
@description: Plugins for multiples uses, mainly for debugging, you need them! IG: https://www.instagram.com/crystian.ia
"""
from .core import version, logger
logger.info(f'Crystools version: {version}')
from .nodes._names import CLASSES
from .nodes.primitive import CBoolean, CText, CTextML, CInteger, CFloat
from .nodes.switch import CSwitchBooleanAny, CSwitchBooleanLatent, CSwitchBooleanConditioning, CSwitchBooleanImage, \
CSwitchBooleanString, CSwitchBooleanMask
from .nodes.debugger import CConsoleAny, CConsoleAnyToJson
from .nodes.image import CImagePreviewFromImage, CImageLoadWithMetadata, CImageGetResolution, CImagePreviewFromMetadata, \
CImageSaveWithExtraMetadata
from .nodes.list import CListAny, CListString
from .nodes.pipe import CPipeToAny, CPipeFromAny
from .nodes.utils import CUtilsCompareJsons, CUtilsStatSystem
from .nodes.metadata import CMetadataExtractor, CMetadataCompare
from .nodes.parameters import CJsonFile, CJsonExtractor
from .server import *
from .general import *
NODE_CLASS_MAPPINGS = {
CLASSES.CBOOLEAN_NAME.value: CBoolean,
CLASSES.CTEXT_NAME.value: CText,
CLASSES.CTEXTML_NAME.value: CTextML,
CLASSES.CINTEGER_NAME.value: CInteger,
CLASSES.CFLOAT_NAME.value: CFloat,
CLASSES.CDEBUGGER_CONSOLE_ANY_NAME.value: CConsoleAny,
CLASSES.CDEBUGGER_CONSOLE_ANY_TO_JSON_NAME.value: CConsoleAnyToJson,
CLASSES.CLIST_ANY_NAME.value: CListAny,
CLASSES.CLIST_STRING_NAME.value: CListString,
CLASSES.CSWITCH_ANY_NAME.value: CSwitchBooleanAny,
CLASSES.CSWITCH_LATENT_NAME.value: CSwitchBooleanLatent,
CLASSES.CSWITCH_CONDITIONING_NAME.value: CSwitchBooleanConditioning,
CLASSES.CSWITCH_IMAGE_NAME.value: CSwitchBooleanImage,
CLASSES.CSWITCH_MASK_NAME.value: CSwitchBooleanMask,
CLASSES.CSWITCH_STRING_NAME.value: CSwitchBooleanString,
CLASSES.CPIPE_TO_ANY_NAME.value: CPipeToAny,
CLASSES.CPIPE_FROM_ANY_NAME.value: CPipeFromAny,
CLASSES.CIMAGE_LOAD_METADATA_NAME.value: CImageLoadWithMetadata,
CLASSES.CIMAGE_GET_RESOLUTION_NAME.value: CImageGetResolution,
CLASSES.CIMAGE_PREVIEW_IMAGE_NAME.value: CImagePreviewFromImage,
CLASSES.CIMAGE_PREVIEW_METADATA_NAME.value: CImagePreviewFromMetadata,
CLASSES.CIMAGE_SAVE_METADATA_NAME.value: CImageSaveWithExtraMetadata,
CLASSES.CMETADATA_EXTRACTOR_NAME.value: CMetadataExtractor,
CLASSES.CMETADATA_COMPARATOR_NAME.value: CMetadataCompare,
CLASSES.CUTILS_JSON_COMPARATOR_NAME.value: CUtilsCompareJsons,
CLASSES.CUTILS_STAT_SYSTEM_NAME.value: CUtilsStatSystem,
CLASSES.CJSONFILE_NAME.value: CJsonFile,
CLASSES.CJSONEXTRACTOR_NAME.value: CJsonExtractor,
}
NODE_DISPLAY_NAME_MAPPINGS = {
CLASSES.CBOOLEAN_NAME.value: CLASSES.CBOOLEAN_DESC.value,
CLASSES.CTEXT_NAME.value: CLASSES.CTEXT_DESC.value,
CLASSES.CTEXTML_NAME.value: CLASSES.CTEXTML_DESC.value,
CLASSES.CINTEGER_NAME.value: CLASSES.CINTEGER_DESC.value,
CLASSES.CFLOAT_NAME.value: CLASSES.CFLOAT_DESC.value,
CLASSES.CDEBUGGER_CONSOLE_ANY_NAME.value: CLASSES.CDEBUGGER_ANY_DESC.value,
CLASSES.CDEBUGGER_CONSOLE_ANY_TO_JSON_NAME.value: CLASSES.CDEBUGGER_CONSOLE_ANY_TO_JSON_DESC.value,
CLASSES.CLIST_ANY_NAME.value: CLASSES.CLIST_ANY_DESC.value,
CLASSES.CLIST_STRING_NAME.value: CLASSES.CLIST_STRING_DESC.value,
CLASSES.CSWITCH_ANY_NAME.value: CLASSES.CSWITCH_ANY_DESC.value,
CLASSES.CSWITCH_LATENT_NAME.value: CLASSES.CSWITCH_LATENT_DESC.value,
CLASSES.CSWITCH_CONDITIONING_NAME.value: CLASSES.CSWITCH_CONDITIONING_DESC.value,
CLASSES.CSWITCH_IMAGE_NAME.value: CLASSES.CSWITCH_IMAGE_DESC.value,
CLASSES.CSWITCH_MASK_NAME.value: CLASSES.CSWITCH_MASK_DESC.value,
CLASSES.CSWITCH_STRING_NAME.value: CLASSES.CSWITCH_STRING_DESC.value,
CLASSES.CPIPE_TO_ANY_NAME.value: CLASSES.CPIPE_TO_ANY_DESC.value,
CLASSES.CPIPE_FROM_ANY_NAME.value: CLASSES.CPIPE_FROM_ANY_DESC.value,
CLASSES.CIMAGE_LOAD_METADATA_NAME.value: CLASSES.CIMAGE_LOAD_METADATA_DESC.value,
CLASSES.CIMAGE_GET_RESOLUTION_NAME.value: CLASSES.CIMAGE_GET_RESOLUTION_DESC.value,
CLASSES.CIMAGE_PREVIEW_IMAGE_NAME.value: CLASSES.CIMAGE_PREVIEW_IMAGE_DESC.value,
CLASSES.CIMAGE_PREVIEW_METADATA_NAME.value: CLASSES.CIMAGE_PREVIEW_METADATA_DESC.value,
CLASSES.CIMAGE_SAVE_METADATA_NAME.value: CLASSES.CIMAGE_SAVE_METADATA_DESC.value,
CLASSES.CMETADATA_EXTRACTOR_NAME.value: CLASSES.CMETADATA_EXTRACTOR_DESC.value,
CLASSES.CMETADATA_COMPARATOR_NAME.value: CLASSES.CMETADATA_COMPARATOR_DESC.value,
CLASSES.CUTILS_JSON_COMPARATOR_NAME.value: CLASSES.CUTILS_JSON_COMPARATOR_DESC.value,
CLASSES.CUTILS_STAT_SYSTEM_NAME.value: CLASSES.CUTILS_STAT_SYSTEM_DESC.value,
CLASSES.CJSONFILE_NAME.value: CLASSES.CJSONFILE_DESC.value,
CLASSES.CJSONEXTRACTOR_NAME.value: CLASSES.CJSONEXTRACTOR_DESC.value,
}
WEB_DIRECTORY = "./web"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]123456from .logger import *
from .keys import *
from .types import *
from .config import *
from .common import *
from .version import *123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119import os
import json
import torch
from deepdiff import DeepDiff
from ..core import CONFIG, logger
# just a helper function to set the widget values (or clear them)
def setWidgetValues(value=None, unique_id=None, extra_pnginfo=None) -> None:
if unique_id and extra_pnginfo:
workflow = extra_pnginfo["workflow"]
node = next((x for x in workflow["nodes"] if str(x["id"]) == unique_id), None)
if node:
node["widgets_values"] = value
return None
# find difference between two jsons
def findJsonStrDiff(json1, json2):
msgError = "Could not compare jsons"
returnJson = {"error": msgError}
try:
# TODO review this
# dict1 = json.loads(json1)
# dict2 = json.loads(json2)
returnJson = findJsonsDiff(json1, json2)
returnJson = json.dumps(returnJson, indent=CONFIG["indent"])
except Exception as e:
logger.warn(f"{msgError}: {e}")
return returnJson
def findJsonsDiff(json1, json2):
msgError = "Could not compare jsons"
returnJson = {"error": msgError}
try:
diff = DeepDiff(json1, json2, ignore_order=True, verbose_level=2)
returnJson = {k: v for k, v in diff.items() if
k in ('dictionary_item_added', 'dictionary_item_removed', 'values_changed')}
# just for print "values_changed" at first
returnJson = dict(reversed(returnJson.items()))
except Exception as e:
logger.warn(f"{msgError}: {e}")
return returnJson
# powered by:
# https://github.com/WASasquatch/was-node-suite-comfyui/blob/main/WAS_Node_Suite.py
# class: WAS_Samples_Passthrough_Stat_System
def get_system_stats():
import psutil
# RAM
ram = psutil.virtual_memory()
ram_used = ram.used / (1024 ** 3)
ram_total = ram.total / (1024 ** 3)
ram_stats = f"Used RAM: {ram_used:.2f} GB / Total RAM: {ram_total:.2f} GB"
# VRAM (with PyTorch)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
vram_used = torch.cuda.memory_allocated(device) / (1024 ** 3)
vram_total = torch.cuda.get_device_properties(device).total_memory / (1024 ** 3)
vram_stats = f"Used VRAM: {vram_used:.2f} GB / Total VRAM: {vram_total:.2f} GB"
# Hard Drive Space
hard_drive = psutil.disk_usage("/")
used_space = hard_drive.used / (1024 ** 3)
total_space = hard_drive.total / (1024 ** 3)
hard_drive_stats = f"Used Space: {used_space:.2f} GB / Total Space: {total_space:.2f} GB"
return [ram_stats, vram_stats, hard_drive_stats]
# return x and y resolution of an image (torch tensor)
def getResolutionByTensor(image=None) -> dict:
res = {"x": 0, "y": 0}
if image is not None:
img = image.movedim(-1, 1)
res["x"] = img.shape[3]
res["y"] = img.shape[2]
return res
# by https://stackoverflow.com/questions/6080477/how-to-get-the-size-of-tar-gz-in-mb-file-in-python
def get_size(path):
size = os.path.getsize(path)
if size < 1024:
return f"{size} bytes"
elif size < pow(1024, 2):
return f"{round(size / 1024, 2)} KB"
elif size < pow(1024, 3):
return f"{round(size / (pow(1024, 2)), 2)} MB"
elif size < pow(1024, 4):
return f"{round(size / (pow(1024, 3)), 2)} GB"
def get_nested_value(data, dotted_key, default=None):
keys = dotted_key.split('.')
for key in keys:
if isinstance(data, str):
data = json.loads(data)
if isinstance(data, dict) and key in data:
data = data[key]
else:
return default
return data1234567import os
import logging
CONFIG = {
"loglevel": int(os.environ.get("CRYSTOOLS_LOGLEVEL", logging.INFO)),
"indent": int(os.environ.get("CRYSTOOLS_INDENT", 2))
}1234567891011121314151617181920212223242526272829from enum import Enum
class TEXTS(Enum):
CUSTOM_NODE_NAME = "Crystools"
LOGGER_PREFIX = "Crystools"
CONCAT = "concatenated"
INACTIVE_MSG = "inactive"
INVALID_METADATA_MSG = "Invalid metadata raw"
FILE_NOT_FOUND = "File not found!"
class CATEGORY(Enum):
TESTING = "_for_testing"
MAIN = "crystools 🪛"
PRIMITIVE = "/Primitive"
DEBUGGER = "/Debugger"
LIST = "/List"
SWITCH = "/Switch"
PIPE = "/Pipe"
IMAGE = "/Image"
UTILS = "/Utils"
METADATA = "/Metadata"
# remember, all keys should be in lowercase!
class KEYS(Enum):
LIST = "list_string"
PREFIX = "prefix"123456789101112131415161718192021222324252627282930313233343536373839# by https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet/blob/main/control/logger.pyimport sysimport copyimport loggingfrom .keys import TEXTSfrom .config import CONFIG
class ColoredFormatter(logging.Formatter): COLORS = { "DEBUG": "\033[0;36m", # CYAN "INFO": "\033[0;32m", # GREEN "WARNING": "\033[0;33m", # YELLOW "ERROR": "\033[0;31m", # RED "CRITICAL": "\033[0;37;41m", # WHITE ON RED "RESET": "\033[0m", # RESET COLOR }
def format(self, record): colored_record = copy.copy(record) levelname = colored_record.levelname seq = self.COLORS.get(levelname, self.COLORS["RESET"]) colored_record.levelname = f"{seq}{levelname}{self.COLORS['RESET']}" return super().format(colored_record)
# Create a new loggerlogger = logging.getLogger(TEXTS.LOGGER_PREFIX.value)logger.propagate = False
# Add handler if we don't have one.if not logger.handlers: handler = logging.StreamHandler(sys.stdout) handler.setFormatter(ColoredFormatter("[%(name)s %(levelname)s] %(message)s")) logger.addHandler(handler)
# Configure loggerloglevel = CONFIG["loglevel"]logger.setLevel(loglevel)123456789101112131415161718192021222324252627282930313233343536import sys
FLOAT = ("FLOAT", {"default": 1,
"min": -sys.float_info.max,
"max": sys.float_info.max,
"step": 0.01})
BOOLEAN = ("BOOLEAN", {"default": True})
BOOLEAN_FALSE = ("BOOLEAN", {"default": False})
INT = ("INT", {"default": 1,
"min": -sys.maxsize,
"max": sys.maxsize,
"step": 1})
STRING = ("STRING", {"default": ""})
STRING_ML = ("STRING", {"multiline": True, "default": ""})
STRING_WIDGET = ("STRING", {"forceInput": True})
JSON_WIDGET = ("JSON", {"forceInput": True})
METADATA_RAW = ("METADATA_RAW", {"forceInput": True})
class AnyType(str):
"""A special class that is always equal in not equal comparisons. Credit to pythongosssss"""
def __eq__(self, _) -> bool:
return True
def __ne__(self, __value: object) -> bool:
return False
any = AnyType("*")1version = "1.22.1".gitattributes+75
custom_nodes/ComfyUI-Crystools/.editorconfigAdded+20
custom_nodes/ComfyUI-Crystools/.eslintrc.cjsAdded+164
custom_nodes/ComfyUI-Crystools/.github/ISSUE_TEMPLATE/bug_report.mdAdded+47
custom_nodes/ComfyUI-Crystools/.github/ISSUE_TEMPLATE/feature_request.mdAdded+20
custom_nodes/ComfyUI-Crystools/.github/workflows/publish.ymlAdded+25
custom_nodes/ComfyUI-Crystools/.gitignoreAdded+156
custom_nodes/ComfyUI-Crystools/.others/ComfyUI.run.xmlAdded+25
custom_nodes/ComfyUI-Crystools/.others/lint.run.xmlAdded+12
custom_nodes/ComfyUI-Crystools/.others/pre-commitAdded+33
custom_nodes/ComfyUI-Crystools/.others/typescript.run.xmlAdded+12
custom_nodes/ComfyUI-Crystools/.others/version.pyAdded+60
custom_nodes/ComfyUI-Crystools/LICENSEAdded+21
custom_nodes/ComfyUI-Crystools/README.mdAdded+649
custom_nodes/ComfyUI-Crystools/__init__.pyAdded+106
custom_nodes/ComfyUI-Crystools/__pycache__/__init__.cpython-312.pycAdded
custom_nodes/ComfyUI-Crystools/core/__init__.pyAdded+6
custom_nodes/ComfyUI-Crystools/core/__pycache__/__init__.cpython-312.pycAdded
custom_nodes/ComfyUI-Crystools/core/__pycache__/common.cpython-312.pycAdded
custom_nodes/ComfyUI-Crystools/core/__pycache__/config.cpython-312.pycAdded
custom_nodes/ComfyUI-Crystools/core/__pycache__/keys.cpython-312.pycAdded
custom_nodes/ComfyUI-Crystools/core/__pycache__/logger.cpython-312.pycAdded
custom_nodes/ComfyUI-Crystools/core/__pycache__/types.cpython-312.pycAdded
custom_nodes/ComfyUI-Crystools/core/__pycache__/version.cpython-312.pycAdded
custom_nodes/ComfyUI-Crystools/core/common.pyAdded+119
custom_nodes/ComfyUI-Crystools/core/config.pyAdded+7
custom_nodes/ComfyUI-Crystools/core/keys.pyAdded+29
custom_nodes/ComfyUI-Crystools/core/logger.pyAdded+39
custom_nodes/ComfyUI-Crystools/core/types.pyAdded+36
custom_nodes/ComfyUI-Crystools/core/version.pyAdded+1
custom_nodes/ComfyUI-Crystools/docs/crystools-save.pngAdded

custom_nodes/ComfyUI-Crystools/docs/debugger-show-any.pngAdded

Large File Pointer Details
- SHA256: 62f5048bbbbc46e1a087d589ee3461707d76713ca3f764600c35c01fcd89e1ed
- Pointer size: 131 Bytes
- Size of remote file: 171 kB
custom_nodes/ComfyUI-Crystools/docs/debugger-show-json.pngAdded

Large File Pointer Details
- SHA256: e3cb0d6d79ed1439bdb38657b52d041e3306918f66fd89aebe7938d4a4892e81
- Pointer size: 131 Bytes
- Size of remote file: 210 kB
custom_nodes/ComfyUI-Crystools/docs/debugger-show-metadata.pngAdded

Large File Pointer Details
- SHA256: ffd286e581956bf18ca4e4af14ce7078008f5333ff46de93272d63de90e8ba42
- Pointer size: 131 Bytes
- Size of remote file: 269 kB
custom_nodes/ComfyUI-Crystools/docs/image-load.pngAdded

Large File Pointer Details
- SHA256: b455ab84f771c1d3e5688c0015df2e2a39836cb2ee80dbe869b88984c007ffc4
- Pointer size: 131 Bytes
- Size of remote file: 183 kB
custom_nodes/ComfyUI-Crystools/docs/image-preview-diff.pngAdded

Large File Pointer Details
- SHA256: 8cbd7835d6e4b4f542799d9004bd2036813a6600530ac60b4119b7d087b1e448
- Pointer size: 131 Bytes
- Size of remote file: 279 kB
custom_nodes/ComfyUI-Crystools/docs/image-preview-metadata.pngAdded

Large File Pointer Details
- SHA256: accd1afd495048637a82879e616082be910baedc330ad9143dc1f62c2d043c03
- Pointer size: 131 Bytes
- Size of remote file: 270 kB
custom_nodes/ComfyUI-Crystools/docs/image-preview.pngAdded

Large File Pointer Details
- SHA256: d680193412c6eebf62327d6529b692a345817697ee86167bffdf27b3f80a4581
- Pointer size: 131 Bytes
- Size of remote file: 115 kB
custom_nodes/ComfyUI-Crystools/docs/image-resolution.pngAdded

Large File Pointer Details
- SHA256: 32fdfc3bdad190cbb9eb40eba48aaf2ae5c198333c7c5f5cc4fb5b8edf595e68
- Pointer size: 131 Bytes
- Size of remote file: 168 kB
custom_nodes/ComfyUI-Crystools/docs/image-save.pngAdded

Large File Pointer Details
- SHA256: 81097fccdb79fc5360c4bbbba82a041360a83ca071b0d528b0cd43f780051b04
- Pointer size: 131 Bytes
- Size of remote file: 213 kB
custom_nodes/ComfyUI-Crystools/docs/jake.gifAdded

Large File Pointer Details
- SHA256: c56a5c327e232144ee30dc0e4b994ccfd6306defde59706e830044065a5554e9
- Pointer size: 131 Bytes
- Size of remote file: 153 kB
custom_nodes/ComfyUI-Crystools/docs/list-any.pngAdded

custom_nodes/ComfyUI-Crystools/docs/list-string.pngAdded

custom_nodes/ComfyUI-Crystools/docs/menu.pngAdded

custom_nodes/ComfyUI-Crystools/docs/metadata-comparator-mark.pngAdded

Large File Pointer Details
- SHA256: bc26cb4a8642d8d0b4dbf62ddac4df31b61412364e5e824b35641173ba63e9a5
- Pointer size: 131 Bytes
- Size of remote file: 157 kB
custom_nodes/ComfyUI-Crystools/docs/metadata-comparator.pngAdded

Large File Pointer Details
- SHA256: dfbc70cc6f3347d998721ddc01538b7230df58580955a604b191ba24370476fd
- Pointer size: 131 Bytes
- Size of remote file: 152 kB
custom_nodes/ComfyUI-Crystools/docs/metadata-extractor-photoshop.pngAdded

Large File Pointer Details
- SHA256: cbea5cf84072d64c9581f9924d6f815060a164d16f0bbfd730e1284902882a43
- Pointer size: 131 Bytes
- Size of remote file: 181 kB
custom_nodes/ComfyUI-Crystools/docs/metadata-extractor.pngAdded

Large File Pointer Details
- SHA256: 03cd71a70f05506d3ca04173151243deb576d8686f2e52eddb392b4b2520db7b
- Pointer size: 131 Bytes
- Size of remote file: 262 kB
custom_nodes/ComfyUI-Crystools/docs/monitor-settings.pngAdded

custom_nodes/ComfyUI-Crystools/docs/monitor.pngAdded
