Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Auto Swap for videos as well #24

Open
wants to merge 66 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
6662f72
sort videos and faces lists alphanumerically
JaredTherriault Oct 2, 2024
de19ead
fix scrollwheel behaviour for linux and mac, allow scrolling paramete…
JaredTherriault Oct 2, 2024
505ecd5
Stop playback when attempting to jump frames via button or mouse wheel
JaredTherriault Oct 3, 2024
34b445d
Fix mouse wheel seeking on timeline for Unix
JaredTherriault Oct 3, 2024
40147f8
add avg fps entry so users can find the best settings for realtime pl…
JaredTherriault Oct 3, 2024
4120146
Merge pull request #6 from JaredTherriault/sort-videos-and-faces-lists
JaredTherriault Oct 4, 2024
4c44154
Merge pull request #7 from JaredTherriault/fix-unix-scrollwheel
JaredTherriault Oct 4, 2024
1c686f1
Merge pull request #8 from JaredTherriault/fix-unix-mouse-wheel-seeking
JaredTherriault Oct 4, 2024
e0d7d30
Merge pull request #9 from JaredTherriault/stop-playback-before-jumpi…
JaredTherriault Oct 4, 2024
bc41d04
Merge pull request #10 from JaredTherriault/add-avg-fps-entry
JaredTherriault Oct 4, 2024
66d0f26
Fix divide by zero issue
JaredTherriault Oct 4, 2024
7f93ee8
Merge pull request #11 from JaredTherriault/add-avg-fps-entry
JaredTherriault Oct 4, 2024
51c7694
Clamp values when creating restore mouth mask to ensure offsets don't…
JaredTherriault Oct 6, 2024
a733c32
Merge pull request #12 from JaredTherriault/fix-mouth-restore-offset-…
JaredTherriault Oct 6, 2024
f8c21c5
Parameterize history limit
JaredTherriault Oct 6, 2024
8c3580a
Merge pull request #13 from JaredTherriault/add-avg-fps-entry
JaredTherriault Oct 6, 2024
947c767
Add tooltip for video tiles with untruncated filename
JaredTherriault Oct 12, 2024
cbe0201
Update GUI.py
JaredTherriault Oct 19, 2024
bbc0940
Add tooltip for video tiles with untruncated filename
JaredTherriault Oct 12, 2024
d1bffa8
Merge branch 'dev-merge' into add-video-tooltips
JaredTherriault Oct 19, 2024
76e4f89
Merge pull request #14 from JaredTherriault/add-video-tooltips
JaredTherriault Oct 19, 2024
ffc9280
Update VideoManager.py
JaredTherriault Oct 19, 2024
3941320
Merge pull request #15 from JaredTherriault/fix-thread-time-list-floa…
JaredTherriault Oct 19, 2024
cbab52c
Merge pull request #16 from JaredTherriault/3x_source_faces_rows
JaredTherriault Oct 19, 2024
bad70a8
Use ffmpeg to extract interp frames
JaredTherriault Oct 21, 2024
427ad5f
Implement frame skip
JaredTherriault Oct 21, 2024
91e8c10
Fix frame skipping
JaredTherriault Oct 21, 2024
db8540f
Implement auto frame skip (draft)
JaredTherriault Oct 22, 2024
b42019a
Improve frame drop detection, add UI controls
JaredTherriault Oct 23, 2024
66b3345
Merge branch 'dev-merge' into arbitrary-playback-fps
JaredTherriault Oct 23, 2024
4ab97d7
Merge pull request #17 from JaredTherriault/arbitrary-playback-fps
JaredTherriault Oct 23, 2024
60b9414
Add resolution override option to resize the frame to a given height …
JaredTherriault Oct 24, 2024
5681798
Merge branch 'dev-merge' into display-resolution-options
JaredTherriault Oct 24, 2024
be2f12f
Merge pull request #18 from JaredTherriault/display-resolution-options
JaredTherriault Oct 24, 2024
b580db6
Add followlinks=True to os.walk calls
JaredTherriault Oct 24, 2024
7491dd1
Merge pull request #19 from JaredTherriault/load-symbolic-link-folders
JaredTherriault Oct 24, 2024
4428b6c
Parallelize loading of input videos
JaredTherriault Oct 24, 2024
1d6244f
Merge pull request #20 from JaredTherriault/optimize-input-media-loading
JaredTherriault Oct 24, 2024
2204929
Expose Auto Swap for videos as well
JaredTherriault Oct 24, 2024
c62998e
Merge pull request #21 from JaredTherriault/expose-auto-swap-to-videos
JaredTherriault Oct 24, 2024
5f62dc8
Add 'locking' mechanism for source faces and embeddings (Alt+click_
JaredTherriault Oct 25, 2024
9c5e953
Merge pull request #22 from JaredTherriault/lock-source-faces
JaredTherriault Oct 25, 2024
d50e432
Support for gif videos and still image webp. gif, bmp, etc
JaredTherriault Nov 3, 2024
e744a10
Add support for animated webp (maybe others)
JaredTherriault Nov 4, 2024
a9e0680
Merge branch 'dev-merge' into support-motion-images
JaredTherriault Nov 4, 2024
33eac37
Merge pull request #23 from JaredTherriault/support-motion-images
JaredTherriault Nov 4, 2024
c402961
Fix color space issue after merge
JaredTherriault Nov 4, 2024
f917e66
Support PIL during frame skip
JaredTherriault Nov 4, 2024
5e32be4
Force OpenCV output to mp4 format when recording with an animated ima…
JaredTherriault Nov 4, 2024
b71e46b
Add loop play button for continuous playback
JaredTherriault Nov 4, 2024
8c9013e
Add loop play button for continuous playback
JaredTherriault Nov 4, 2024
94af8cc
Update VideoManager.py
JaredTherriault Nov 4, 2024
9d86ada
Revert "Add loop play button for continuous playback"
JaredTherriault Nov 4, 2024
367fd59
Merge branch 'dev-merge' into add-loop-playback
JaredTherriault Nov 4, 2024
1d163b5
Merge pull request #24 from JaredTherriault/add-loop-playback
JaredTherriault Nov 4, 2024
48e7c4f
Add hotkey for auto swap
JaredTherriault Nov 4, 2024
e6631e0
Discard aplha channel when finding faces, make error message more clear
JaredTherriault Nov 4, 2024
e703322
Set title text to reflect currently loaded media
JaredTherriault Nov 4, 2024
8a49ca3
Stop currently playing video when switching media, set timeline frame…
JaredTherriault Nov 4, 2024
2dec598
Just make the image controls toolbar always visible even with videos
JaredTherriault Nov 4, 2024
ea4765f
Move image controls into its own toolbar right about found faces
JaredTherriault Nov 4, 2024
da00c08
Revamp auto swap, and same and random auto swap options via text sel
JaredTherriault Nov 5, 2024
d804309
Externalize ButtonState check responsibility
JaredTherriault Nov 5, 2024
3afd1f7
Merge branch 'dev-merge' into expose-auto-swap-to-videos
JaredTherriault Nov 5, 2024
56aae9f
Remove unnecessary print
JaredTherriault Nov 5, 2024
3d57ad1
Fix autoplay for auto swap modes
JaredTherriault Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions rope/Dicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
'AudioInfoText': 'ENABLE REAL-TIME AUDIO:\nAdds audio from the input video during preview playback. If you are unable to maintain the input video frame rate, the audio will lag.',
'AudioState': False,
'AudioText': 'Enable Audio',
'AutoSwapState': False,
'ClearFacesDisplay': 'text',
'ClearFacesIcon': './rope/media/tarfacedel.png',
'ClearFacesIconHover': './rope/media/rec.png',
Expand Down Expand Up @@ -117,6 +116,12 @@
'RecordIconOn': './rope/media/rec_on.png',
'RecordInfoText': 'RECORD:\nArms the PLAY button for recording. Press RECORD, then PLAY to record. Press PLAY again to stop recording.',
'RecordState': False,
'LoopDisplay': 'icon',
'LoopIconHover': './rope/media/loop_hover.png',
'LoopIconOff': './rope/media/loop_off.png',
'LoopIconOn': './rope/media/loop_on.png',
'LoopInfoText': 'LOOP:\nRestarts the video from the beginning instead of stopping when the timeline reaches the end for continuous playback.',
'LoopState': False,
'SaveImageState': False,
'SaveParamsButtonDisplay': 'text',
'SaveParamsButtonInfoText': 'SAVE PARAMETERS:\nSaves all parameters in this column.',
Expand Down Expand Up @@ -165,10 +170,9 @@
'SaveImageButtonState': False,
'SaveImageButtonText': 'Save Image',

'AutoSwapButtonDisplay': 'text',
'AutoSwapButtonInfoText': 'AUTOSWAP:\nAutomatcially applies your currently selected Input Face to new images.',
'AutoSwapButtonState': False,
'AutoSwapButtonText': 'Auto Swap',
'AutoSwapTextSelInfoText': 'AUTOSWAP:\nAutomatcially applies your currently selected Input Face to new images.\nSAME: Use the same input faces\nRANDOM: Randomize input faces (locked faces not affected)',
'AutoSwapTextSelMode': 'off',
'AutoSwapTextSelModes': ['off', 'same', 'random'],

'ClearVramButtonDisplay': 'text',
'ClearVramButtonInfoText': 'CLEAR VRAM:\nClears models from your VRAM.',
Expand Down Expand Up @@ -249,6 +253,9 @@
'VirtualCameraSwitchState': False,
'VirtualCameraSwitchInfoText': 'VIRTUAL CAMERA:\nFeed the swapped video output to virtual camera for using in external applications',

'ResolutionOverrideSwitchState': False,
'ResolutionOverrideSwitchInfoText': 'OVERRIDE RESOLUTION:\nPlayback and recording will be downsampled to the specified height while maintaining aspect ratio. May help performance. Does not upsample.',

'RestoreEyesSwitchInfoText': 'RESTORE EYES: \nRestore eyes from the original face',
'RestoreEyesSwitchState': False,
'RestoreMouthSwitchInfoText': 'RESTORE MOUTH: \nRestore mouth from the original face',
Expand Down Expand Up @@ -610,6 +617,11 @@
'OrientSliderInfoText': 'ORIENTATION ANGLE:\nSet this to the angle of the input face angle to help with laying down/upside down/etc. Angles are read clockwise.',
'OrientSliderMax': 270,
'OrientSliderMin': 0,
'HeightOverrideSliderAmount': 480,
'HeightOverrideSliderInc': 60,
'HeightOverrideSliderInfoText': 'HEIGHT:\nSpecifies a height at which the video should be downsampled in playback and recording.',
'HeightOverrideSliderMax': 2160,
'HeightOverrideSliderMin': 120,
'RestorerSliderAmount': 100,
'RestorerSliderInc': 5,
'RestorerSliderInfoText': 'RESTORER AMOUNT:\nBlends the Restored results back into the original swap.',
Expand Down Expand Up @@ -791,6 +803,17 @@
'SwapperTypeTextSelMode': '128',
'SwapperTypeTextSelModes': ['128', '256', '512'],

# Frame skip
'FrameSkipModeTextSelInfoText': 'FRAME SKIP MODE:\nAllow video playback to skip frames. Does not affect recording.\nMANUAL: Set a constant skip rate.\nAUTO: Allow Rope to set the number of frames to skip based on the video playback speed, trying to maintain the original timing.',
'FrameSkipModeTextSelMode': 'none',
'FrameSkipModeTextSelModes': ['none', 'manual', 'auto'],

'FramesToSkipInfoText': 'FRAMES TO SKIP (MANUAL): How many frames to explicitly skip when set to "manual". Has no effect otherwise.',
'FramesToSkipAmount': 1,
'FramesToSkipInc': 1,
'FramesToSkipMin': 1,
'FramesToSkipMax': 10,
#
# Text Entry
'CLIPTextEntry': '',
'CLIPTextEntryInfoText': 'TEXT MASKING ENTRY:\nTo use, type a word(s) in the box separated by commas and press <enter>.',
Expand Down Expand Up @@ -938,7 +961,6 @@
'ClearmemFunction': 'self.clear_mem()',
'PerfTestFunction': 'self.toggle_perf_test()',
'ImgVidFunction': 'self.toggle_vid_img()',
'AutoSwapFunction': 'self.toggle_auto_swap()',
'SaveImageFunction': 'self.save_image()',

'ClearmemIcon': './rope/media/clear_mem.png',
Expand Down Expand Up @@ -966,7 +988,6 @@

'ImgVidMessage': 'IMAGE/VIDEO - Toggle between Image and Video folder view.',
'ToggleStopMessage': 'STOP MARKER - Sets a frame that will stop the video playing/recording.',
'AutoSwapMessage': 'AUTO SWAP - Automatically swaps the first person in an image to the selcted source faces [LB: Turn on/off]',
'SaveImageMessage': 'SAVE IMAGE - Save image to output folder',
'ClearmemMessage': 'CLEAR VRAM - Clears all models from VRAM [LB: Clear]',
'PerfTestMessage': 'PERFORMANCE DATA - Displays timing data in the console for critical Rope functions. [LB: on/off]',
Expand Down
Loading