Update app.py
Browse files137 unmodified lines138139140141141143142143144145146147148147148149150151152153154155156157158159160161162163164165166167168137 unmodified lines try: import torch from diffusers import ComponentsManager
from h3_split_blocks import MiniMaxH3GeneratorBlocks
lower_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") 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 transformer from huggingface_hub import hf_hub_download from safetensors.torch import load_model finetune_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 GPUapp.py+20-4