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 1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14- import os
14+ from pathlib import Path
1515from typing import Dict , Union
1616
1717import torch
@@ -138,7 +138,7 @@ def load_ip_adapter(
138138 logger .info (f"loading image_encoder from { pretrained_model_name_or_path_or_dict } " )
139139 image_encoder = CLIPVisionModelWithProjection .from_pretrained (
140140 pretrained_model_name_or_path_or_dict ,
141- subfolder = os . path . join (subfolder , "image_encoder" ),
141+ subfolder = Path (subfolder , "image_encoder" ). as_posix ( ),
142142 ).to (self .device , dtype = self .dtype )
143143 self .image_encoder = image_encoder
144144 self .register_to_config (image_encoder = ["transformers" , "CLIPVisionModelWithProjection" ])
You can’t perform that action at this time.
0 commit comments