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

Experiment with combined base+refiner for SDXL #55

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stronk-dev
Copy link

Lets not hard code it like this, maybe enhance the request to be able to request a list of sequential models?

@stronk-dev
Copy link
Author

Apparently there's also a big difference between:

  • Base model x Refiner:
    Use the base model for the high-noise stage and the refiner for the low noise stage
            kwargs["denoising_end"] = 0.8
            kwargs["output_type"] = "latent"
            image = self.ldm(prompt, **kwargs).images
            del kwargs["output_type"]
            kwargs["denoising_start"] = ["denoising_end"]
            del kwargs["denoising_end"]
            kwargs["image"] = image
            return self.refiner(prompt, **kwargs).images
  • Base model -> refiner
    Use the base model to fully denoise the image and then use the refiner to add details
            kwargs["output_type"] = "latent"
            image = self.ldm(prompt, **kwargs).images[0]
            del kwargs["output_type"]
            kwargs["image"] = image[None, :]
            return self.refiner(prompt, **kwargs).images

I am getting good results with both. To support refiner models, we would require a param to set denoising_start/end and a separate num_inference_steps for the second stage. So ideally you would be able to request:

  • Base model
  • Base model x refiner (with denoising_start/end)
  • Base model -> refiner

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.

None yet

1 participant