(self, is_diffusing)
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected