Skip to content

fix(mm): only add suffix to model paths when path is file #8413

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
Aug 12, 2025

Conversation

psychedelicious
Copy link
Collaborator

Summary

I noticed that diffusers/folder models with a . in the model source had everything after the . appended to their destination path.

Example model:

depth_sdxl = StarterModel(
    name="Depth Map",
    base=BaseModelType.StableDiffusionXL,
    source="diffusers/controlNet-depth-sdxl-1.0",
    description="Uses depth information in the image to control the depth in the generation.",
    type=ModelType.ControlNet,
    previous_names=["depth-sdxl"],
)

This model's source ends with .0. It was installed into sdxl/controlnet/Depth Map.0, when it should be installed to sdxl/controlnet/Depth Map.

I added an extra check to only add the suffix to the destination path when the model is a file. Single-file models still get the correct file extension and folders use the preferred name.

Related Issues / Discussions

This is a follow-on to #8352. It's been an issue for a long time.

QA Instructions

I used the SDXL Depth Map and CyberRealistic models as tests for this. They isntall to the correct locations.

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added python PRs that change python files services PRs that change app services labels Aug 11, 2025
@psychedelicious psychedelicious force-pushed the psyche/fix/diffusers-model-path branch from 0662eed to 699cf35 Compare August 11, 2025 12:57
@psychedelicious psychedelicious force-pushed the psyche/fix/diffusers-model-path branch from 699cf35 to 960aece Compare August 12, 2025 00:52
@psychedelicious psychedelicious enabled auto-merge (rebase) August 12, 2025 00:53
@psychedelicious psychedelicious merged commit fdaddaf into main Aug 12, 2025
14 of 18 checks passed
@psychedelicious psychedelicious deleted the psyche/fix/diffusers-model-path branch August 12, 2025 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python PRs that change python files services PRs that change app services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants