Skip to content

Commit

Permalink
auto-move inputs to same device as robotic transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jan 31, 2024
1 parent 9a0fdef commit 0d051d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions q_transformer/q_robotic_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,15 @@ def forward(
cond_drop_prob = 0.,
):

# just auto-move inputs to the same device as robotic transformer

video = video.to(self.device)

if exists(actions):
actions = actions.to(self.device)

# encoding state

encoded_state = self.encode_state(
video = video,
texts = texts,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'q-transformer',
packages = find_packages(exclude=[]),
version = '0.1.11',
version = '0.1.12',
license='MIT',
description = 'Q-Transformer',
author = 'Phil Wang',
Expand Down

0 comments on commit 0d051d5

Please sign in to comment.