Open abkcehtnn opened 1 month ago
yes, same here, it seems the mask appears as a grey layer on top of the image. only occurs with GFPGAN.
The latest comfyui update that added the spandrel library caused this, needs to be checked by the creator to make it compatible.
I have exactly the same error as described :(
so everyone is facing the same problem... okay... Im a newbie and would like to know, how do I downgrade Reactor? OR do I have to downgrade comfyui because this issue was caused by an update to comfyui? If anyone knows of a guide, I'd appreciate it if you could give me the URL or something
🤔 Hm... Thanks guys for spotting this...
so everyone is facing the same problem... okay... Im a newbie and would like to know, how do I downgrade Reactor? OR do I have to downgrade comfyui because this issue was caused by an update to comfyui? If anyone knows of a guide, I'd appreciate it if you could give me the URL or something
You should downgrade Comfy to this commit I suppose https://github.com/comfyanonymous/ComfyUI/commit/ffc4b7c30e35eb2773ace52a0b00e0ca5c1f4362 (before spandrel lib was added)
same issue
so everyone is facing the same problem... okay... Im a newbie and would like to know, how do I downgrade Reactor? OR do I have to downgrade comfyui because this issue was caused by an update to comfyui? If anyone knows of a guide, I'd appreciate it if you could give me the URL or something
You should downgrade Comfy to this commit I suppose comfyanonymous/ComfyUI@ffc4b7c (before spandrel lib was added)
Woooow, Thanks!!!
The temporary workaround is to revert ComfyUI to the commit https://github.com/comfyanonymous/ComfyUI/commit/ffc4b7c30e35eb2773ace52a0b00e0ca5c1f4362:
Open Console/Terminal inside the "[ComfyUI root]\ComfyUI" dir and run:
git checkout ffc4b7c
When you want to return back - just switch the branch to master
git checkout master
The temporary workaround is to revert ComfyUI to the commit comfyanonymous/ComfyUI@ffc4b7c:
Open Console/Terminal inside the "[ComfyUI root]\ComfyUI" dir and run:
git checkout ffc4b7c
When you want to return back - just switch the branch to master
git checkout master
Thank you!
Now to remember to swap back to master at some point in the future :) Thanks!
I didnt post because for some reason he isnt responding to my posts. I respect it just do not know why. https://github.com/Gourieff/comfyui-reactor-node/issues/281
I didnt post because for some reason he isnt responding to my posts. I respect it just do not know why. #281
Sorry for that my friend, I have no appropriate answer to your FR yet, I have no idea at the moment how it could be implemented quick and easy without making ReActor too heavy
same problem ,
I didnt post because for some reason he isnt responding to my posts. I respect it just do not know why. #281
Sorry for that my friend, I have no appropriate answer to your FR yet, I have no idea at the moment how it could be implemented quick and easy without making ReActor too heavy
Fair enough. I can replicate it but it is a few nodes extra. I get your point.
@Gourieff The changes come from normalization range (0..1) for spandrel -1..1 for the previous patch.
In my stripped down reactor I have solved it like this
face_t = torch.from_numpy(face[:, :, ::-1] / 255.0).permute(2, 0, 1)
face_t = face_t.unsqueeze(0).float().to(device)
if restore_face:
if isinstance(restorer, ModelBase):
face_t: torch.Tensor = restorer(face_t) * 2 - 1 # spandrel renormalize
elif isinstance(restorer, CodeFormer):
face_t: torch.Tensor = restorer(face_t * 2 - 1, codeformer_weight)[0]
else:
raise ValueError("restorer model must be GFPGAN or CodeFormer")
Perhaps you could implement the same switch and renorm the range differently for spandrel models.
Best, Igor
Changing this one line does the trick.
output = facerestore_model(cropped_face_t, w=codeformer_weight)[0] if "codeformer" in face_restore_model.lower() else 2*facerestore_model((cropped_face_t+1)/2)[0]-1
We first change the range from (-1,1) to (0,1), do the restoration and go back to (-1,1). But only if the restorer is not codeformer.
Sorry for not doing it by proper PR, I suck at git.
https://github.com/Gourieff/comfyui-reactor-node/commit/5480370d8dadec04ea0d70017843b130ca200c14
Here is a forked fixed version of nodes.py if you don't want to modify it yourself or want to wait for the official fix can confirm it works on latest comfy build. If you decide to update comfy through update all make sure you replace the node file each time as well. Thanks for the fix @tomgrad
Changing this one line does the trick.
output = facerestore_model(cropped_face_t, w=codeformer_weight)[0] if "codeformer" in face_restore_model.lower() else 2*facerestore_model((cropped_face_t+1)/2)[0]-1
We first change the range from (-1,1) to (0,1), do the restoration and go back to (-1,1). But only if the restorer is not codeformer.
Sorry for not doing it by proper PR, I suck at git.
This fix work like a charme. Many thanks
Here is a forked fixed version of nodes.py if you don't want to modify it yourself or want to wait for the official fix can confirm it works on latest comfy build. If you decide to update comfy through update all make sure you replace the node file each time as well. Thanks for the fix @tomgrad
Hey thanks for the patch! The only thing I notice though, at least in my workflow, is that with this method (as oposed to reverting to ffc4b7c) the face restore node consistently produces blue colored eyes. I think all the colors get a bit more vivid.
5480370 Here is a forked fixed version of nodes.py if you don't want to modify it yourself or want to wait for the official fix can confirm it works on latest comfy build. If you decide to update comfy through update all make sure you replace the node file each time as well. Thanks for the fix @tomgrad
Hey thanks for the patch! The only thing I notice though, at least in my workflow, is that with this method (as oposed to reverting to ffc4b7c) the face restore node consistently produces blue colored eyes. I think all the colors get a bit more vivid.
Yea I can see some of that in my pictures (over 400) that I have created since implementing it, however I have no idea what part of the coding would do with that, would need to be worked on by the developer, there is a slight underlying hint of blue being added to some of the pics where brown eyes turn out to be more hazel or green eyes turn out to be more blue. But the blur is gone lol.
5480370 Here is a forked fixed version of nodes.py if you don't want to modify it yourself or want to wait for the official fix can confirm it works on latest comfy build. If you decide to update comfy through update all make sure you replace the node file each time as well. Thanks for the fix @tomgrad
Hey thanks for the patch! The only thing I notice though, at least in my workflow, is that with this method (as oposed to reverting to ffc4b7c) the face restore node consistently produces blue colored eyes. I think all the colors get a bit more vivid.
Yea I can see some of that in my pictures (over 400) that I have created since implementing it, however I have no idea what part of the coding would do with that, would need to be worked on by the developer, there is a slight underlying hint of blue being added to some of the pics where brown eyes turn out to be more hazel or green eyes turn out to be more blue. But the blur is gone lol.
I would love to speak with you off site if possible. I would love to network with you with some of the work I have made. We are all busy so I am not asking for you to do any work. Just wanted to keep like minded users in my contact list.
Changing this one line does the trick.
output = facerestore_model(cropped_face_t, w=codeformer_weight)[0] if "codeformer" in face_restore_model.lower() else 2*facerestore_model((cropped_face_t+1)/2)[0]-1
We first change the range from (-1,1) to (0,1), do the restoration and go back to (-1,1). But only if the restorer is not codeformer.
Sorry for not doing it by proper PR, I suck at git.
How do I download this file ?
"The Fix" does not satisfy or make whole :(
The colors are blown out as if you had CFG dialed up to a high number. I will try to mess with numbers, but this wasn't necessary in the past, of course.
I've checked the min-max ranges of the variables cropped_face_t
and output
(near the above-mentioned code line) and found something interesting. When restoring with GFPGAN, the ranges of both tensors are (-1,1) (after the fix). But with CF, I get different values for the output
tensor. For example, (-0.99, 1.29) with weight=0.5 and (-1.03, 1.42) with weight=1. One of the values is always outside the (-1,1) range. So, the next line with tensor2img
does the scaling differently for different restoration models. That is probably why you see some color shift (I don't; I'm a bit colorblind).
EDIT: Also, the output shapes from these two models are different. CF output is unsqueezed (1, 3, 512, 512) compared to (3, 512, 512) from GFPGAN. It probably has nothing to do with the problem, but it's another hint that the models are incompatible.
So guys, it should work fine now with this fix https://github.com/Gourieff/comfyui-reactor-node/commit/a7ae66912f80e8ccd97bb83bf83ab8187b077287
So guys, it should work fine now with this fix a7ae669
Hi, how do you apply this fix? Because I uninstalled and reinstalled the node and still ran into the issue of "comfy_extras.chainner_models is deprecated and has been replaced by the spandrel library"
So guys, it should work fine now with this fix a7ae669
Hi, how do you apply this fix? Because I uninstalled and reinstalled the node and still ran into the issue of "comfy_extras.chainner_models is deprecated and has been replaced by the spandrel library"
Hi, 0.5.0 beta4 doesn't use "comfy_extras.chainner_models" any more, how did you reinstall ReActor? Via ComfyUI Manager or manually?
Hi, how do you apply this fix? Because I uninstalled and reinstalled the node and still ran into the issue of "comfy_extras.chainner_models is deprecated and has been replaced by the spandrel library"
Hi, 0.5.0 beta4 doesn't use "comfy_extras.chainner_models" any more, how did you reinstall ReActor? Via ComfyUI Manager or manually?
I used the Manager to uninstall and reinstall, should I have done it manually instead?
Hi, how do you apply this fix? Because I uninstalled and reinstalled the node and still ran into the issue of "comfy_extras.chainner_models is deprecated and has been replaced by the spandrel library"
Hi, 0.5.0 beta4 doesn't use "comfy_extras.chainner_models" any more, how did you reinstall ReActor? Via ComfyUI Manager or manually?
I used the Manager to uninstall and reinstall, should I have done it manually instead?
Go to the link "So` guys, it should work fine now with this fix a7ae669" and download the files, then go to Reactor node folder inside comfy custom nodes and replace the original files with the new ones, restart and it should work.
I used the Manager to uninstall and reinstall, should I have done it manually instead?
Go to the link "So` guys, it should work fine now with this fix a7ae669" and download the files, then go to Reactor node folder inside comfy custom nodes and replace the original files with the new ones, restart and it should work.
I don't see the option to just download those files, would going to the main page and download through zip work?
On a fresh install Comfy I saw new models downloaded for ReActor however it did not do that for a previous how to force a pull?
On a fresh install Comfy I saw new models downloaded for ReActor however it did not do that for a previous how to force a pull?
You can pick them from here https://huggingface.co/datasets/Gourieff/ReActor/tree/main/models/facerestore_models
I used the Manager to uninstall and reinstall, should I have done it manually instead?
Go to the link "So` guys, it should work fine now with this fix a7ae669" and download the files, then go to Reactor node folder inside comfy custom nodes and replace the original files with the new ones, restart and it should work.
I don't see the option to just download those files, would going to the main page and download through zip work?
Click the three dots on top right, then select view file, then once you go to that page, click download raw file.
I don't see the option to just download those files, would going to the main page and download through zip work?
Click the three dots on top right, then select view file, then once you go to that page, click download raw file.
The issue still persists, I guess I'll just use the previous branch for now, thank you for replying o/
I get the error too. I have reactor installed and running. I replaced all the 'fixed' .py files in the /comfyui-reactor-node/ folders. Still no joy. I don't get messed up generations like OP but this began after I tried using someone elses workflow and me trying to get it running involved installing reactor and a couple of other nodes plus forcefully installing insight face swap and some other things. I fixed everything to get working but now get this error about deprecated spandrel.
I get the error too. I have reactor installed and running. I replaced all the 'fixed' .py files in the /comfyui-reactor-node/ folders. Still no joy. I don't get messed up generations like OP but this began after I tried using someone elses workflow and me trying to get it running involved installing reactor and a couple of other nodes plus forcefully installing insight face swap and some other things. I fixed everything to get working but now get this error about deprecated spandrel.
download https://github.com/Gourieff/sd-webui-extensions-updater/blob/main/update.bat and put it in your comfyui\custom_nodes folder and run it then restart comfyui once everything has been updated....
I didnt post because for some reason he isnt responding to my posts. I respect it just do not know why. #281
Sorry for that my friend, I have no appropriate answer to your FR yet, I have no idea at the moment how it could be implemented quick and easy without making ReActor too heavy
How about this. Is it possible to make a node that has a male and a female set of images like this and in the background it renders your saved safetensors into the faces you want and outputs them separately. The purpose is the node can be attached directly to ipadapters.
First, confirm
What happened?
Only when I select GFPGAN for face_restore_model, I get gray noise in the output image. When I select the codeformer for face_restore_model the problem does not occur. I confirmed the same problem in both GFPGAN v1.3 and v1.4.
Steps to reproduce the problem
Select GFPGAN for face_restore_model
Sysinfo
Microsoft Windows 10 Home AMD Ryzen 7 3700X 8-Core Processor 3.60 GHz RTX 2070 Super RAM 32.0 GB
Relevant console log
Additional information
No response