Skip to content

Hyperswap broken #183

Description

@alexeyvolkoff

First, confirm

  • I have read the instruction carefully
  • I have searched the existing issues
  • I have updated the extension to the latest version

What happened?

Hey @Buumcode,
Good job for alpha but hyperswap_1a_256.onnx breaks on second or third generation. It generates a grid of black-and-white source images with a face square above it

hyperswap_1c_256.onnx the same

Steps to reproduce the problem

Minimal workflow
{
"1": {
"inputs": {
"image": "avatar_512.png"
},
"class_type": "LoadImage",
"_meta": {
"title": "Load Image"
}
},
"3": {
"inputs": {
"save_mode": "my_face_model",
"face_model_name": "default",
"select_face_index": 0,
"face_model": [
"6",
1
]
},
"class_type": "ReActorSaveFaceModel",
"meta": {
"title": "Save Face Model 🌌 ReActor"
}
},
"5": {
"inputs": {
"image": "ComfyUI_temp_qphfr_00066
.png"
},
"class_type": "LoadImage",
"_meta": {
"title": "Load Image"
}
},
"6": {
"inputs": {
"enabled": true,
"swap_model": "hyperswap_1c_256.onnx",
"facedetection": "retinaface_resnet50",
"face_restore_model": "GFPGANv1.4.pth",
"face_restore_visibility": 1,
"codeformer_weight": 0.4000000000000001,
"input_image": [
"5",
0
],
"source_image": [
"1",
0
]
},
"class_type": "ReActorFaceSwapOpt",
"_meta": {
"title": "ReActor 🌌 Fast Face Swap [OPTIONS]"
}
},
"7": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"6",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
}
}

Sysinfo

Ubuntu 24.04, RTX 5070

Relevant console log

Requested to load AutoencoderKL
loaded completely 6091.285274505615 159.55708122253418 True
[ReActor] 20:14:31 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 20:14:31 - STATUS - Using Loaded Source Face Model...
[ReActor] 20:14:31 - STATUS - Analyzing Target Image...
[ReActor] 20:14:32 - STATUS - Swapping...
[ReActor] 20:14:33 - STATUS - --Done!--
SaveImageExtended info: node #1 not found

Additional information

No response

Activity

Buumcode commented on Oct 7, 2025

@Buumcode

hyperswap_1a_256.onnx breaks on second or third generation

I never get this problems. Do you have issue with FaceFusion working? - https://github.com/facefusion/facefusion <-- It's native Hyperswap app.

I've launch Reactor with Hyperswap support on Huggingface spaces - https://huggingface.co/spaces/DegMaTsu/ComfyUI-Reactor-Fast-Face-Swap - you can test it.

alexeyvolkoff commented on Oct 7, 2025

@alexeyvolkoff
Author

Got very similar artifact on HF!! :)
Image
But no issues with inswapper model in my workflow

Buumcode commented on Oct 7, 2025

@Buumcode

You need to test FaceFusion native Hyperswap app. Here is my try on your faces:

Image

Buumcode commented on Oct 7, 2025

@Buumcode

One more with Face Restorer enabled (similar to you):

Image

Buumcode commented on Oct 7, 2025

@Buumcode

In description you can see Note - "Sometimes Hyperswap makes fail swap". (It's look like "change nothing" for me). May be in your variant it gives artefacts?

From all time using - I NEVER get result with this artefacts. But one guy show me screens with it - exactly the same artefacts like you get. I download from attach his Source and Target files - and I get successful face swap on them. But he get artefacts.

Investigation needed. (May be something in FILE properties - PNG with alpha-channel or WEBP?) Can you attach exactly this source and target files?

alexeyvolkoff commented on Oct 7, 2025

@alexeyvolkoff
Author

https://onmydisk.net/shared/AwJ6LnBwQCUSJgNlF0t6HisfOAoofE9_TXgObURCIBMhR2BSdihcOUo-
Here are the source and target.
Interesting. It fails exactly on second run.

Buumcode commented on Oct 8, 2025

@Buumcode

Interesting. It fails exactly on second run.

Download your files and make face swap on Huggingface. Did 4 face swap - always successful. (Forget to make 4th screenshot) - results is here - https://disk.yandex.ru/a/CfEbM5vXffh2uw

**If you have installed Reactor - you can very quickly install FaceFusion app - https://docs.facefusion.io/
And test Hyperswap in his native application.

Buumcode commented on Oct 8, 2025

@Buumcode

May be difference in BROWSER? Did you download result file with artefacts?

I've use Opera and Edge, on Windows 10 - always successful.

alexeyvolkoff commented on Oct 8, 2025

@alexeyvolkoff
Author

But what browser has to do with it? Does it run it with Transformers.js inside the browser on HF page? Actually, there is no artifact when I run it on Windows laptop (HF page)

alexeyvolkoff commented on Oct 8, 2025

@alexeyvolkoff
Author

ps.
I will try facefusion app later today and report here

alexeyvolkoff commented on Oct 8, 2025

@alexeyvolkoff
Author

So it actually works. And it works on my GPU (RTX 5070ti) in a fresh conda environment with cuda-12.9.1.
Image
So most likely the root cause is the same as with "No face found" issue - messed up CUDA 13.0 in the ConfyUI environment. I will try to sort it out and report here.

alexeyvolkoff commented on Oct 9, 2025

@alexeyvolkoff
Author

@Buumcode no, GPU is irrelevant to this issue. I have fixed the mess with CUDA and swapping works fast now.
inswapper:
Image
hyperswap, second run:
Image

18 remaining items

alexeyvolkoff commented on Oct 27, 2025

@alexeyvolkoff
Author

Looks like someone had a great weekend :)
I will test later today.

