这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions examples/boft_controlnet/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@


# Determine the best available device
# TODO: xpu support in facealignment will be ready after this PR is merged:https://github.com/1adrianb/face-alignment/pull/371
if torch.xpu.is_available():
device = "xpu:0"
elif torch.cuda.is_available():
if torch.cuda.is_available():
device = "cuda:0"
else:
# TODO: xpu support in facealignment will be ready after this PR is merged:https://github.com/1adrianb/face-alignment/pull/371
device = "cpu"

detect_model = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, device=device, flip_input=False)
Expand Down
Loading