Skip to main content

Hugging Face

Use public or private image generation Spaces on the Hugging Face Hub.

Setup Requirements

  • Space ID: Find the ID of the Space you wish to use. The format is organization/space-name (e.g., stabilityai/stable-diffusion-3-medium).
  • Token (Optional): If the Space is private or requires login, you must provide a Hugging Face User Access Token. This can be created in your Hugging Face account settings.

Customizing Parameters

  • Parameters can be configured by writing them in JSON format. The application will automatically insert the prompt and negative_prompt based on the story.
  • Depending on the model, the presence of unnecessary parameters may cause it to fail. In such cases, you can disable a parameter by setting its value to delete. For example, to disable the negative_prompt, write "negative_prompt": "delete" in the JSON.
  • If the API name is not /infer, you can change it by entering the API name in apiname.

Configuration Examples

black-forest-labs/FLUX.2-klein-4B
{
"mode_choice": "Distilled (4 steps)",
"seed": 0,
"randomize_seed": true,
"width": 1024,
"height": 1024,
"num_inference_steps": 4,
"guidance_scale": 1,
"prompt_upsampling": false,
"negative_prompt": "delete",
"apiname": "/infer"
}

Space


lehehroi/Illustrious130 Space

{
"seed": 0,
"randomize_seed": true,
"width": 1024,
"height": 1024,
"num_inference_steps": 28,
"prompt": "best quality",
"negative_prompt": "monochrome, (low quality, worst quality:1.2), very displeasing, 3d, watermark, signature, ugly, poorly drawn,"
}

mrfakename/Z-Image-Turbo Space

{
"seed": 0,
"randomize_seed": true,
"width": 1024,
"height": 1024,
"num_inference_steps": 9,
"prompt": "best quality",
"negative_prompt": "delete",
"apiname": "/generate_image"
}

mcp-tools/Qwen-Image-Fast Space

{
"seed": 0,
"aspect_ratio": "1:1",
"guidance_scale": 1,
"num_inference_steps": 4,
"negative_prompt": "delete",
"width": "delete",
"height": "delete",
"apiname": "/generate_image"
}

Troubleshooting

Extremely few images can be generated with the free tier, or none at all

  • The amount of free tier quota used per image varies by Space. Since it is time-based, Spaces that take longer to generate will allow fewer images.
  • The free tier appears to be managed by IP address. If you are using an internet provider that shares global addresses, other users may have exhausted the free quota.
  • Details such as the recovery rate of the free tier are not publicly disclosed and may change, so we cannot provide precise information on this.