INNER CODE UNIT · Python

elapsed_time

OpenVGLab/OmniLottie · app.py:610

            elapsed_time = time.time() - start_time

            status = f"✅ Generated {len(generated_ids)} tokens | Layers: {len(lottie_json.get('layers', []))} | {lottie_json.get('fr', 8)} fps | Time: {elapsed_time:.1f}s"

            temp_path = save_json_to_temp(lottie_json)

            return html, status, temp_path

        except Exception as e:
            if torch.cuda.is_available():
                torch.cuda.empty_cache()
            if torch.xpu.is_available():
                torch.xpu.empty_cache()
            return None, f"❌ Error: {str(e)}", None

def load_image_from_file(file_path):

    ext = os.path.splitext(file_path)[1].lower()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…