Skip to content

[inference providers] tutorial for image editing with inference providers#1880

Merged
burtenshaw merged 10 commits into
mainfrom
inference-providers-image-edit-guide
Aug 26, 2025
Merged

[inference providers] tutorial for image editing with inference providers#1880
burtenshaw merged 10 commits into
mainfrom
inference-providers-image-edit-guide

Conversation

@burtenshaw

@burtenshaw burtenshaw commented Aug 22, 2025

Copy link
Copy Markdown
Collaborator

This PR adds a guide on using Qwen Image Edit with inference providers.

@burtenshaw
burtenshaw requested a review from pcuenca August 22, 2025 08:22
@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.

Comment thread docs/inference-providers/guides/image-editor.md Outdated
@pcuenca pcuenca changed the title [inference providers] tutorial using qwen imge edit and inference providers [inference providers] tutorial for image editing with inference providers Aug 22, 2025

@pcuenca pcuenca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very cool! We can recommend to upgrade to Pro for more inference credits, there are many opportunities to do so in the text.

Comment thread docs/inference-providers/guides/image-editor.md Outdated
Comment thread docs/inference-providers/guides/image-editor.md
Comment thread docs/inference-providers/guides/image-editor.md Outdated
Comment thread docs/inference-providers/guides/image-editor.md Outdated
Comment thread docs/inference-providers/guides/image-editor.md Outdated
burtenshaw and others added 3 commits August 25, 2025 13:49
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Comment thread docs/inference-providers/guides/image-editor.md Outdated
# Initialize the client with fal-ai provider for fast image processing
client = InferenceClient(
provider="fal-ai",
api_key=os.environ["HF_TOKEN"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if you export the HF_TOKEN above you don't need to explicitly pass the token. (in case you want to simplify the code a bit)

though probably better to be explicit.

Comment thread docs/inference-providers/guides/image-editor.md Outdated
Comment thread docs/inference-providers/guides/image-editor.md Outdated

</Tip>

## Step 1: Set Up Authentication

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

smol suggestion would be to add a TL;DR here with the link to a deployed space where people can try out the model directly and link to the code snippet below.

Co-authored-by: vb <vaibhavs10@gmail.com>

@Vaibhavs10 Vaibhavs10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Brilliant! Let's merge this as well! 🤗

@burtenshaw
burtenshaw merged commit 6a98ced into main Aug 26, 2025
2 checks passed
@burtenshaw
burtenshaw deleted the inference-providers-image-edit-guide branch August 26, 2025 17:55
@NielsRogge

NielsRogge commented Aug 30, 2025

Copy link
Copy Markdown
Contributor

I noticed https://huggingface.co/docs/inference-providers/en/guides/image-editor does not show any input or output images - would be great if you could add some, similar to https://docs.bfl.ai/guides/prompting_guide_kontext_i2i (which has plenty visual examples)

1. **Accept image uploads** through a web interface
2. **Process natural language prompts** editing instructions like "Turn the cat into a tiger"
3. **Transform images** using Qwen Image Edit or FLUX.1 Kontext
4. **Display results** in a Gradio interface

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

adding a screenshot of the end-result Gradio app would have been neat.

Other than that, cool tutorial!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lol made a similar comment as @NielsRogge at the same time 🤯

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.

6 participants