Files
ComfyUI/custom_nodes/ComfyUI_PuLID_Flux_ll_FaceNet/patch_util.py
jaidaken f09734b0ee
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.10, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.11, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.12, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-unix-nightly (12.1, , linux, 3.11, [self-hosted Linux], nightly) (push) Has been cancelled
Execution Tests / test (macos-latest) (push) Has been cancelled
Execution Tests / test (ubuntu-latest) (push) Has been cancelled
Execution Tests / test (windows-latest) (push) Has been cancelled
Test server launches without errors / test (push) Has been cancelled
Unit Tests / test (macos-latest) (push) Has been cancelled
Unit Tests / test (ubuntu-latest) (push) Has been cancelled
Unit Tests / test (windows-2022) (push) Has been cancelled
Add custom nodes, Civitai loras (LFS), and vast.ai setup script
Includes 30 custom nodes committed directly, 7 Civitai-exclusive
loras stored via Git LFS, and a setup script that installs all
dependencies and downloads HuggingFace-hosted models on vast.ai.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:56:42 +00:00

41 lines
1.7 KiB
Python

class PatchKeys:
################## transformer_options patches ##################
running_net_model = "running_net_model"
options_key = "patches_point"
# patches_point下支持设置的补丁
dit_enter = "patch_dit_enter"
dit_blocks_before = "patch_dit_blocks_before"
dit_double_blocks_replace = "patch_dit_double_blocks_replace"
dit_double_blocks_after = "patch_dit_double_blocks_after"
dit_blocks_transition_replace = "patch_dit_blocks_transition_replace"
dit_single_blocks_before = "patch_dit_single_blocks_before"
dit_single_blocks_replace = "patch_dit_single_blocks_replace"
dit_blocks_after = "patch_dit_blocks_after"
dit_blocks_after_transition_replace = "patch_dit_final_layer_before_replace"
dit_final_layer_before = "patch_dit_final_layer_before"
dit_exit = "patch_dit_exit"
################## transformer_options patches ##################
# pulid
pulid_patch_key_attrs = "pulid_temp_attr"
def set_model_patch(model_patcher, options_key, patch, name):
to = model_patcher.model_options["transformer_options"]
if options_key not in to:
to[options_key] = {}
to[options_key][name] = to[options_key].get(name, []) + [patch]
def set_model_patch_replace(model_patcher, options_key, patch, name):
to = model_patcher.model_options["transformer_options"]
if options_key not in to:
to[options_key] = {}
to[options_key][name] = patch
def add_model_patch_option(model, patch_key):
if 'transformer_options' not in model.model_options:
model.model_options['transformer_options'] = {}
to = model.model_options['transformer_options']
if patch_key not in to:
to[patch_key] = {}
return to[patch_key]