Skip to content

Commit

Permalink
Revert ":bug: Fixes path style (#2420)" (#2426)
Browse files Browse the repository at this point in the history
This reverts commit a6a5a4b.
  • Loading branch information
huchenlei authored Jan 6, 2024
1 parent 9d1f0a0 commit 94c93c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def torch_handler(module: str, name: str):
if module == 'torch':
return getattr(torch, name)
self.torch_handler = torch_handler

def load_model(self):
if self.model is None:
# Add submodule hand_refiner to sys.path so that it can be discovered correctly.
Expand All @@ -665,11 +665,11 @@ def load_model(self):
hand_refiner_path = str(Path(__file__).parent.parent / 'annotator' / 'hand_refiner_portable')
if hand_refiner_path not in sys.path:
sys.path.append(hand_refiner_path)

from annotator.hand_refiner_portable.hand_refiner import MeshGraphormerDetector
with Extra(self.torch_handler):
self.model = MeshGraphormerDetector.from_pretrained(
os.path.join("hr16", "ControlNet-HandRefiner-pruned"),
"hr16/ControlNet-HandRefiner-pruned",
cache_dir=os.path.join(models_path, "hand_refiner"),
device=self.device,
)
Expand Down

0 comments on commit 94c93c6

Please sign in to comment.