From 449116a5101c32617a497d3c79210bb7255505be Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 1 Mar 2023 19:17:16 -0300 Subject: [PATCH] Fix RWKV paths on Windows (attempt) --- modules/RWKV.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/RWKV.py b/modules/RWKV.py index 88f1ec23..ee8d76fb 100644 --- a/modules/RWKV.py +++ b/modules/RWKV.py @@ -25,8 +25,8 @@ class RWKVModel: def from_pretrained(self, path, dtype="fp16", device="cuda"): tokenizer_path = Path(f"{path.parent}/20B_tokenizer.json") - model = RWKV(model=path.as_posix(), strategy=f'{device} {dtype}') - pipeline = PIPELINE(model, tokenizer_path.as_posix()) + model = RWKV(model=os.path.abspath(path), strategy=f'{device} {dtype}') + pipeline = PIPELINE(model, os.path.abspath(tokenizer_path)) result = self() result.pipeline = pipeline