Make uni3c offloading optional
This commit is contained in:
+2
-8
@@ -888,16 +888,10 @@ class WanVideoSampler:
|
||||
if uni3c_embeds is not None:
|
||||
transformer.uni3c_controlnet = uni3c_embeds["controlnet"]
|
||||
render_latent = uni3c_embeds["render_latent"].to(device)
|
||||
uni3c_data = uni3c_embeds.copy()
|
||||
if render_latent.shape != noise.shape:
|
||||
render_latent = torch.nn.functional.interpolate(render_latent, size=(noise.shape[1], noise.shape[2], noise.shape[3]), mode='trilinear', align_corners=False)
|
||||
uni3c_data = {
|
||||
"render_latent": render_latent,
|
||||
"render_mask": uni3c_embeds["render_mask"],
|
||||
"camera_embedding": uni3c_embeds["camera_embedding"],
|
||||
"controlnet_weight": uni3c_embeds["controlnet_weight"],
|
||||
"start": uni3c_embeds["start"],
|
||||
"end": uni3c_embeds["end"],
|
||||
}
|
||||
uni3c_data["render_latent"] = render_latent
|
||||
|
||||
# Enhance-a-video (feta)
|
||||
if feta_args is not None and latent_video_length > 1:
|
||||
|
||||
Reference in New Issue
Block a user