multimodalart HF Staff commited on
Commit
9ef4bd6
·
verified ·
1 Parent(s): d2dbebc

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -282,7 +282,7 @@ logger.info("Base pipeline components loaded.")
282
  register_styctrl(
283
  model=_transformer,
284
  target_modules=TARGET_MODULES,
285
- device=torch.device("cuda"),
286
  dtype=_dtype,
287
  )
288
 
@@ -295,12 +295,12 @@ add_styctrl(
295
  adapter_name="styctrl",
296
  proj_type=PROJECTOR_TYPE,
297
  bias=False,
298
- device=torch.device("cuda"),
299
  dtype=_dtype,
300
  )
301
 
302
  # Load main LoRA weights (lora_A, lora_B) from checkpoint
303
- _lora_state = load_file(_lora_path, device="cuda")
304
  _lora_load_result = _transformer.load_state_dict(_lora_state, strict=False)
305
  if _lora_load_result.unexpected_keys:
306
  logger.warning("Unexpected keys in LoRA checkpoint: %s", _lora_load_result.unexpected_keys[:5])
 
282
  register_styctrl(
283
  model=_transformer,
284
  target_modules=TARGET_MODULES,
285
+ device="cuda",
286
  dtype=_dtype,
287
  )
288
 
 
295
  adapter_name="styctrl",
296
  proj_type=PROJECTOR_TYPE,
297
  bias=False,
298
+ device="cuda",
299
  dtype=_dtype,
300
  )
301
 
302
  # Load main LoRA weights (lora_A, lora_B) from checkpoint
303
+ _lora_state = load_file(_lora_path, device="cpu")
304
  _lora_load_result = _transformer.load_state_dict(_lora_state, strict=False)
305
  if _lora_load_result.unexpected_keys:
306
  logger.warning("Unexpected keys in LoRA checkpoint: %s", _lora_load_result.unexpected_keys[:5])