Video Face Swap Made Easy! ComfyUI

Sdílet
Vložit
  • čas přidán 14. 01. 2024
  • DM/comment for question or your experiential needs. ComfyUI, combined with stock or your own videos, can transform your storyboarding and video projects. Discover the magic of seamless face swapping to align every video perfectly with your creative vision. Whether you're crafting pitches or bringing stories to life, our step-by-step guide makes it easy for you to maintain visual consistency across your videos. Perfect for filmmakers, content creators, and visual artists who aspire to elevate their work with minimal effort. Subscribe and unlock the full potential of your storytelling today! 🌟🎬✨
    ~WORKFLOW:~
    Click the Download button to download the image and then drag the image to your ComfyUI to get this workflow:
    github.com/creatorbrew/workfl...
    To preview, go here... and if the download button is working you can download from here too:
    comfyworkflows.com/workflows/...
    ~NODES~
    REACTOR:github.com/Gourieff/comfyui-r...
    LOAD VIDEOgithub.com/Nuked88/ComfyUI-N-...
    ~MODELS~
    inswapper_128.onnxretinaface_resnet50
    codeformer.pthRealESRGAN_x2plus.pth
    (optional for upscaling image)
    Delete the top nodes for the face swap, only here as reference.
  • Krátké a kreslené filmy

