huggingface / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
https://huggingface.co/docs/diffusers
Apache License 2.0
26.14k stars 5.38k forks source link

I made a pipeline that lets you use any number of models at once #9216

Open alexblattner opened 2 months ago

alexblattner commented 2 months ago

Model/Pipeline/Scheduler description

Here's how to do it: from rubberDiffusers import StableDiffusionRubberPipeline pipe=StableDiffusionRubberPipeline.from_pretrained( "runwayml/stable-diffusion-v1-5", torch_dtype=torch.float32,local_files_only=True,safety_checker=None, requires_safety_checker=False, )

pipe2=StableDiffusionRubberPipeline.from_pretrained( "runwayml/stable-diffusion-v1-5", torch_dtype=torch.float32,local_files_only=True,safety_checker=None, requires_safety_checker=False, )

apply_multiModel(pipe) pipe.added_model=[pipe2] image=pipe("your prompt",width=512,height=512,pos=["0:0-512:512"],mask_strengths=[.5],model_kwargs=[{prompt="your prompt for the first loaded model"}]).images[0]

Open source status

Provide useful links for the implementation

https://github.com/alexblattner/RubberDiffusers

bghira commented 2 months ago

is it a proposal or issue? maybe better for Show & Tell Discussion section

alexblattner commented 2 months ago

@bghira neither, it already exists and works

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.