Skip to content

Commit

Permalink
Rope-Opal-02
Browse files Browse the repository at this point in the history
- (feature) Auto-pads input faces to increase the chance of detection
- (feature) Update console messages for more information
- (feature) Reimplimented images
- (fixed) Adressed error with Reference detection alignment in Restorer
- (feature) Added a VRAM monitor
- (feature) Reimplemented the VRAM clear
  • Loading branch information
Hillobar authored Feb 17, 2024
1 parent d285d1a commit 58f5b15
Show file tree
Hide file tree
Showing 6 changed files with 338 additions and 241 deletions.
19 changes: 12 additions & 7 deletions rope/Coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
from rope.external.clipseg import CLIPDensePredT

resize_delay = 1
mem_delay = 1

# @profile
def coordinator():
global gui, vm, action, frame, r_frame, load_notice, resize_delay
global gui, vm, action, frame, r_frame, load_notice, resize_delay, mem_delay
# start = time.time()


Expand Down Expand Up @@ -48,10 +49,10 @@ def coordinator():
vm.play_video(action[0][1])
action.pop(0)
elif action[0][0] == "get_requested_video_frame":
vm.get_requested_video_frame(action[0][1])
vm.get_requested_video_frame(action[0][1], marker=False)
action.pop(0)
elif action[0][0] == "get_requested_video_frame_without_markers":
vm.get_requested_video_frame_parameters(action[0][1])
vm.get_requested_video_frame(action[0][1], marker=False)
action.pop(0)
elif action[0][0] == "get_requested_image":
vm.get_requested_image()
Expand Down Expand Up @@ -110,9 +111,7 @@ def coordinator():
gui.set_video_slider_length(action[0][1])
action.pop(0)

elif action[0][0] == "send_msg":
gui.set_status(action[0][1])
action.pop(0)


else:
print("Action not found: "+action[0][0]+" "+str(action[0][1]))
Expand All @@ -127,6 +126,12 @@ def coordinator():
else:
resize_delay +=1

if mem_delay > 1000:
gui.update_vram_indicator()
mem_delay = 0
else:
mem_delay +=1

vm.process()
gui.after(1, coordinator)
# print(time.time() - start)
Expand All @@ -149,7 +154,7 @@ def load_clip_model():


def run():
global gui, vm, action, frame, r_frame, resize_delay
global gui, vm, action, frame, r_frame, resize_delay, mem_delay

models = Models.Models()
gui = GUI.GUI(models)
Expand Down
17 changes: 16 additions & 1 deletion rope/Dicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,22 @@
'TLRightIconOn': './rope/media/tl_right_on.png',
'TLRightInfoText': 'TIMELEFT NUDGE RIGHT:\nMove the timeline handle to the RIGHT 30 frames.',
'TLRightState': False,


'SaveImageButtonDisplay': 'text',
'SaveImageButtonInfoText': 'TIMELEFT NUDGE RIGHT:\nMove the timeline handle to the RIGHT 30 frames.',
'SaveImageButtonState': False,
'SaveImageButtonText': 'Save Image',

'AutoSwapButtonDisplay': 'text',
'AutoSwapButtonInfoText': 'TIMELEFT NUDGE RIGHT:\nMove the timeline handle to the RIGHT 30 frames.',
'AutoSwapButtonState': False,
'AutoSwapButtonText': 'Auto Swap',

'ClearVramButtonDisplay': 'text',
'ClearVramButtonInfoText': 'TIMELEFT NUDGE RIGHT:\nMove the timeline handle to the RIGHT 30 frames.',
'ClearVramButtonState': False,
'ClearVramButtonText': 'Clear VRAM',

#Switches
'ColorSwitchInfoText': 'RGB ADJUSTMENT:\nFine-tune the RGB color values of the swap.',
'ColorSwitchState': False,
Expand Down
Loading

0 comments on commit 58f5b15

Please sign in to comment.