Skip to content
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

iOS 17 beta issue: abnormal search results. #3

Closed
flipped0119 opened this issue Jul 11, 2023 · 17 comments
Closed

iOS 17 beta issue: abnormal search results. #3

flipped0119 opened this issue Jul 11, 2023 · 17 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@flipped0119
Copy link

flipped0119 commented Jul 11, 2023

In iOS 17 beta 3, regardless of the keyword used, the search results are always the same.

@mazzzystar mazzzystar changed the title iOS17好像无法搜索图片了 iOS 17 beta issue: abnormal search results. Jul 11, 2023
@mazzzystar
Copy link
Owner

mazzzystar commented Jul 11, 2023

It appears to be a bug introduced in the iOS 17 beta, where input text is being embedded into the same vector. Currently, I am unable to determine the exact cause of this issue.

@mazzzystar mazzzystar added bug Something isn't working enhancement New feature or request labels Jul 11, 2023
@RupGautam
Copy link

I can confirm the results are the same, not always, but most of the time.

@mazzzystar
Copy link
Owner

@RupGautam
I've debugged the issue. I found that all text inputs were embedded into the same value in iOS 17 beta. However, it works correctly on iOS 16. I suspect it was the issue related with model loading, didn't figured out the problem yet.

@RupGautam
Copy link

RupGautam commented Jul 12, 2023

@mazzzystar
"Deep green/blue water with mountains around"

"Deep green/blue water without mountains around"

Gives me the same results. ⁉️

@mazzzystar
Copy link
Owner

@RupGautam Right, you're using iOS 17 beta. As I've mentioned before, every input query in iOS 17 got the same text embedding vector output, which may be cause by model loading failure.

@mazzzystar
Copy link
Owner

mazzzystar commented Jul 15, 2023

@RupGautam @flipped0119
did you use Xcode 15 beta to compile? I've just tried iOS 17.0 simulator on my Xcode 14.3.1 and it works correctly. I do got abnormal result on my Xcode 15, it seems to be a Xcode issue.

@Dealizey
Copy link

@mazzzystar So has the bug been fixed with Xcode beta?

@mazzzystar
Copy link
Owner

mazzzystar commented Jul 19, 2023

@mazzzystar So has the bug been fixed with Xcode beta?

No, I'm saying that when using Xcode 14 + iOS 17 beta simulator to run the app, everything seems to be normal. While in Xcode 15 + iOS 17 the issue occurs.

But I only have one phone, and when your phone is upgraded to iOS 17 beta, you can't submit new app to App Store. So I couldn't test this issue on my my real phone.

@mazzzystar
Copy link
Owner

Confirmed, when upgraded to iOS 17 public beta, everything back to normal.

@mazzzystar
Copy link
Owner

@flipped0119 @RupGautam @Dealizey
Finally I found the issue. For iOS 17, ou need to explicitly set dtype=np.int32 for the input tensor when export model.

max_seq_length = 77

text_encoder_model = ct.convert(
            traced_model,
            convert_to="mlprogram",
            minimum_deployment_target=ct.target.iOS16,
            inputs=[ct.TensorType(name="prompt",
                                 shape=example_input.shape),
                                 dtype=np.int32)],
            outputs=[ct.TensorType(name="embOutput", dtype=np.float32)],
        )

@Dealizey
Copy link

@mazzzystar Great! When will this bug fix be published?

@Dealizey
Copy link

It's quite interesting that the Chinese App Store didn't show that update, but the US one did. Maybe it's because of the CDN configuration.

@mazzzystar
Copy link
Owner

@Dealizey Queryable & 寻隐 are using two models, so it's two app. In Chinese version, this update is still under beta testing.

@Dealizey
Copy link

Thanks! Hope the Chinese version will be published soon.❤️❤️❤️

@mazzzystar
Copy link
Owner

@Dealizey It is available now.

@Dealizey
Copy link

Got that. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants