Skip to content

Fix: Missing a nil check at StableDiffusionCLI #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2023
Merged

Conversation

1ucas
Copy link
Contributor

@1ucas 1ucas commented Mar 3, 2023

I noticed that generating images with Swift using the example prompt caused the output image to always carry the suffix .str50.

Looking at the code I saw that image != "none" was never evaluating to false.

I believe there was a small confusion between Python's None and Swift's nil representation of null.

This super small PR fixes it.

#########

  • I agree to the terms outlined in CONTRIBUTING.md

@1ucas
Copy link
Contributor Author

1ucas commented Mar 3, 2023

I also would like to take the opportunity to say thanks to the maintainers and the community!
For us, iOS devs, these tools greatly reduce the initial gap of learning how to work with AI models.

@atiorh atiorh merged commit 2c4e9de into apple:main Mar 4, 2023
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.

2 participants