Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files294 unmodified lines295296297298299300301302303304294 unmodified linesadapter_name="styctrl",proj_type=PROJECTOR_TYPE,bias=False,checkpoint_path=_lora_path,device=torch.device("cuda"),dtype=_dtype,)activate(_transformer, "styctrl")# Pre-load projector states into CPU memory for fast interpolation294 unmodified lines295296297298299300301302303304305306307308309310294 unmodified linesadapter_name="styctrl",proj_type=PROJECTOR_TYPE,bias=False,device=torch.device("cuda"),dtype=_dtype,)# Load main LoRA weights (lora_A, lora_B) from checkpoint_lora_state = load_file(_lora_path, device="cuda")_lora_load_result = _transformer.load_state_dict(_lora_state, strict=False)if _lora_load_result.unexpected_keys:logger.warning("Unexpected keys in LoRA checkpoint: %s", _lora_load_result.unexpected_keys[:5])logger.info("LoRA loaded: %d tensors loaded, %d missing keys", len(_lora_state), len(_lora_load_result.missing_keys))activate(_transformer, "styctrl")# Pre-load projector states into CPU memory for fast interpolation
app.py+7-1