File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
- import os
14
+ from pathlib import Path
15
15
from typing import Dict , Union
16
16
17
17
import torch
@@ -138,7 +138,7 @@ def load_ip_adapter(
138
138
logger .info (f"loading image_encoder from { pretrained_model_name_or_path_or_dict } " )
139
139
image_encoder = CLIPVisionModelWithProjection .from_pretrained (
140
140
pretrained_model_name_or_path_or_dict ,
141
- subfolder = os . path . join (subfolder , "image_encoder" ),
141
+ subfolder = Path (subfolder , "image_encoder" ). as_posix ( ),
142
142
).to (self .device , dtype = self .dtype )
143
143
self .image_encoder = image_encoder
144
144
self .register_to_config (image_encoder = ["transformers" , "CLIPVisionModelWithProjection" ])
You can’t perform that action at this time.
0 commit comments