+
    hi              
         ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIHtHtH	t	H
t
 ^ RIHtHtHtHt ^ RIHtHt ^ RIHt ]! ]4      P-                  4       P.                  ^,          t]R,          R	,          t]R
,          R,          R,          t]P7                  RRR7       ^ RIHt ]R,          t]P?                  4       '       g%   ]P@                  ! RR.R/R7      PC                  ]4       Rt"Rt#. t$R t%]"'       d   ]! R]"RRRR7      t&]%! R]&]R4       M]$PO                  RRRRRRRR/4       ]! RRRRR 7      t&]%! R!]&]R"4       ]! ](! ]4      RRRRR#7      t&]%! R$]&]	R%4       ]"'       d   ]! R&]"/.RRRRR'7      t&]%! R(]&]
R)4       M]$PO                  RR(RR)RRRR*/4       ]PS                  ]PT                  ! R+]$/R,^R-7      4       ]+! ](! ]4      4       R# )0    )annotationsN)Path)create_omni_videocreate_text_to_videocreate_image_to_videocreate_reference_to_video)build_omni_first_frame_payloadbuild_text2video_payloadbuild_image2video_payloadbuild_reference2video_payload)KlingClientKlingClientError)KlingConfigoutputsz#phase3_expanded_minset_results.jsonsamplesz	kling-apizprobe-assetsT)parentsexist_ok)Imagezprobe_512.pngRGB)colorc           
        R V RVRV/p V! VRV  R\        \        P                  ! 4       4       2R7      pRVR&   VR,          VR&   \        P                  V4       R#   \         da   pR	TR&   \        T4      TR
&   \	        T\
        4      '       d.   TP                  TR&   TP                  TR&   TP                  TR&    Rp?L}Rp?ii ; i)nameendpointpayloadzphase3--)external_task_idTokresponseFerrorcategorystatus_coderesponse_bodyN)inttime	Exceptionstr
isinstancer   r    r!   r"   runsappend)r   r   fnr   itemreses   &&&&   %scripts/run_phase3_expanded_minset.pyrecordr/      s    D*h	7CD
4WTF!C		<L;M+NOT
z?Z 	KK  4T
AWa)** zzD"#--D$%OOD!4s   =A C	)ACC	zSA calm woman looks at the camera and slowly smiles, natural motion, clean lighting.5stdz16:9)prompt	image_urldurationmodeaspect_ratioomni_baselineomnir   r   skippedreasonzKno remote_image_url available for image_url-based Omni first-frame baseline)r2   r4   r5   r6   text2video_minimal
text2video)imager2   r4   r5   r6   image2video_minimalimage2videor3   )
image_listr2   r4   r5   r6   reference2video_minimalreference2videoz?no remote_image_url available for reference image_list baseliner(   F)ensure_asciiindent)   rE   )   x   Z   ),
__future__r   jsonr$   pathlibr   scripts.kling_tasksr   r   r   r   scripts.buildersr	   r
   r   r   scripts.kling_clientr   r   configs.klingr   __file__resolver   ROOTOUTASSETSmkdirPILr   img_pathexistsnewsaveremote_image_urlremote_video_urlr(   r/   r   r)   r&   
write_textdumpsprint     r.   <module>rb      s?   "   y y P  P > %H~''*
Y>>			K	'.	8 TD ) O#	IIeZ~6;;HE   	  ,  5J  Vf  qt  {@  OU  VG
?G%6?KK
6)D  S`  a  b #*  KN  UZ  io  p W&:L I $#h-  AV  ad  kp  E  F g'<m L +FV8W7X  bw  BE  LQ  `f  gG
$g/HJ[\KK1*=NyY]^f  hi  j  k tzz64.uQG H c#hra   