MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / low_vram_shift

Method low_vram_shift

cldm/cldm.py:467–477  ·  view source on GitHub ↗
(self, is_diffusing)

Source from the content-addressed store, hash-verified

465 return opt
466
467 def low_vram_shift(self, is_diffusing):
468 if is_diffusing:
469 self.model = self.model.cuda()
470 self.control_model = self.control_model.cuda()
471 self.first_stage_model = self.first_stage_model.cpu()
472 self.cond_stage_model = self.cond_stage_model.cpu()
473 else:
474 self.model = self.model.cpu()
475 self.control_model = self.control_model.cpu()
476 self.first_stage_model = self.first_stage_model.cuda()
477 self.cond_stage_model = self.cond_stage_model.cuda()
478
479 def p_losses(self, x_start, cond, t, noise=None):
480

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected