Gourieff / comfyui-reactor-node

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

Console Log Level Causing stop the workflow in touchdesigner with TDComfyUI #165

Closed pranaykalita closed 6 months ago

pranaykalita commented 8 months ago

First, confirm

What happened?

i am trying to run a workflow on Touchdesigner using Reactor Faceswap, the console log level causing it to not working by throwing following output:

ERROR:root:* ReActorFaceSwap 29:
ERROR:root:  - Value not in list: console_log_level: '1' not in [0, 1, 2]
ERROR:root:Output will be ignored```

i am using TDComfyUI v1.0.3
here is the workflow on TD:
![image](https://github.com/Gourieff/comfyui-reactor-node/assets/22723860/4dfed2d2-e1e3-4032-bc04-a77020c71931)

here is my ComfyUI Workflow
![image](https://github.com/Gourieff/comfyui-reactor-node/assets/22723860/34328b60-84a2-4bfe-a631-bf8178704646)

![image](https://github.com/Gourieff/comfyui-reactor-node/assets/22723860/bfaf2e35-cd40-4879-aa3c-80bd50ede88c)

here is cmd output of COmfyui when hit Generate
![image](https://github.com/Gourieff/comfyui-reactor-node/assets/22723860/8d30b85c-13ec-4e68-bf4a-f54e56fb19a8)

### Steps to reproduce the problem

1. create simple Image to image SD workflow with face swap Reactor node(any console log level)
2. export as workflow api
3. use in touchdesigner with TDComfyUI
4. connect all networks and hit generate

### Sysinfo

- Windows 11
-  RTX 3060
- 16GBRAM

### Relevant console log

```Shell
got prompt
ERROR:root:Failed to validate prompt for output 19:
ERROR:root:* ReActorFaceSwap 29:
ERROR:root:  - Value not in list: console_log_level: '1' not in [0, 1, 2]
ERROR:root:Output will be ignored
invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}
FETCH DATA from: \\NOVA\NovaDrive\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json

Additional information

No response

Gourieff commented 8 months ago

I tested ReActor in TD, and it works pretty well

console_log_level: '1'

You got error, because you set the parameter as string, but it must be set as Int

You should set it to 1 but not to '1'

изображение

12368w commented 6 months ago

доброго Вам времени! у меня аналогичная ситуация проект в связке TouchDesigner + ComfyUI с расширением Reactor ошибка идентична в коде всё правильно - значение без кавычек но ошибка есть

возможно данные в процессе лишний раз преобразуются в другой тип данных

вот часть кода:

"13": { "inputs": { "enabled": true, "swap_model": "inswapper_128.onnx", "facedetection": "retinaface_resnet50", "face_restore_model": "none", "face_restore_visibility": 1, "codeformer_weight": 0.5, "detect_gender_input": "no", "detect_gender_source": "no", "input_faces_index": "0", "source_faces_index": "0", "console_log_level": 1, "input_image": [ "8", 0 ], "source_image": [ "11", 0 ] }, "class_type": "ReActorFaceSwap", "_meta": { "title": "ReActor - Fast Face Swap" } }

вот ошибка из консоли:

got prompt ERROR:root:Failed to validate prompt for output 10: ERROR:root:* ReActorFaceSwap 13: ERROR:root: - Value not in list: console_log_level: '1' not in [0, 1, 2] ERROR:root:Output will be ignored invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}

12368w commented 6 months ago

благодарю проблему решил! перекапал плагин и нашёл ошибку вопрос можно закрыть

olegchomp commented 1 month ago

Continue this thread. source_faces_index & input_faces_index assumed to be numbers int? But when executed through API it expected to be string.

custom_nodes\comfyui-reactor-node\scripts\reactor_faceswap.py", line 74, in process int(x) for x in faces_index.strip(",").split(",") if x.isnumeric() ^^^^^^^^^^^^^^^^^ AttributeError: 'int' object has no attribute 'strip'

GiusTex commented 1 month ago

custom_nodes\comfyui-reactor-node\scripts\reactor_faceswap.py", line 74, in process int(x) for x in faces_index.strip(",").split(",") if x.isnumeric() ^^^^^^^^^^^^^^^^^ AttributeError: 'int' object has no attribute 'strip'

I solved the same issue creating again the same node, I suppose the workflow had embedded an outdated reactor node, and reacreating it updated and fixed it