@@ -130,17 +130,9 @@ def configure_optical_flows(img, params, loss_augs):
130130 if params .animation_mode == "Video Source" :
131131 if params .flow_stabilization_weight == "" :
132132 params .flow_stabilization_weight = "0"
133- # optical_flows = [
134- # OpticalFlowLoss.TargetImage(
135- # f"optical flow stabilization (frame {-2**i}):{params.flow_stabilization_weight}",
136- # img.image_shape,
137- # )
138- # for i in range(params.flow_long_term_samples + 1)
139- # ]
140- optical_flows = []
133+ # if flow stabilization weight is 0, shouldn't this next block just get skipped?
134+
141135 for i in range (params .flow_long_term_samples + 1 ):
142- # prompt_str = f"optical flow stabilization (frame {-2**i}):{params.flow_stabilization_weight}"
143- # text, weight, stop, mask, pil_image = parse_subprompt(prompt_str)
144136 name = f"optical flow stabilization (frame { - 2 ** i } )"
145137 weight = params .flow_stabilization_weight
146138 comp = torch .zeros (1 , 1 , 1 , 1 ) # ,device=device)
@@ -153,10 +145,6 @@ def configure_optical_flows(img, params, loss_augs):
153145 optical_flow .set_enabled (False )
154146 loss_augs .append (optical_flow )
155147
156- ##################################
157- # for optical_flow in optical_flows:
158- # optical_flow.set_enabled(False)
159- # loss_augs.extend(optical_flows)
160148 elif params .animation_mode == "3D" and params .flow_stabilization_weight not in [
161149 "0" ,
162150 "" ,
0 commit comments