-
Notifications
You must be signed in to change notification settings - Fork 350
[inference providers] tutorial for image editing with inference providers #1880
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
Conversation
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. |
There was a problem hiding this comment.
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.
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
# Initialize the client with fal-ai provider for fast image processing | ||
client = InferenceClient( | ||
provider="fal-ai", | ||
api_key=os.environ["HF_TOKEN"], |
There was a problem hiding this comment.
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.
|
||
</Tip> | ||
|
||
## Step 1: Set Up Authentication |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
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! 🤗
….com/huggingface/hub-docs into inference-providers-image-edit-guide
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 |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or a screenshot of https://huggingface.co/spaces/Qwen/Qwen-Image-Edit)
There was a problem hiding this comment.
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 🤯
This PR adds a guide on using Qwen Image Edit with inference providers.