Rewrite inpaint node to new model manager, remove TextToImage and ImageToImage nodes

This commit is contained in:
Sergey Borisov
2023-06-16 23:17:18 +03:00
committed by psychedelicious
parent f312e1448f
commit c26e1a9271
2 changed files with 133 additions and 175 deletions

View File

@ -317,6 +317,7 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline):
requires_safety_checker: bool = False,
precision: str = "float32",
control_model: ControlNetModel = None,
execution_device: Optional[torch.device] = None,
):
super().__init__(
vae,
@ -356,7 +357,7 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline):
textual_inversion_manager=self.textual_inversion_manager,
)
self._model_group = FullyLoadedModelGroup(self.unet.device)
self._model_group = FullyLoadedModelGroup(execution_device or self.unet.device)
self._model_group.install(*self._submodels)
self.control_model = control_model