From 354cf8195b1d984535d34a2ecb4e49d80950626d Mon Sep 17 00:00:00 2001 From: vikramxD Date: Mon, 23 Dec 2024 15:09:20 +0000 Subject: [PATCH] Refactor MochiVideoAPI initialization and update logging - Simplified the initialization of MochiSettings in the MochiVideoAPI class by removing specific parameters, allowing for default settings. - Enhanced logging in combined_api.log to include multiple server start entries, improving traceability of server activity. These changes aim to streamline the API initialization process and improve logging clarity for better monitoring of the video generation server. --- api/__pycache__/mochi_serve.cpython-310.pyc | Bin 8242 -> 11922 bytes api/logs/combined_api.log | 2 ++ api/mochi_serve.py | 7 +------ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/api/__pycache__/mochi_serve.cpython-310.pyc b/api/__pycache__/mochi_serve.cpython-310.pyc index 56c81530544d811762bd714e695f4445471eac8f..8e7c075e761c77d175056cc6dce229abea729a41 100644 GIT binary patch literal 11922 zcma)CO^h7Jb?)xzndzPV|K*ZeQcX#gJu-Jm{lrlgj6#b4fOfUvk`g?y(CMA3nQgMC zdsyAG!{_G%ul;v#YTAF%L-Awc;R=4yJzdk7*3g*F3}0{P z^519}^1sw5$$zt9;=kmVJC#PIQ*Bf`R>SIyG)6kLMop)8O@FjA))$6#+=L>{(NJ;(3j;ebWSx+bru_oozsoeoimLyvfYUP zQfH~LB=a@@Z0B6#oXn5=pMUTQ8^5gK|J8%n*w`~Y>ht-7 zuTW0c_^ExZ@j5?q@KydgJ>SyU1e^R+W0QR9!PoXnjXFxE*fdI}`2?Qd!1D~7#q%tm z#`D+N9Gm}CYh2*VY~i6H{)S)J*T9FdDS!1-?s`enYHMM0+p|CN7!U1RJmA8Oy)dvh zx!CcV+`hVTr&haaZ+q?S+=o|V)Y8@?0B2oisFu>*d9{sgpB)k zFYfdD zkDTC?$4wy*Z$ zu;a#@9q+s)!j2vDC$Zf{t{X?`E1PfI9ykZfQfwpx5bXJ}9f23O&C_-mXNN;Ny~xJD z@R||0_kG@^*U~n3c@*{pgxiZT%)X)+3%B_YJg050g+a?}_k_FU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v2+Ohek8sgo1kuj0&MZgIgu-vaY;BG)04W zo+O%_0131z;@MFD*=Oqg_WiJvu+!14ZWRK=bNPN+Q$I{hC!nWHq9nD2VWT_dcZHGg zDrPhY`j8~Uwefk89X>!N#oNQ_%z|0EZFmmgNiD#sYGOhRXPXaWRz_|vWIohpZbWPO zBTg5Sf+~wsBiX^v<%GXMy?=2>iM+E;c&qsK$UyHXW{5@@@}D$I5b&w?7!)f0FmiEy zTd3;FG7tshewP<%L}}_}+^4b^gOdfJ>SKs;Q9KTHVIBaEgzr$m-TuHih*}WMFn~E# z4_IQ{gy0Q}syMdG@|?gFo4dZ}lC#q!u|p!tSJ3Z?+UQ{E1wr`tvC>9^l;Tx1n9F$$ z3}6)Ib-iM8NHregF29S;J814TTZ9#1InpFvb0G12bnp#--;3bE!r4O>>TLIH`@x}uuN_f2dIPOkTsAGcSQP)w^pG{tbMW8f$09a90E`_Q|7BO^L^y>& zwwxfkV7hF2iu>ZP**j!ad^NYx@eLd##_XEK9hxpJlm=1Pqd*+^s95j;M{3CGsQp0URlA8hYB%Iipt5_GCnoa4S{>?C zNmE53KQIYu)k## None: Raises: RuntimeError: On initialization failure """ - self.settings = MochiSettings( - model_name="Mini-Mochi", - enable_vae_tiling=True, - enable_attention_slicing=True, - device=device - ) + self.settings = MochiSettings() logger.info("Initializing Mochi inference engine") self.engine = MochiInference(self.settings)