Skip to content

Commit ced4db3

Browse files
committed
TORCH_DEVICE_MODEL not TORCH_DEVICE
1 parent 06f755f commit ced4db3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

surya/model/common/adetr/decoder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
def mark_step():
23-
if settings.TORCH_DEVICE == 'xla':
23+
if settings.TORCH_DEVICE_MODEL == 'xla':
2424
xm.mark_step()
2525

2626

surya/model/common/donut/encoder.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222

2323
def mark_step():
24-
if settings.TORCH_DEVICE == 'xla':
24+
if settings.TORCH_DEVICE_MODEL == 'xla':
2525
xm.mark_step()
2626

2727

@@ -395,6 +395,8 @@ def forward(
395395
return outputs
396396

397397
# Copied from transformers.models.swin.modeling_swin.SwinSelfOutput
398+
399+
398400
class DonutSwinSelfOutput(nn.Module):
399401
def __init__(self, config, dim):
400402
super().__init__()

0 commit comments

Comments
 (0)