Skip to content

Use name in xyz_grid#10524

Merged
AUTOMATIC1111 merged 1 commit into
AUTOMATIC1111:devfrom
kamnxt:fix-xyz-hashes
May 18, 2023
Merged

Use name in xyz_grid#10524
AUTOMATIC1111 merged 1 commit into
AUTOMATIC1111:devfrom
kamnxt:fix-xyz-hashes

Conversation

@kamnxt

@kamnxt kamnxt commented May 18, 2023

Copy link
Copy Markdown
Contributor

Describe what this pull request is trying to achieve.
X/Y/Z grid was still using the old hash, prone to collisions. This changes it to use the new shorthash, and calculates it if not yet known.

Should fix #10521.

Additional notes and description of your changes

Had the same issue as poster of issue #10521, where X/Y/Z grid would sometimes load the wrong model. Found out that in my case it was due to the hashes colliding, as X/Y/Z was using the old hash. This changes to use the new shorthash. Also, the shorthash is calculated if it wasn't known before. No extra work is done since it would otherwise be calculated while loading anyway.

Environment this was tested in

Should work on all platforms where loading models by shorthash works.

Tested on:

  • OS: Windows, Linux
  • Browser: Firefox
  • Graphics card: N/A (Nvidia RTX3070)

@kamnxt kamnxt requested a review from AUTOMATIC1111 as a code owner May 18, 2023 19:52
@AUTOMATIC1111

Copy link
Copy Markdown
Owner

why not use name then instead of a hash

@kamnxt

kamnxt commented May 18, 2023

Copy link
Copy Markdown
Contributor Author

Had no idea you could use the model name in the override field! Seems to work fine with name, should I change it?

@AUTOMATIC1111

Copy link
Copy Markdown
Owner

Yes.

X/Y/Z grid was still using the old hash, prone to collisions. This changes it to use the name instead.

Should fix #10521.
@kamnxt kamnxt changed the title Use shorthash in xyz_grid Use name in xyz_grid May 18, 2023
@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from master to dev May 18, 2023 20:46
@AUTOMATIC1111 AUTOMATIC1111 merged commit 4f42acd into AUTOMATIC1111:dev May 18, 2023
@kamnxt kamnxt deleted the fix-xyz-hashes branch May 19, 2023 10:45
@Sakura-Luna

Copy link
Copy Markdown
Collaborator

Isn't this commit exactly the same as #10382, why merge repeatedly?

@kamnxt

kamnxt commented May 19, 2023

Copy link
Copy Markdown
Contributor Author

Oops, my bad, didn't check the dev branch before submitting the PR. I guess no harm was done though?

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.

[Bug]: X/Y/Z plot load different model if model names are similar

3 participants