Skip to content

Add Flux Control to AutoPipeline #10292

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 2 commits into from
Dec 19, 2024

Conversation

hlky
Copy link
Contributor

@hlky hlky commented Dec 18, 2024

What does this PR do?

#10192 (comment)

from diffusers import AutoPipelineForText2Image, AutoPipelineForImage2Image, AutoPipelineForInpainting
import torch

pipe = AutoPipelineForInpainting.from_pretrained("black-forest-labs/FLUX.1-Depth-dev", torch_dtype=torch.bfloat16)
print(pipe.__class__.__name__)

pipe = AutoPipelineForImage2Image.from_pretrained("black-forest-labs/FLUX.1-Depth-dev", torch_dtype=torch.bfloat16)
print(pipe.__class__.__name__)

pipe = AutoPipelineForText2Image.from_pretrained("black-forest-labs/FLUX.1-Depth-dev", torch_dtype=torch.bfloat16)
print(pipe.__class__.__name__)

pipe = AutoPipelineForInpainting.from_pipe(pipe)
print(pipe.__class__.__name__)

pipe = AutoPipelineForImage2Image.from_pipe(pipe)
print(pipe.__class__.__name__)

pipe = AutoPipelineForText2Image.from_pipe(pipe)
print(pipe.__class__.__name__)
FluxControlInpaintPipeline
Loadingpipelinecomponents...: 100%7/7 [00:08<00:00,  1.25s/it]
Loadingcheckpointshards: 100%4/4 [00:05<00:00,  1.39s/it]
FluxControlImg2ImgPipeline
Loadingpipelinecomponents...: 100%7/7 [00:09<00:00,  1.32s/it]
Loadingcheckpointshards: 100%4/4 [00:05<00:00,  1.40s/it]
FluxControlPipeline
FluxControlInpaintPipeline
FluxControlImg2ImgPipeline
FluxControlPipeline

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@yiyixuxu @vladmandic

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @hlky
feel free to refactor a bit now that the logic is growing more complex!

@yiyixuxu yiyixuxu merged commit 4450d26 into huggingface:main Dec 19, 2024
12 checks passed
Foundsheep pushed a commit to Foundsheep/diffusers that referenced this pull request Dec 23, 2024
sayakpaul pushed a commit that referenced this pull request Dec 23, 2024
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.

3 participants