YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Qwen Image 2.1 โ€” Hugging Face Endpoint handler

This repository contains the custom EndpointHandler used by the dedicated Inference Endpoint. It loads the public Qwen/Qwen-Image-2.1 checkpoint with QwenImage21Pipeline; the weights are downloaded by the endpoint at startup and are not copied into this repository.

Text-to-image request

Send JSON and request a PNG response:

{
  "inputs": "A ceramic teapot on a wooden table",
  "parameters": {
    "width": 1024,
    "height": 1024,
    "num_inference_steps": 40,
    "seed": 42
  }
}

The supported dimensions are multiples of 16, from 512 to 2752 pixels, with a maximum of 7 million pixels per image. The default is 2048ร—2048 and 40 steps. The handler returns the first image when a request asks for multiple images.

Image editing request

Add a base64-encoded image in image (or a list in images) and use the same JSON shape:

{
  "inputs": "Change the background to a sunset beach",
  "image": "<base64 PNG or data:image/png;base64,...>"
}

The endpoint is authenticated. Keep the endpoint URL and access token private.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support