support animatediff on sdxl

This commit is contained in:
Artiprocher
2024-05-11 22:48:02 +08:00
parent 8fa03aa997
commit 3b5bbb5773
7 changed files with 403 additions and 10 deletions

View File

@@ -30,8 +30,6 @@ class SDXLImagePipeline(torch.nn.Module):
self.unet = model_manager.unet
self.vae_decoder = model_manager.vae_decoder
self.vae_encoder = model_manager.vae_encoder
# load textual inversion
self.prompter.load_textual_inversion(model_manager.textual_inversion_dict)
def fetch_controlnet_models(self, model_manager: ModelManager, **kwargs):
@@ -117,10 +115,7 @@ class SDXLImagePipeline(torch.nn.Module):
device=self.device,
positive=False,
)
# Prepare scheduler
self.scheduler.set_timesteps(num_inference_steps, denoising_strength)
# Prepare positional id
add_time_id = torch.tensor([height, width, 0, 0, height, width], device=self.device)