Commit
·
11c8f9e
1
Parent(s):
725fd2e
test import path
Browse files- misc.py +1 -1
- video2world_hf.py +3 -3
misc.py
CHANGED
|
@@ -24,7 +24,7 @@ import time
|
|
| 24 |
from contextlib import ContextDecorator
|
| 25 |
from typing import Any, Callable, TypeVar
|
| 26 |
|
| 27 |
-
from
|
| 28 |
import numpy as np
|
| 29 |
import termcolor
|
| 30 |
import torch
|
|
|
|
| 24 |
from contextlib import ContextDecorator
|
| 25 |
from typing import Any, Callable, TypeVar
|
| 26 |
|
| 27 |
+
from .log import log
|
| 28 |
import numpy as np
|
| 29 |
import termcolor
|
| 30 |
import torch
|
video2world_hf.py
CHANGED
|
@@ -79,14 +79,14 @@ class ARVideo2World(PreTrainedModel):
|
|
| 79 |
offload_text_encoder_model=args.offload_text_encoder_model,
|
| 80 |
)
|
| 81 |
|
| 82 |
-
def forward(self
|
| 83 |
args = self.args
|
| 84 |
|
| 85 |
# Load input image(s) or video(s)
|
| 86 |
input_videos = load_vision_input(
|
| 87 |
input_type=args.input_type,
|
| 88 |
batch_input_path=args.batch_input_path,
|
| 89 |
-
input_image_or_video_path=input_image_or_video_path,
|
| 90 |
data_resolution=args.data_resolution,
|
| 91 |
num_input_frames=args.num_input_frames,
|
| 92 |
)
|
|
@@ -95,7 +95,7 @@ class ARVideo2World(PreTrainedModel):
|
|
| 95 |
if args.batch_input_path:
|
| 96 |
prompts_list = read_prompts_from_file(args.batch_input_path)
|
| 97 |
else:
|
| 98 |
-
prompts_list = [{"visual_input": input_image_or_video_path, "prompt": prompt}]
|
| 99 |
|
| 100 |
# Iterate through prompts
|
| 101 |
for idx, prompt_entry in enumerate(prompts_list):
|
|
|
|
| 79 |
offload_text_encoder_model=args.offload_text_encoder_model,
|
| 80 |
)
|
| 81 |
|
| 82 |
+
def forward(self):
|
| 83 |
args = self.args
|
| 84 |
|
| 85 |
# Load input image(s) or video(s)
|
| 86 |
input_videos = load_vision_input(
|
| 87 |
input_type=args.input_type,
|
| 88 |
batch_input_path=args.batch_input_path,
|
| 89 |
+
input_image_or_video_path=args.input_image_or_video_path,
|
| 90 |
data_resolution=args.data_resolution,
|
| 91 |
num_input_frames=args.num_input_frames,
|
| 92 |
)
|
|
|
|
| 95 |
if args.batch_input_path:
|
| 96 |
prompts_list = read_prompts_from_file(args.batch_input_path)
|
| 97 |
else:
|
| 98 |
+
prompts_list = [{"visual_input": args.input_image_or_video_path, "prompt": args.prompt}]
|
| 99 |
|
| 100 |
# Iterate through prompts
|
| 101 |
for idx, prompt_entry in enumerate(prompts_list):
|