Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files550 unmodified lines551552553554555556557558559560561562563564565566567568569570571572573574575576577578579550 unmodified linesvideo_chunks_number = get_video_chunks_number(num_frames, tiling_config)log_memory("before pipeline call")video, audio = pipeline(prompt=prompt,seed=current_seed,height=int(height),width=int(width),num_frames=num_frames,frame_rate=frame_rate,images=images,audio_path=input_audio,tiling_config=tiling_config,enhance_prompt=enhance_prompt,)except Exception as e:# If this looks like a CUDA / Triton / worker GPU init error, handle gracefully.msg = str(e).lower()if "no cuda" in msg or "cuda error" in msg or "triton" in msg or "no cuda-capable" in msg:print(f"[ERROR] GPU initialization failed during pipeline call: {type(e).__name__}: {e}")print("[ERROR] This environment reports CUDA availability but failed to initialize a GPU.")print("[SUGGESTION] Try running the Space on a GPU-enabled runner, or ensure CUDA drivers are installed.")# return None (failure) and the seed so the UI doesn't hang.return None, current_seed# Otherwise re-raise so other programming errors bubble upraiselog_memory("after pipeline call")550 unmodified lines551552553554555556557558559560561562563564565566567568569570571572573574575576577578550 unmodified linesvideo_chunks_number = get_video_chunks_number(num_frames, tiling_config)log_memory("before pipeline call")try:video, audio = pipeline(prompt=prompt,seed=current_seed,height=int(height),width=int(width),num_frames=num_frames,frame_rate=frame_rate,images=images,audio_path=input_audio,tiling_config=tiling_config,enhance_prompt=enhance_prompt,)except Exception as e:msg = str(e).lower()if "no cuda" in msg or "cuda error" in msg or "triton" in msg or "no cuda-capable" in msg:print(f"[ERROR] GPU initialization failed during pipeline call: {type(e).__name__}: {e}")print("[ERROR] This environment reports CUDA availability but failed to initialize a GPU.")return None, current_seedraiselog_memory("after pipeline call")
app.py+16-17