-
Notifications
You must be signed in to change notification settings - Fork 738
Home
Note: It's only configured for CUDA (Nvidia)
- Copy Github files to a local directory
- Navigate to the Rope main directory (you will see requirements.txt, Rope.bat, Rope.py, and folders)
- Right click and select 'Open in Terminal' (or open CMD and navigate there)
- Set up a local venv
- python.exe -m venv venv
- Activate your new venv
- .\venv\Scripts\activate
- Install requirements
- .\venv\Scripts\pip.exe install -r .\requirements.txt
- Download the models from here. Either download the models file, which has all of the model files in it, or just grab the ones you missing in the list.
- Unzip models.zip and place the all of the model files into the models\ folder
- Do this if you've never installed roop or Rope (or any other onnx runtimes):
- Install FFMPEG
- Install CUDA Toolkit 11.8
- Install cuDNN v8.5 for CUDA 11.x from here
- Double-click on Rope.bat!
- First time use:
- Select your Source Faces Folder
- Select your Target Videos Folder
- Select your Output Folder
- Click Load Folders
- Subsequent uses
- Click Load Folders. 1, 2, and 3 will be remembered from the last time Rope was used.
- Models are now only loaded when you initialize them the first time. GFPGAN, CLIP, Occluder, and Mouth Parser are not loaded into memory until you click them. If you have lower memory, you should be able to now run more threads if you don't enable them.
- Select a Target Video (mousewheel scroll the Target Videos)
- Move to a video frame with faces in it and click Find
- Select a found Target Faces (mousewheel scroll the Target Faces)
- Select a Source Face (hold shift to select multiple Source Faces), (mousewheel scroll the Source Faces), (mousewheel scroll in the Video Player to iterate through the Source Faces)
- Click Swap
- Create
- Select a Source Face (hold shift to select multiple Source Faces)
- Type in a name, hit enter
- Delete
- Select a Source Face Shortcut
- Click Delete
- Arm/Disarm Record
- Play. If Record is armed, then it will record and save to the Output folder
- Press Play again to stop Playing or Recording
- Select multiple Source Faces by holding down shift
- Selecting multiple, different images of the same person can improve likeness.
- Selecting different people will create an average of the selected faces
- Increases the resolution of the Face
- Left click to toggle on/off. Right Click to toggle GFPGAN or Codeformer. Scroll the mousewheel to change the strength (0% = off, 100% = full strength)
- Allows areas of the Target Face to show where the Target Face and swapped face are similar
- Click to toggle on/off. Scroll the mousewheel to change the threshhold (0% = very strict, 100% = no restrictions)
- Lowers and Raises the mask boundary at the forehead
- Scroll the mousewheel to lower and raise the position (0% = boundary at top, 100% = boundary in the middle of the face)
- Sets the amount of blur for the Top Mask (and consequently Side Masks)
- Scroll the mousewheel to change the strength (0% = no blur, 100% = high blur)
- Create masks based on text input
- Enter text in field separated by commas. E.g., cup,hand
- Click on CLIP button to toggle on/off
- Scroll the mouse wheel to adjust word strength (higher is stronger)
- Creates a mask of any objects that occlude the face. Good for auto masking hair. Not good for profile.
- Click to toggle
- Creates a mask around the mouth from the original face and the swapped face. Good for talking. Not good for preserving likeness.
- Click to toggle
- Used by the swapper to determine if the Target Face matches any faces in the frame.
- Scroll the mousewheel to change the strength (85% default, lower is stricter, higher is less restrictive). If you are swapping two or more different Target Faces and they sometimes switch around, lower the value until they are applying correctly. Click the button to toggle applying to all faces.
- Sets the amount of blur for all of the masks
- Scroll the mousewheel to change the strength (0% = no blur, 100% = high blur)
- Finds all faces in the current frame
- Click to find faces
- Clears all Target Faces
- Click to clear faces
- Swap all Target Faces with their assigned Source Faces
- Click to toggle Swapping on/off
- Selects the Source Face Folder
- Click to open the file dialogue. Will automatically load the Source Faces once selected.
- Text field to name Source Face Shortcut
- Select Source Face (select multiple with shift). Once highlighted, name them in this text field and hit enter. The new Source Face Shortcut will be added to the Source Faces
- Deletes the selected Source Face Shortcut
- Select a Source Face Shortcut. Click the button to delete.
- Selects the Target Videos Folder
- Click to open the file dialogue. Will automatically load the Target Videos once selected.
- Loads up all the necessary data to start swapping
- Click to load. Loads in Target Videos, Source Faces, and the Swapper model
Note: Please check the wiki for installation and link to the new models file
- Images! In addition to videos, use Rope to swap images. Seamlessly integrated into the current interface.
- Timeline markers. Add markers to the timeline that capture the current settings at a specific frame. When playing back or recording, markers control the options when the frame is reached. Add as many markers as you need!
- Iterations. Apply the swapper model multiple times to a face. It seems to increase likeliness if used carefully.
- Orientation. Sometimes faces are at a bad orientation, like laying down or upside-down. The face detector has problems with this, so Rope now has an option to tell the detector which way the face is oriented. It is also markerable, so you can set markers for it per frame!
- Tool tips on (almost) everything. Tips are in the bottom pane.
- Bug fixes and refactoring
- (fixed) saving the same image multiple times in a row overwrites it. the time is appended when the image is loaded, not saved, so the time is always the same
- (fixed) cf is returning weird colors, similar to when the rgm bgr stuff was messed up. try swapping rgp before netering cf
- (fixed) GFPGAN fp16 might be causing too much harm (going back to original)
- (fixed) the orientation feature might not be unorienting
- (fixed) bug (I hope :D) : When clicking on a registered face name (the one of the left) to swap, on the previous version, clicking back to the same face name would delete the choice and unswap the face. Now it's just blocked and I can't "unswap" (unselect) the face. I'm force to select a face or just close and restart the soft.
- (fixed) update text for all the parser features
- (fixed) "Switch from one timeline marker to another doesn't properly show the correct features configured. Switch to the next frame (and back the previous one is working too) will fix it and show the correct configuration actually configured on the frame."
- (fixed) update mask tooltip
- (fixed) Btw accidentially scrolling Strength below 100% crashed Rope now the third time when CF is enabled. Haven't seen this with GFPGAN yet. I can screenshot the console error if that helps...
- (new) Added Mask view button, moved mask blur to button above mask view
- (new) MouthParser scrolls in negative direction to a)only mask the inside of the mouth, and b) grow the inside mouth mask as the amount increases
- (fixed) GFPGAN and Codeformer will give better results now, especially with details around the eyes and mouth.
- (fixed) in some cases, pixel values will be > 255
- (new) added undock button to image view
- (new) 'Strength' now has an on/off state
- (fixed) intermittent play bug
- (new) Click the mouse on the playback screen to control play/pause
- (new) Keyboard control with wasd and space
- (new) Stop Marker. Sets a frame that will stop the video playing/recording
-
(new) Added performance testing button. Turn on to report some stats in the console. Stats during threaded Play will be jumbled.
-
(fixed) Tooltip fixes
-
(fixed) Fixed bad Rope behavior when losing focus and returning
-
(fixed) Fixed crashing when using WASD on images
-
(fixed) GFPGAN and Codeformer are now working correctly. This required adding another detection model to these enhancers, so performance is slightly worse now using CF and GFPGAN but the quality is better.
-
(new) Rope can now undock and redock
-
(new) Rope will remember window positions and sizes between sessions, for both docked and undocked views
-
(fixed) Fixed multiple embedding selection bug
-
(fixed) Recording with one thread works again
-
(fixed) CV_64F error related to passing float64 to opencv
-
(fixed) Indexerror error related to differences in detection performance between resnet50 and Retinaface
Fun Stuff:
- Added mousewheel function to Mouth Parser to adjust the size of the mask
- Added Codeformer as an enhancer option. Codeformer does a noticeably better job with skin textures, but runs slower. Right-click on the button to toggle Codeformer or GFPGAN. Note: Codeformer takes 15-30 secondfs to load the first time.
Boring Stuff:
- Mouth Parser and Occluder now use onnxruntime instead of PyTorch. Hopefully this will solve issues with AMD cpu users
- InsightFace libraries have been removed as a dependency
- Dependencies have been updated and aligned
- Performance increase
- Swapping is now automatically toggled off when dragging the timeline slider. this is to make it more responsive. It will automatically toggle the swap back on once you stop dragging if you had swap on to begin with.
Bug Fixes:
- Fixed bug when dragging the Video timeline. It can now be moved when playing
- Fixed several remaining bugs with recording
- Fixed right click behavior on the video player slider
- New, slightly improved GUI
- Merged Source Faces. Select multiple Source Faces to create an average Source Face result. Combine different people to create a blend, or select the same person from different Source Faces to improve the likeness of the person
- Source Faces Shortcuts to always have access to your favorite faces. Works with Merged Source Faces too!
- Improvements to layout for workflow efficiency
- Improvements to Target/Source Face selection for workflow efficiency
- Mousescroll on Target/Source Faces and Target Videos
- Much lower memory requirements (only 2.7GB if you don't enable GFPGAN, CLIP, etc.)
- Mouse scrolling in the video player cycles through the Source Faces for the selected Target Face. Quickly view your Source Faces against the Target Face!
- More speed improvements. Results below. I'll start tracking benchmarks for each release
- (experimental) Mouth parser. Another occlusion tool just for the mouth area. Improves dialogue and lip sync, but will replace the Source Face mouth.
- Bug fixes
- Updated video rendering to use Target Video parameters
- Mousewheel scroll on the time bar to control frame position
- Added an occluder model (experimental, very fast, make sure you download the new model-link below)
- Greatly increased performance for larger videos/multiple faces
- CLIP crashing fixed. Add as many words as you like!
- Detachable video preview
- Fixed most bugs related to changing options while playing. Adjust setting on the fly!
- GFPGAN now renders up to 512x512
- Status bar (still adding features to this)