@@ -250,7 +250,7 @@ def __call__(
250250
251251 # Stage Sync 1: Phase A Complete
252252 multihost_utils .sync_global_devices ("phase_a_complete" )
253- max_logging . log (f"{ host_prefix } Passed Phase A Sync Barrier (phase_a_complete) successfully! ✅" , flush = True )
253+ print (f"{ host_prefix } Passed Phase A Sync Barrier (phase_a_complete) successfully! ✅" , flush = True )
254254
255255 # Shard pipeline batch inputs across data axis ("data") for SPMD multi-host execution
256256 data_sharding = jax .sharding .NamedSharding (self .mesh , P ("data" ))
@@ -267,7 +267,7 @@ def put_data_on_devices(x, sharding):
267267 txt_ids_val = put_data_on_devices (txt_ids_val , data_sharding )
268268 img_ids_val = put_data_on_devices (img_ids_val , data_sharding )
269269
270- max_logging . log (
270+ print (
271271 f"{ host_prefix } DIAGNOSTIC TENSORS BEFORE PHASE B:\n "
272272 f" latents_jax: shape={ latents_jax .shape } , dtype={ latents_jax .dtype } , sharding={ getattr (latents_jax , 'sharding' , None )} \n "
273273 f" prompt_embeds_jax: shape={ prompt_embeds_jax .shape } , dtype={ prompt_embeds_jax .dtype } , sharding={ getattr (prompt_embeds_jax , 'sharding' , None )} \n "
@@ -278,12 +278,12 @@ def put_data_on_devices(x, sharding):
278278
279279 # Stage Sync 2: Pre-Phase B Start
280280 multihost_utils .sync_global_devices ("pre_phase_b_start" )
281- max_logging . log (f"{ host_prefix } Passed Pre-Phase B Sync Barrier (pre_phase_b_start) successfully! ✅" , flush = True )
281+ print (f"{ host_prefix } Passed Pre-Phase B Sync Barrier (pre_phase_b_start) successfully! ✅" , flush = True )
282282
283283 # ---------------------------------------------------------------------
284284 # PHASE B: Denoising Loop (Flux Transformer - Fused JAX fori_loop)
285285 # ---------------------------------------------------------------------
286- max_logging . log (
286+ print (
287287 f"{ host_prefix } [PHASE B] Running { num_inference_steps } -step E2E Denoising Loop on a batch of { batch_size } images..." ,
288288 flush = True ,
289289 )
@@ -326,7 +326,7 @@ def step_fn(step_idx, current_latents):
326326 )
327327 latents_jax .block_until_ready ()
328328 except Exception as e :
329- max_logging . log (f"❌ { host_prefix } EXCEPTION IN DENOISE LOOP: { e } " , flush = True )
329+ print (f"❌ { host_prefix } EXCEPTION IN DENOISE LOOP: { e } " , flush = True )
330330 import traceback
331331
332332 traceback .print_exc ()
@@ -335,7 +335,7 @@ def step_fn(step_idx, current_latents):
335335
336336 # Stage Sync 3: Phase B Complete
337337 multihost_utils .sync_global_devices ("phase_b_complete" )
338- max_logging . log (f"{ host_prefix } Passed Phase B Sync Barrier (phase_b_complete) successfully! ✅" , flush = True )
338+ print (f"{ host_prefix } Passed Phase B Sync Barrier (phase_b_complete) successfully! ✅" , flush = True )
339339
340340 trace ["denoise_loop" ] = time .perf_counter () - t0
341341 max_logging .log (f" -> [TIMING] Denoising Loop (Flux): { trace ['denoise_loop' ]:.4f} seconds ⏱️" )
0 commit comments