Open wangaocheng opened 2 weeks ago
def __init__(self, inp): super().__init__() self.inp = inp self.lora_args = {'lora_mode': inp['lora_mode'], 'lora_r': inp['lora_r']} device = 'cuda' if torch.cuda.is_available() else 'cpu' head_model_dir = inp['head_ckpt'] torso_model_dir = inp['torso_ckpt'] model_dir = torso_model_dir if torso_model_dir != '' else head_model_dir os.makedirs(self.inp['work_dir'], exist_ok=True) # 这里要加一行 cmd = f"cp {os.path.join(model_dir, 'config.yaml')} {self.inp['work_dir']}"