alexeyvolkoff commented on Oct 27, 2025

@alexeyvolkoff
Author

@Buumcode
Does not work for me.

2025-10-27T18:26:08.439336 - !!! Exception during processing !!! cannot unpack non-iterable Image object
2025-10-27T18:26:08.439923 - Traceback (most recent call last):
File "/home/alexey/projects/ComfyUI/execution.py", line 361, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alexey/projects/ComfyUI/execution.py", line 236, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alexey/projects/ComfyUI/execution.py", line 208, in _map_node_over_list
process_inputs(input_dict, i)
File "/home/alexey/projects/ComfyUI/execution.py", line 197, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alexey/projects/ComfyUI/custom_nodes/comfyui-reactor-node/nodes.py", line 434, in execute
script.process(
File "/home/alexey/projects/ComfyUI/custom_nodes/comfyui-reactor-node/scripts/reactor_faceswap.py", line 110, in process
result, bbox, swapped_indexes = swap_face(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable Image object

2025-10-27T18:26:08.440642 - Prompt executed in 0.12 seconds

## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.

Workflow too large. Please manually upload the workflow from local file system.


## Additional Context
(Please add any additional context or steps to reproduce the error here)

Buumcode commented on Oct 27, 2025

@Buumcode

Does not work for me.

My fault. I mean you know this is for version 0.6.1-b2, which I post in "Feature: Add support for Hypeswap 256" thread.

I've add full ZIP of node. Try it:

comfyui-reactor-node_Reactor_v0.6.1-b2+Hyperswap+Restore-filter+VHS-fix+Float-fix_GITHUB.zip

ZZZJX0912 commented on Oct 28, 2025

@ZZZJX0912

Since I am running ComfyUI on a cloud server and using a GPU for operation, does the repair solution mentioned above only work when running on a CPU?

Buumcode commented on Oct 28, 2025

@Buumcode

Since I am running ComfyUI on a cloud server and using a GPU for operation, does the repair solution mentioned above only work when running on a CPU?

It should work everywere. Guy, who send me screenshots with artifacts - also try to launch Reactor with Hyperswap on GPU paid server based on Lynux (Ubuntu). Something wrong with this "GPU" - looks like Reactor has FALLBACK on CPU in work in this environment.

alexeyvolkoff commented on Oct 28, 2025

@alexeyvolkoff
Author

It works now! Great job!

ZZZJX0912 commented on Oct 29, 2025

@ZZZJX0912

Could you please tell me how to make it take effect? Should the zip node be used to replace the reactor-node?

Buumcode commented on Oct 29, 2025

@Buumcode

Should the zip node be used to replace the reactor-node?

1/ Delete folder with your Reactor from custom_nodes
(example) C:\ComfyUI\custom_nodes\comfyui-reactor <----- delete this

2/ Unpack this ZIP as C:\ComfyUI\custom_nodes\comfyui-reactor-node
(use your own adress to folder custom_nodes)

3/ Restart your ComfyUI.

Buumcode commented on Jan 26, 2026

@Buumcode

@Gourieff
Hey, buddy! You push me to learn what the hell is 'Pull Request' 😁 --> I did pull request on Codeberg-org 👀

  1. Testing 1: I've make clear new space on Huggingface.co and clone Reactor from Codeberg (v0.6.2-b1). Running on CPU --> it gives hell artefacts ("Hyperswap broken").
  2. Testing 2: I've apply 'CPU Float Fix' over them -- result: all works 100% fine. And fast!
    You can look on that in - https://huggingface.co/spaces/waxexo/ComfyUI-Reactor-Fast-Face-Swap-Codeberg-CPU

Gourieff commented on Apr 25, 2026

@Gourieff
Owner

@Gourieff Hey, buddy! You push me to learn what the hell is 'Pull Request' 😁 --> I did pull request on Codeberg-org 👀

1. Testing 1: I've make clear new space on Huggingface.co and clone Reactor from Codeberg (v0.6.2-b1). Running on CPU --> it gives hell artefacts ("Hyperswap broken").

2. Testing 2: I've apply 'CPU Float Fix' over them -- result: all works 100% fine. And fast!
   You can look on that in - https://huggingface.co/spaces/waxexo/ComfyUI-Reactor-Fast-Face-Swap-Codeberg-CPU

Hey my friend, thanks a lot for your big help!
A new important update is coming, and I will close current PRs coz of merge conflicts

added a commit that references this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions