Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Feat/custom model not supported in stable diffusion deploy #265

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

naem1023
Copy link

@naem1023 naem1023 commented Feb 22, 2023

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes #264

The repo only supports models stable diffusion v1.4, v1.5, v2.0-base, v2.0-high in stable_diffusion_infernece.

I made some codes for supporting custom models via URL and local path.
I update docs of configurations, too!

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

- The custom model which isn't supported in stable_diffusion_inference.
@naem1023 naem1023 requested review from aniketmaurya and a team as code owners February 22, 2023 06:28
@aniketmaurya aniketmaurya added enhancement New feature or request good first issue Good for newcomers labels Feb 22, 2023
tests/test_app.py Outdated Show resolved Hide resolved
@naem1023
Copy link
Author

naem1023 commented Mar 7, 2023

@aniketmaurya
I add some tests and it works on my machine with same test command.

coverage run --source muse -m pytest muse tests -v

These tests worked well in github action, but the tests were never end forever.

I don't know the reason. Do you have any idea about it?

@naem1023 naem1023 requested a review from a team as a code owner March 9, 2023 22:34
@naem1023
Copy link
Author

naem1023 commented Mar 10, 2023

Using stable diffusion checkpoint to test function is not good at Github Action.
https://github.com/Lightning-Universe/stable-diffusion-deploy/actions/runs/4379968252/jobs/7666492774

Mac instance can be run all the test, but Ubuntu instance can't download checkpoint and run test.
Small size of stable diffusion can be solution, but it needs modify all the logic of PR. I'll find some good way to run test in Ubuntu session, especially 7GB memory size.

@naem1023 naem1023 force-pushed the feat/custom-model-not-supported-in-stable-diffusion-deploy branch from 0f2a5e6 to 9c9e9b3 Compare March 13, 2023 05:47
@naem1023
Copy link
Author

I split test function.

  1. Testing logic of StableDiffusionServe().is_custom_model(), https://github.com/naem1023/stable-diffusion-deploy/blob/9c9e9b33f638d4abf07dae84df41998a81db434c/muse/components/stable_diffusion_serve.py#L80-L88
  2. Testing download diffusion model using stable_diffusion_inference, https://github.com/naem1023/stable-diffusion-deploy/blob/9c9e9b33f638d4abf07dae84df41998a81db434c/muse/components/stable_diffusion_serve.py#L108-L115

The first test runs smoothly in github action. It does not download or forward the model, but simply checks that the variables for downloading model are set properly.

The second test actually downloads the model and loads the model using the stable_diffusion_inference library. Since this is difficult to test in github action, README.md has been added to the tests directory so that it can be tested locally.

@naem1023 naem1023 requested review from aniketmaurya and Borda and removed request for aniketmaurya and Borda March 13, 2023 05:54
@naem1023 naem1023 force-pushed the feat/custom-model-not-supported-in-stable-diffusion-deploy branch from a950d53 to ca1f903 Compare March 14, 2023 13:41
@naem1023 naem1023 force-pushed the feat/custom-model-not-supported-in-stable-diffusion-deploy branch from 70dc1f1 to 6b89f37 Compare April 3, 2023 10:34
@naem1023 naem1023 requested a review from Borda April 3, 2023 11:01
@naem1023
Copy link
Author

naem1023 commented Apr 3, 2023

I've resolved all the testing and conflicts. Can you review it again? @Borda @aniketmaurya

@naem1023 naem1023 marked this pull request as draft April 5, 2023 06:50
@naem1023 naem1023 marked this pull request as ready for review April 5, 2023 06:50
@naem1023 naem1023 force-pushed the feat/custom-model-not-supported-in-stable-diffusion-deploy branch from 2f7ffac to 3f27390 Compare April 5, 2023 08:45
@naem1023
Copy link
Author

naem1023 commented Apr 5, 2023

I combined all the messy commits using sqush.

@naem1023 naem1023 marked this pull request as draft April 12, 2023 08:24
@naem1023 naem1023 marked this pull request as ready for review April 12, 2023 08:25
@naem1023
Copy link
Author

@Borda @aniketmaurya HI! I know you're busy, but could you give me some simple reviews? Thanks!

@Borda
Copy link
Member

Borda commented Apr 17, 2023

@aniketmaurya HI! I know you're busy, but could you give me some simple reviews? Thanks!

thank you for your contribution, about this app I would rather leave it to @aniketmaurya as he was much more hands-on during the whole development...

@naem1023 naem1023 force-pushed the feat/custom-model-not-supported-in-stable-diffusion-deploy branch from 1eaf427 to d188210 Compare May 12, 2023 10:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suuporitng custom models via url and local path for PR
3 participants