Fooocus

Default parameters with automated optimizations and quality improvements.

Input

Fields marked * are required. Review the price before generating.

The prompt to use for generating the image. Be as descriptive as possible for best results.

The size of the generated image. You can choose between some presets or custom height and width that **must be multiples of 8**.

Number of images to generate in one request

The image to use as a reference for the generated image.

Uploading a file needs an account. Create accountJPEG, PNG, WebP · up to 25 MB

The image to use as a reference for inpainting.

Uploading a file needs an account. Create accountJPEG, PNG, WebP · up to 25 MB

The image to use as a mask for the generated image.

Uploading a file needs an account. Create accountJPEG, PNG, WebP · up to 25 MB

Additional settings
Tips and requirements

The negative prompt to use. Use it to address details that you don't want in the image. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution).

You can choose Speed or Quality

Tips and requirements

The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.

Tips and requirements

The sharpness of the generated image. Use it to control how sharp the generated image should be. Higher value means image and texture are sharper.

The LoRAs to use for the image generation. You can use up to 5 LoRAs and they will be merged together to generate the final image.

Loras 1

URL or the path to the LoRA weights.

The scale of the LoRA weight. This is used to scale the LoRA weight before merging it with the base model.

Refiner (SDXL or SD 1.5)

Use 0.4 for SD1.5 realistic models; 0.667 for SD1.5 anime models 0.8 for XL-refiners; or any value for switching two SDXL models.

The format of the generated image.

The same seed and the same prompt given to the same version of Stable Diffusion will output the same image every time.

The type of image control

The strength of the control image. Use it to control how much the generated image should look like the control image.

The stop at value of the control image. Use it to control how much the generated image should look like the control image.

Price$0.60 / run

You sign up first. Your settings are kept.

API code for this input

Uses your current form values and requests a new quote. Running the generation step uses your balance. Get an API key

# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "fooocus",
  "input": {
    "prompt": "",
    "negative_prompt": "",
    "performance": "Extreme Speed",
    "guidance_scale": 4,
    "sharpness": 2,
    "aspect_ratio": "1024x1024",
    "num_images": 1,
    "loras": [
      {
        "path": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors",
        "scale": 0.1
      }
    ],
    "refiner_model": "None",
    "refiner_switch": 0.8,
    "output_format": "jpeg",
    "sync_mode": false,
    "control_type": "PyraCanny",
    "control_image_weight": 1,
    "control_image_stop_at": 1,
    "mixing_image_prompt_and_inpaint": false
  }
}'

# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "fooocus", "quote_id": "QUOTE_ID", "input": {"prompt":"","negative_prompt":"","performance":"Extreme Speed","guidance_scale":4,"sharpness":2,"aspect_ratio":"1024x1024","num_images":1,"loras":[{"path":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors","scale":0.1}],"refiner_model":"None","refiner_switch":0.8,"output_format":"jpeg","sync_mode":false,"control_type":"PyraCanny","control_image_weight":1,"control_image_stop_at":1,"mixing_image_prompt_and_inpaint":false}}'

# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $RAYWAKE_API_KEY"

Set RAYWAKE_API_KEY before running. Replace QUOTE_ID and JOB_ID in cURL with the returned values. File links can expire; refresh them if you run the code later.

More runnable examples on GitHub

How to use Fooocus

Getting started

Try a visual treatment from a prompt, or start with an image when you need a local edit or a larger version. Choose the operation that matches the change you want.

Review your result

Inspect lettering, edges and fine detail. For inpainting, compare the masked boundary with the original; for upscaling, check that new details remain plausible.

Inputs and settings

Choose generation, inpainting or upscale/variation. Inpainting needs inpaint_image_url; upscale/variation needs uov_image_url. Use a mask for a specific region when the selected operation exposes it.

Choose styles, performance and num_images within the current form. Record the seed when comparing changes, and choose output_format for delivery.

The quote reserves a maximum of 300 compute seconds per run. The provider-recorded runtime determines the final charge; unused reserved funds return to your balance. This ceiling does not guarantee a completion time.