Skip to content

Add ChromaInpaintPipeline - #12848

Merged
DN6 merged 3 commits into
huggingface:mainfrom
hameerabbasi:chroma-inpaint
Jan 15, 2026
Merged

DN6 merged 3 commits into
huggingface:mainfrom
hameerabbasi:chroma-inpaint

Conversation

@hameerabbasi

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a ChromaInpaintPipeline

Fixes #12572

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.

cc @yiyixuxu and @asomoza

@hameerabbasi
hameerabbasi force-pushed the chroma-inpaint branch 5 times, most recently from 1e3a4c3 to 07b42b7 Compare December 17, 2025 08:33
@hameerabbasi

Copy link
Copy Markdown
Contributor Author

cc @DN6 A review would be appreciated.

@lodestone-rock

Copy link
Copy Markdown

bump cc @yiyixuxu

@yiyixuxu

yiyixuxu commented Jan 6, 2026

Copy link
Copy Markdown
Collaborator

@bot /style

@github-actions

github-actions Bot commented Jan 6, 2026 •

Copy link
Copy Markdown
Contributor

Style fix runs successfully without any file modified.

@yiyixuxu

yiyixuxu commented Jan 6, 2026

Copy link
Copy Markdown
Collaborator

can you share code example + output?

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@DN6 DN6 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@hameerabbasi Could you share a couple of example outputs please?

Comment thread .gitignore Outdated
Comment thread src/diffusers/pipelines/chroma/pipeline_chroma_inpainting.py Outdated
@hameerabbasi

ghost commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

Input:
apple

Output:
orange

Code:

import torch

from diffusers import ChromaInpaintPipeline
from diffusers.utils import load_image


def main():
    pipe = ChromaInpaintPipeline.from_pretrained("lodestones/Chroma1-HD", torch_dtype=torch.bfloat16)
    pipe.to("cuda")
    prompt = "In the style of a crisp, clean professional studio photograph, a single, perfectly fresh orange sits centered on a smooth, neutral-toned tabletop."
    img_url = "apple.jpg"
    source = load_image(img_url)
    image = pipe(prompt=prompt, image=source, mask_image=torch.ones(source.size, dtype=torch.bfloat16), guidance_scale=3.0, strength=0.5).images[0]
    image.save("orange.png", format="png")


if __name__ == "__main__":
    main()

Inspired by #12572 (comment)

@hameerabbasi
hameerabbasi requested a review from DN6 January 12, 2026 15:17

ghost left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good to merge once gitignore file is cleaned up.

@hameerabbasi

ghost commented Jan 14, 2026

Copy link
Copy Markdown
Contributor Author

Good to merge once gitignore file is cleaned up.

Done in 4962d26.

@DN6
DN6 merged commit 5efb81f into huggingface:main Jan 15, 2026
@DN6 DN6 added the roadmap Add to current release roadmap label Jan 15, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in Diffusers Roadmap Jan 15, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Diffusers Roadmap Jan 15, 2026
@hameerabbasi
hameerabbasi deleted the chroma-inpaint branch January 15, 2026 07:41
@rodjjo

ghost commented Jan 19, 2026

Copy link
Copy Markdown

Thank you @hameerabbasi :) and thank you too @DN6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

roadmap Add to current release roadmap

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Chroma inpainting pipeline

6 participants