Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files118 unmodified lines11912012112212312429 unmodified lines15415515615715815916042 unmodified lines203204205206118 unmodified linesnum_latents = _latent_frames(float(seconds), mode)t0 = time.perf_counter()pipe.kv_cache1 = None # fresh caches for every requesttorch.manual_seed(seed)noise = torch.randn([1, num_latents, 16, 60, 104], device="cuda", dtype=torch.bfloat16)29 unmodified lines.dark .gradio-container { color: var(--body-text-color); }"""with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:with gr.Column(elem_id="col-container"):gr.Markdown("# Self Gradient Forcing Plus (SGF+)\n"42 unmodified lines)if __name__ == "__main__":demo.launch(mcp_server=True)118 unmodified lines11912012112212312412512612729 unmodified lines15715815916016116216342 unmodified lines206207208209118 unmodified linesnum_latents = _latent_frames(float(seconds), mode)t0 = time.perf_counter()free, total = torch.cuda.mem_get_info()print(f"[SGF+] GPU {torch.cuda.get_device_name()} free={free/2**30:.1f}G total={total/2**30:.1f}G "f"allocated={torch.cuda.memory_allocated()/2**30:.1f}G")pipe.kv_cache1 = None # fresh caches for every requesttorch.manual_seed(seed)noise = torch.randn([1, num_latents, 16, 60, 104], device="cuda", dtype=torch.bfloat16)29 unmodified lines.dark .gradio-container { color: var(--body-text-color); }"""with gr.Blocks() as demo:with gr.Column(elem_id="col-container"):gr.Markdown("# Self Gradient Forcing Plus (SGF+)\n"42 unmodified lines)if __name__ == "__main__":demo.launch(mcp_server=True, theme=gr.themes.Citrus(), css=CSS)
app.py+5-2