Skip to content

Commit

Permalink
added missing stab augs, patched yaml turning "off" to False
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarx committed Apr 12, 2022
1 parent e1b1cba commit 520c29e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/pytti/LossAug/LossOrchestratorClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def configure_losses(self):
return (
self.loss_augs,
self.init_augs,
self.stabilization_augs,
self.optical_flows,
self.semantic_init_prompt,
self.last_frame_semantic,
Expand Down Expand Up @@ -220,6 +221,7 @@ def configure_stabilization_augs(self):
for k, v in d_augs.items()
if v
]
self.stabilization_augs = stabilization_augs
self.loss_augs.extend(stabilization_augs)

def configure_optical_flows(self):
Expand Down
9 changes: 8 additions & 1 deletion src/pytti/workhorse.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ def load_video_source(
def _main(cfg: DictConfig):
# params = OmegaConf.to_container(cfg, resolve=True)
params = cfg

# literal "off" in yaml interpreted as False
if params.animation_mode == False:
params.animation_mode = "off"

logger.debug(params)
logger.debug(OmegaConf.to_container(cfg, resolve=True))
latest = -1
Expand All @@ -188,7 +193,7 @@ def _main(cfg: DictConfig):

### Move these into default.yaml
# @markdown check `restore` to restore from a previous run
restore = params.get('restore') or False # @param{type:"boolean"}
restore = params.get("restore") or False # @param{type:"boolean"}
# @markdown check `reencode` if you are restoring with a modified image or modified image settings
reencode = False # @param{type:"boolean"}
# @markdown which run to restore
Expand Down Expand Up @@ -353,6 +358,7 @@ def do_run():
(
loss_augs,
init_augs,
stabilization_augs,
optical_flows,
semantic_init_prompt,
last_frame_semantic,
Expand Down Expand Up @@ -443,6 +449,7 @@ def do_run():
video_frames=video_frames,
# these can be passed in together as the loss orchestrator
optical_flows=optical_flows,
stabilization_augs=stabilization_augs,
last_frame_semantic=last_frame_semantic, # fml...
semantic_init_prompt=semantic_init_prompt,
init_augs=init_augs,
Expand Down

0 comments on commit 520c29e

Please sign in to comment.