[inference providers] tutorial for image editing with inference providers#1880
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. |
pcuenca
left a comment
There was a problem hiding this comment.
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.
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.
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
left a comment
There was a problem hiding this comment.
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.
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.
(or a screenshot of https://huggingface.co/spaces/Qwen/Qwen-Image-Edit)
There was a problem hiding this comment.
lol made a similar comment as @NielsRogge at the same time 🤯
This PR adds a guide on using Qwen Image Edit with inference providers.