Skip to content

Update pipeline_flux_img2img.py #9928

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 4 commits into from
Nov 14, 2024
Merged

Conversation

example-git
Copy link
Contributor

@example-git example-git commented Nov 14, 2024

What does this PR do?

Added FromSingleFileMixin to this pipeline loader like the other FLUX pipelines. (So this pipeline can load from an all in one checkpoint file)

def load_img2img() -> FluxImg2ImgPipeline:
    """Load the pre-trained img2img pipeline."""
    pipeline = FluxImg2ImgPipeline.from_single_file(checkpoint_location, torch_dtype=torch.bfloat16
    ).to("cuda")
    return pipeline
pipeline = load_img2img()

can be used to test it if you have a flux checkpoint with other models mixxed into it, it works now after that change though from my tests

@yiyixuxu and @asomoza

Before submitting

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.

Added FromSingleFileMixin to this pipeline loader like the other FLUX pipelines.
@sayakpaul sayakpaul requested a review from DN6 November 14, 2024 13:40
@asomoza
Copy link
Member

asomoza commented Nov 14, 2024

thanks @example-git, can you please update the branch and run make quality and make style please

@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.

@example-git
Copy link
Contributor Author

@asomoza done

Copy link
Member

@asomoza asomoza left a comment

Choose a reason for hiding this comment

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

thanks a lot

@asomoza asomoza merged commit 5c94937 into huggingface:main Nov 14, 2024
15 checks passed
sayakpaul pushed a commit that referenced this pull request Dec 23, 2024
* Update pipeline_flux_img2img.py

Added FromSingleFileMixin to this pipeline loader like the other FLUX pipelines.

* Update pipeline_flux_img2img.py

typo

* modified:   src/diffusers/pipelines/flux/pipeline_flux_img2img.py
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