Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 99e5ad9

Browse files
Update inference.py
1 parent 410c467 commit 99e5ad9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inference.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def initialize_pipeline(model, device="cuda", xformers=False, sdp=False):
2020
scheduler, tokenizer, text_encoder, vae, _unet = load_primary_models(model)
2121
del _unet #This is a no op
2222
unet = UNet3DConditionModel.from_pretrained(model, subfolder='unet')
23-
23+
unet.disable_gradient_checkpointing()
24+
2425
pipeline = TextToVideoSDPipeline.from_pretrained(
2526
pretrained_model_name_or_path=model,
2627
scheduler=scheduler,

0 commit comments

Comments
 (0)