Commit 7e6f9418 authored by sandy's avatar sandy Committed by GitHub
Browse files

Update lightx2v/models/input_encoders/hf/xlm_roberta/model.py


Co-authored-by: default avatargemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
parent df68ed3f
...@@ -444,9 +444,7 @@ class CLIPModel: ...@@ -444,9 +444,7 @@ class CLIPModel:
def visual(self, videos, args): def visual(self, videos, args):
if hasattr(args, "cpu_offload") and args.cpu_offload: if hasattr(args, "cpu_offload") and args.cpu_offload:
self.to_cuda() self.to_cuda()
use_31_block = True use_31_block = getattr(args, "use_31_block", True)
if hasattr(args, "use_31_block"):
use_31_block = args.use_31_block
# preprocess # preprocess
size = (self.model.image_size,) * 2 size = (self.model.image_size,) * 2
videos = torch.cat([F.interpolate(u, size=size, mode="bicubic", align_corners=False) for u in videos]) videos = torch.cat([F.interpolate(u, size=size, mode="bicubic", align_corners=False) for u in videos])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment