Skip to content

Conversation

@stephen-iezzi
Copy link
Contributor

What does this PR do?

Introduces Posix to provide stronger support for Windows compatibility. Changes the instance of os.path.join() to Path(...).as_posix().

Fixes #6585

Before submitting

Who can review?

@sayakpaul

if os.path.isdir(model_id):
model = OnnxRuntimeModel.load_model(
os.path.join(model_id, model_file_name), provider=provider, sess_options=sess_options
Path(model_id, model_file_name).as_posix(), provider=provider, sess_options=sess_options
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to import Path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it's already imported because Path is also being used in other parts of the file

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@sayakpaul sayakpaul merged commit 5b1b80a into huggingface:main Jan 28, 2024
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tracker] change to posix for better Windows support

3 participants