Gourieff / comfyui-reactor-node

Fast and Simple Face Swap Extension Node for ComfyUI
GNU General Public License v3.0
1.09k stars 114 forks source link

Assertion Error #237

Closed bertoo87 closed 4 months ago

bertoo87 commented 4 months ago

First, confirm

What happened?

Can't do a swap, no matter the settings. Example workflow attached with Error Message Screenshot_4

############# EDIT: it seems like i missed some models regarding the inswapper or (maybe) the SD11.5 encoder. Its up and running now #############

Steps to reproduce the problem

Workflow: fresh install of ComfyUI portable, installed the CUDA12 package as per instructions, ran the install.bat, installed insightface for my Python version which i checked via the command (3.11)

Sysinfo

Win 11, Chrome, RTX3080 10GB, no other Custom Nodes so far, except for the Manager.

Relevant console log

got prompt
[ReActor] 00:00:39 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 00:00:39 - STATUS - Analyzing Source Image...
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "D:\ComfyNew\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyNew\ComfyUI\execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyNew\ComfyUI\execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyNew\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 240, in execute
    script.process(
  File "D:\ComfyNew\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_faceswap.py", line 86, in process
    result = swap_face(
             ^^^^^^^^^^
  File "D:\ComfyNew\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 195, in swap_face
    source_faces = analyze_faces(source_img)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyNew\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 114, in analyze_faces
    face_analyser = copy.deepcopy(getAnalysisModel())
                                  ^^^^^^^^^^^^^^^^^^
  File "D:\ComfyNew\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 69, in getAnalysisModel
    ANALYSIS_MODEL = insightface.app.FaceAnalysis(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyNew\ComfyUI\custom_nodes\comfyui-reactor-node\reactor_log_patch.py", line 59, in patched_faceanalysis_init
    assert 'detection' in self.models
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Additional information

No response

Amit30swgoh commented 2 months ago

AssertionError image also no face model ? image image

assert 'detection' in self.models

AssertionError