Spaces:
Runtime error
Runtime error
IceClear commited on
Commit ·
bfeb62a
1
Parent(s): 303cd3c
update
Browse files70 unmodified lines717273747576775 unmodified lines8384858687888970 unmodified lines@log_on_entry@log_runtimedef configure_dit_model(self, device="cpu", checkpoint=None):# Load dit checkpoint.# For fast init & resume,# when training from scratch, rank0 init DiT on cpu, then sync to other ranks with FSDP.5 unmodified linesself.dit.set_gradient_checkpointing(self.config.dit.gradient_checkpoint)if checkpoint:state = torch.load(checkpoint, map_location="cpu", mmap=True)loading_info = self.dit.load_state_dict(state, strict=True, assign=True)print(f"Loading pretrained ckpt from {checkpoint}")print(f"Loading info: {loading_info}")70 unmodified lines717273747576775 unmodified lines8384858687888970 unmodified lines@log_on_entry@log_runtimedef configure_dit_model(self, device="cuda", checkpoint=None):# Load dit checkpoint.# For fast init & resume,# when training from scratch, rank0 init DiT on cpu, then sync to other ranks with FSDP.5 unmodified linesself.dit.set_gradient_checkpointing(self.config.dit.gradient_checkpoint)if checkpoint:state = torch.load(checkpoint, map_location=self.device, mmap=True)loading_info = self.dit.load_state_dict(state, strict=True, assign=True)print(f"Loading pretrained ckpt from {checkpoint}")print(f"Loading info: {loading_info}")
projects/video_diffusion_sr/infer.py+2-2