Update app.py
Browse files137 unmodified lines138139140141142143144145146147148149150151152137 unmodified linestry:import torchfrom diffusers import ComponentsManagerfrom h3_split_blocks import MiniMaxH3GeneratorBlockslower_duration_floor()manager = ComponentsManager()blocks = MiniMaxH3GeneratorBlocks()print(f"[gen] loading {[c.name for c in blocks.expected_components]} from {MODEL_REPO} ...", flush=True)pipe = blocks.init_pipeline(MODEL_REPO, components_manager=manager, collection="h3")pipe.load_components(dtype=torch.bfloat16)pipe.transformer.set_attention_backend(ATTENTION)# Still startup, still free: an AoTI package carries no weights and opens its archive lazily inside the GPU137 unmodified lines138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168137 unmodified linestry:import torchfrom diffusers import ComponentsManagerfrom h3_split_blocks import MiniMaxH3GeneratorBlockslower_duration_floor()manager = ComponentsManager()blocks = MiniMaxH3GeneratorBlocks()print(f"[gen] loading {[c.name for c in blocks.expected_components]} from {MODEL_REPO} ...",flush=True,)pipe = blocks.init_pipeline(MODEL_REPO,components_manager=manager,collection="h3",)pipe.load_components(dtype=torch.bfloat16)# Load TenStrip fine-tuned checkpoint into the transformerfrom huggingface_hub import hf_hub_downloadfrom safetensors.torch import load_modelfinetune_path = hf_hub_download(repo_id="TenStrip/10Eros-Max", filename="10Eros_Max_h3_fl2va_bf16_test1.safetensors")load_model(pipe.transformer, finetune_path, strict=False, device="cpu")pipe.transformer.to(torch.bfloat16)pipe.transformer.set_attention_backend(ATTENTION)# Still startup, still free: an AoTI package carries no weights and opens its archive lazily inside the GPU
app.py+20-4