Closed allenbenz closed 1 year ago
Will this work with models other than the base model? eg. inpainting and depth2image models. Even if it works, you did not change the following lines that set self.play_model_variant to a specific value based on the pipeline class. This will break the model playground for inpainting and depth2image models
As written it doesn't work with non-base models, I'll play around a bit to see what can be done.
Ugh, I hadn't looked very deep into anything. I didn't realize the pipelines weren't composable.
So I could stick self.pipe = DiffusionPipeline.from_pretrained(model, custom_pipeline="lpw_stable_diffusion", **self.pipe.component)
under if isinstance(self.pipe, StableDiffusionPipeline)
but that's going to confuse people when the prompts work sometimes and don't later.
So for StableTuner's usecase the Long Prompt Weighting Stable Diffusion pipeline is only useful as a reference.
I'm going to close the PR as it shouldn't be merged and isn't the start of the appropriate implementation.
We can use the diffusers community pipeline "Long Prompt Weighting Stable Diffusion" to enable prompts longer than 75 tokens long in the model playground.
With this change the new limit is 3 * 75 tokens. It's adjustable by passing in
max_embeddings_multiples
, The default is 3.This pipeline also adds support for weighted tokens, if that's an issue it can be turned off via
skip_parsing=True
, It does change the behavior of parenthesis and square brackets if its enabled, see documentation below.