Komentáře • 66

  • @sejaldatta463
    @sejaldatta463 Před 4 dny

    Great video - this workflow did work for me a week ago but now I'm receiving an issue with the save video. I had N-Suite, which worked fine. What's the issue here?

  • @harithagamagedara5893
    @harithagamagedara5893 Před 4 měsíci +1

    perfectly working. when swapping face in videos keep "source_face_index" to 0 in Reactor node.
    Thanks bro.

    • @creatorbrew
      @creatorbrew  Před 4 měsíci

      Glad it helped. Source is which face to pick. If there were two people in the video, 0 is the one in the left and 1 would be the one on the right.

  • @sportsupyours
    @sportsupyours Před 4 měsíci

    Thanks for sharing. FYI your workflow link in the description is broken

    • @creatorbrew
      @creatorbrew  Před 4 měsíci +2

      Thank you, it looks like the DOWNLOAD BUTTON on the comfyuiworkflows.com site is not working. Here's another link: github.com/creatorbrew/workflows/blob/main/video_face_swap.png Download the image with the download button, upper right above the image, and then drag the image to your Comfyui to import the workflow. have fun!

  • @petermolvaier
    @petermolvaier Před 4 měsíci +1

    thanks for sharing; by any chance, do you know why reactore node can not be installed? I tried the manager, installed, desintaled, re-installed, updated all the nodesbut i still get this error: (IMPORT FAILED) ReActor Node for ComfyUI

    • @creatorbrew
      @creatorbrew  Před 4 měsíci

      Here's a way to start to see if there is a conflict. Download the Portable Comfyui. Install Manager. And immediately install reactor. The restart. If Reactor shows up then you are on the right track to fixing.
      There can be a node conflict, or an update that is needed.

    • @-MM_TV-
      @-MM_TV- Před 4 měsíci

      I had the same Problem, i instaled it manual not with the Manager, worked for me

  • @b108cambridge
    @b108cambridge Před 2 měsíci

    Hi there. Amazing results would love to try. Have never used a github workflow before. Could you point me in the direction of a video that might help me learn so i can use your workflow? Thank you Adrian

    • @creatorbrew
      @creatorbrew  Před 2 měsíci +1

      To get the workflow head over here: github.com/creatorbrew/workflows/blob/main/video_face_swap.png
      There is a downward arrow button ontop to download this image. You then take this image and drag it on to the ComfyUI interface to load the workflow.
      Here are two general videos about using GitHub
      czcams.com/video/xAJ3Bb6CdaA/video.html
      czcams.com/video/sD65M0V3YUs/video.html
      To get ComfyUI:
      1) Go here: github.com/comfyanonymous/ComfyUI
      2) Click on the hyperlink "Direct link to download"
      3) Unzip it
      4) Click Install Manager
      5) Run
      6) Follow the link for getting the Face Reactor set up
      In this case, you don't need to really use Git other than like a web page for reading instructions and clicking links to download

    • @b108cambridge
      @b108cambridge Před 2 měsíci +1

      T@@creatorbrew Thanks thats really kind of you to reply.😀

    • @b108cambridge
      @b108cambridge Před 2 měsíci +1

      @@creatorbrew sorry to be a pain but when i unzip the file there is no install manager file? Could you point me in the right direction please? Thx

    • @creatorbrew
      @creatorbrew  Před 2 měsíci

      replicate.com/guides/comfyui/comfyui-manager/#:~:text=nodes%20and%20weights.-,Install%20the%20ComfyUI%20manager,nodes%20directory%3A%20ComfyUI%2Fcustom_nodes%20.&text=You%20should%20now%20have%20a,are%20a%20few%20extra%20steps. I have not used this url, but take a quick look online for “install ComfyUI manager” After you have it installed restart comfyui

  • @AI_Soondol
    @AI_Soondol Před měsícem

    So then for longer video should I put higher number for batch_size? or leave it at 0?

    • @creatorbrew
      @creatorbrew  Před měsícem +1

      leave at 0, but, for best results you can do X number of frames at a time. Like setting batch to 60 will do the first 60 frames. Setting the start time to 30 will do the next 30 frames and so on. This works best not throwing a whole video into it, but picking out the good segments to batch and moving forward. Good= a person is looking at camera and about to turn. That's one batch. The person begins to turn, that's the second batch. And so on.

  • @Warlockphreak
    @Warlockphreak Před 4 měsíci

    hi thank you iv had a problem as video over 1min long will not work ?

    • @creatorbrew
      @creatorbrew  Před 4 měsíci

      You have to batch long videos, part of that node. Or cut up the mp4 file.
      Doing 3 seconds at a time works best if a video has lots of changes, like a quick head turn. To help the tool of AI out, feed it similar cuts.

  • @creatorbrew
    @creatorbrew  Před 4 měsíci

    I like the 4080 good price, enough vram

    • @creatorbrew
      @creatorbrew  Před 4 měsíci

      actually, make sure to get the Super. Cheaper and a little better. 4070 TI Super or 4080 Super

  • @-MM_TV-
    @-MM_TV- Před 4 měsíci

    Is there a note for a counter so I can adjust the start frame with each run?

    • @creatorbrew
      @creatorbrew  Před 4 měsíci

      images_limit: Limit number of frames to extract.
      starting_frame: Select which frame to start from.
      You can wire that into an equation, changing the starting_frame with each run.

    • @-MM_TV-
      @-MM_TV- Před 4 měsíci

      Thank you very much for the answer, but with which notes do I do this?

    • @creatorbrew
      @creatorbrew  Před 4 měsíci

      @@-MM_TV- you would connect it coming out of the load video. To intercept the start frame value and increment it per run, if I understand what you are trying to do.

  • @The_Daliban
    @The_Daliban Před 25 dny

    Hi, i have and issue and couldn't find anything on github or reddit. when i start comfyUI it shows the savevideo node as missing and tells me that it couldn't findit. i checked and it isn't in the custom nodes directory. Is there a fix or way to install it manually by any chance?

    • @ChristofferNordvall
      @ChristofferNordvall Před 21 dnem

      update node name in the n package, it's renamed

    • @The_Daliban
      @The_Daliban Před 21 dnem

      @@ChristofferNordvall i‘ll look into it. 🙏🏻

  • @saihrudaypidatala
    @saihrudaypidatala Před 2 měsíci

    The workflow works well. But I am not able to see nor save the video. From the SaveVideo node

    • @Kennyyoung-qz5qg
      @Kennyyoung-qz5qg Před 2 měsíci +1

      I got same issue. SaveVideo node missed too

    • @MaghrabyANO
      @MaghrabyANO Před 7 dny

      @@Kennyyoung-qz5qg Same here, any solution?

  • @leandrogoethals6599
    @leandrogoethals6599 Před 3 měsíci

    how do we upload videos of 3 mins long HD it's always file to big.
    Do u know a way to circumcize this?
    An alternative would be to first cut up the video in small fragments and then batch ur workflow but how can we do this in one go?

    • @creatorbrew
      @creatorbrew  Před 3 měsíci

      Cut down to manageable parts. 30 seconds each. Try.
      For automation if it isn’t taking the 3min the only way to automate is with a script. I written a platform for such tasks, but only as a corporate product.
      The workflow works best with 15 sec -30sec clips. Where the head isn’t doing drastic moves between. Example would be head turn is one clip and a walk is another - to get the best consistency.

    • @leandrogoethals6599
      @leandrogoethals6599 Před 3 měsíci

      @@creatorbrew i could use something like ffmpeg to cut a video into frames wich is cli so good for automation, but i don't know how to iterate over all the frames in the folder

    • @creatorbrew
      @creatorbrew  Před 3 měsíci

      @@leandrogoethals6599you can cut video for free using Adobe express tools online. If you want to cut the frames then you need another input node other than the load video node in this video.
      If you are using the load video mode, then you can right click it and convert the start frame into an input. Then the start video can be wired to a new group of nodes to check for the condition and offset the start. The efficiency nodes might work for what you are doing,

    • @creatorbrew
      @creatorbrew  Před 3 měsíci

      @@leandrogoethals6599 What are you trying to achieve? Is this for an experiment or for work? If for work I'll have a different answer than below:
      FFMP is for cutting the individual frames, but this workflow is about a Load Video node that takes in video. If you use this node and want a free video slider, than Adobe Express can do that www.adobe.com/express/feature/video/editor
      Also, you can right click the Load Video node and then convert the start frame to an input field (something that can be wired) and use the custom Efficiency Nodes or other group to run an IF/Then condition and step up the start frame with each pass, this by going through the one video start segments. For something with multiple videos or frames then another strategy would be needed for multiple videos, says something like creating the name of the video files as an increment plus or with frames it would be using the other load video node that takes in frames instead of video and offsetting the frame number.
      The videos are being saved, so in the backend you would need to take all those videos and splice together with FFMPEG or other CLI way OR loop the formation of the video to include the previous one and extending it.
      If this is a company project, my approach would be different, I might use the URL loader for a video and then I would write a thin front end to handle the processing of things, straight javascript or react, to make a clean interface. I've done this with a platform I made on top of Stable Diffusion to automate task and do other things.

    • @leandrogoethals6599
      @leandrogoethals6599 Před 3 měsíci

      @@creatorbrew So what would be the benefit to load video instead of batch individual frames?
      Like coherence?
      Could u make a tuturial on this i thinkthat would have a lot of viewsi think

  • @lilillllii246
    @lilillllii246 Před 3 měsíci

    Thank you. When loading the graph, the following node types were not found:ComfyUI-N-Nodes

    • @lilillllii246
      @lilillllii246 Před 3 měsíci

      I installed it, did the comfyui update and got this message, I ran it through google colab and google drive.

    • @creatorbrew
      @creatorbrew  Před 3 měsíci +1

      @@lilillllii246 With Comfyui, are you on a Mac or PC? If on a PC, download the self contained package. Drag in the Workflow. Run the "Manager" bat file. Then go under Manager and install the missing nodes. Then restart Comfyui and it all will work.
      Let me know if you aren't on PC or you are needing to run it through colab.
      Standalone / Portable for Windows
      github.com/comfyanonymous/ComfyUI
      Manager
      github.com/ltdrdata/ComfyUI-Manager
      N-Nodes (but install this through the Manager)
      github.com/Nuked88/ComfyUI-N-Nodes

    • @lilillllii246
      @lilillllii246 Před 3 měsíci

      @@creatorbrew Thank you. I use google colab. not loca pc. not possible in google colab?

    • @creatorbrew
      @creatorbrew  Před 3 měsíci

      @@lilillllii246 It's possible, just more to look into. You have to have the Nuke project's nodes installed into the ComfyUI custom_nodes folder. Is N-Suite showing up there?

    • @IconicBanter
      @IconicBanter Před měsícem

      ​@@creatorbrew I have the same problem. ComfyUI-N-Nodes is installed (using the manager), but when I startup the workflow, and the following message shows up: "When loading the graph, the following node types were not found: - ComfyUI-N-Nodes.
      Nodes that have failed to load will show as red on the graph."
      And that node shows as (undefined) and red on the graph.
      Any ideas how to fix this?

  • @codymulac4292
    @codymulac4292 Před 2 měsíci

    I dont have a button to upload a video to the LoadVideo node, drag and drop doesnt work either.

    • @creatorbrew
      @creatorbrew  Před 2 měsíci

      Hi- are you using the same node from the downloaded workflow? Did you up grade comfyui and updated the nodes and the restarted and after restart quit and restart manually? If you can share a screen shot it will help postimages.org

    • @codymulac4292
      @codymulac4292 Před 2 měsíci

      Yeah it's all the same. I tried everything. Node just has no upload button, path doesn't work, don't have any ability to push a video to this node at all. I'm at work but can send a photo later

    • @creatorbrew
      @creatorbrew  Před 2 měsíci

      ​​⁠also try a fresh portable version and just the video mode loading. Sometimes there are node conflicts, starting with the portable and the node in question helps with troubleshooting.

  • @Nibot2023
    @Nibot2023 Před 3 měsíci

    You did not really go over how to resize...you just point at it and go there it is....but when you do a drop to width or height...they share the same number even if you change the drop down. I believe it's a bit more than that using the outputs of the width and height but not sure how to plug it in with in the pipeline.

    • @creatorbrew
      @creatorbrew  Před 3 měsíci

      You can resize using an upscale node. For width and height with the reactor node it looks at an image and gets an image by the position it is in within the image, then it applies the image to another image, in this case a video frame via the position selected within the destination image. The width and height in the destination image doesn’t matter since it is a face to face. Though the destination image’s face is the structure which the new face is being placed on and because of this there is no restructuring of the width snd height of the face. So other than upscaling is there something else you are referring too?
      resize_by:
      Select how to resize frames - 'none', 'height', or 'width'.
      size:
      Target size if resizing by height or width.
      selecting "none" is the easiest choice. But you can select by WIDTH or by HEIGHT and then type in the corresponding value.

    • @creatorbrew
      @creatorbrew  Před 3 měsíci

      @@Nibot2023 Did this answer what you are asking? Did you try this first to do the experiment first hand?

    • @creatorbrew
      @creatorbrew  Před 3 měsíci

      @023 The specific of only one dimension is because it is automatically calculating the other dimension to keep things proportional. A good place to start is always visiting the github page for a Node because the author usually has extra info: github.com/Nuked88/ComfyUI-N-Nodes
      You'll find the answer of:
      resize_by: Select how to resize frames - 'none', 'height', or 'width'.
      size: Target size if resizing by height or width.
      I know there are a lot of adjustments to get the tailored workflow for you, the same is true for everyone coming to any video. The best learning strategy is to watch a video, do exactly what is there first. Quickly. Then to try what you need to do. If that doesn't work, then with ComfyUI or Automatic 1111 searching the web for the "node" type you are using will lead to github where the authors usually have more documentation. Of course ask me (or any video maker); but sometimes the answers are also out on git. I hope this helps you.

    • @Nibot2023
      @Nibot2023 Před 3 měsíci

      @@creatorbrew Thanks for taking the time to respond. I will check out the link that you sent. I am just trying different things and push things to see different results.

  • @gibsonl
    @gibsonl Před 4 měsíci

    Upload upload video input not working

    • @creatorbrew
      @creatorbrew  Před 4 měsíci

      Are you using this Node for loading video?
      github.com/Nuked88/ComfyUI-N-Nodes
      if it isn't working at all, it has a conflict with AnimDiff (disable that and try). Make sure to restart Comfyui after installing or after disabling.

    • @gibsonl
      @gibsonl Před 4 měsíci +1

      @@creatorbrew now showing input 👍

  • @ehsankholghi
    @ehsankholghi Před 4 měsíci

    UR GPU?

    • @creatorbrew
      @creatorbrew  Před 4 měsíci

      RTX 2060, RTX 4050 and RTX 4080

    • @ehsankholghi
      @ehsankholghi Před 4 měsíci

      @@creatorbrew i wanna start using a.i like SD.which one should i go? 3090 4060ti 16 or 4080?

  • @Thomas_Leo
    @Thomas_Leo Před 4 měsíci +2

    Doesn't work. You skipped too many steps in the tutorial which makes it impossible to follow you.

    • @creatorbrew
      @creatorbrew  Před 4 měsíci

      There are 4 nodes in this whole workflow, you can see them here: czcams.com/video/QOWbm4IgvFM/video.htmlsi=zDnjXH2VO7BMkYgH&t=146 and you can download the workflow here without doing anything: github.com/creatorbrew/workflows/blob/main/video_face_swap.png So exactly what issue are you having?
      1. Have you loaded the required nodes? (load the workflow and then go to the Manager and click Install Missing Nodes) 2. Downloaded the models 3. Have an up-to-date version of ComfyUI 4. Restarted ComfyUi after doing 1, 2, & 3.What exactly is your issues and what steps have you taken so far? Thanks.