Skip to main content

Image Generation

Generate images from text prompts using diffusion models, served on the diffusers/generative backend.

Active public models (text-to-image)

ModelEndpointSource repoNotes
Stable Diffusion XLhf-stabilityai-stable-diffusion-xl-base-1.0stabilityai/stable-diffusion-xl-base-1.0High-resolution, ready
Stable Diffusion 3 Mediumhf-stabilityai-stable-diffusion-3-medium-diffusersstabilityai/stable-diffusion-3-medium-diffusersMMDiT architecture
FLUX.1-devhf-black-forest-labs-FLUX.1-devblack-forest-labs/FLUX.1-devHigh quality, Black Forest Labs
Z-Image-Turboz-image-turboTongyi-MAI/Z-Image-TurboFast, few-step

All active endpoints are currently free. Several are candidate (functional, not fully validated). Verify readiness in the live catalog:

curl "https://api.colabhive.com/api/builder/v1/endpoints?visibility=public&task_type=text-to-image"

You can import any HuggingFace image model with task_type="text-to-image".

Quick start

from colabhive import ColabHive

client = ColabHive(api_key="hive_...", account_id="YOUR_ACCOUNT_ID")

result = client.endpoints.infer(
endpoint_id="hf-stabilityai-stable-diffusion-xl-base-1.0", # SDK resolves the name to a UUID
input_data={
"prompt": "A sunset over mountains, oil painting style",
"negative_prompt": "blurry, low quality",
"width": 1024,
"height": 1024,
"num_inference_steps": 30,
"guidance_scale": 7.5,
},
)

for art in result.get("result", {}).get("output_artifacts", []):
client.endpoints.download_artifact(art["url"], f"./{art['filename']}")
print(f"Saved {art['filename']} ({art['size_bytes']} bytes)")

Generation can take a while and may cold-start; poll GET /tasks/{task_id} if the call returns {"status": "queued"}.

Input parameters (text-to-image)

ParameterTypeDefaultDescription
promptstringrequiredText description of the image
negative_promptstring""What to avoid
widthinteger512Image width
heightinteger512Image height
num_inference_stepsinteger30Quality vs. speed
guidance_scalenumber7.5Prompt adherence strength
num_imagesinteger1Images to generate
seedintegerrandomFor reproducibility

Output format

{
"output_artifacts": [
{
"filename": "image_0.png",
"url": "https://storage.colabhive.com/...",
"content_type": "image/png",
"size_bytes": 1048576,
"modality": "image"
}
],
"metadata": { "width": 1024, "height": 1024, "steps": 30 }
}

Fine-tuning (LoRA / DreamBooth)

See the Generative Models Guide for fine-tuning image models on your own data.


Authors: José Luis Minich, Maximiliano Lucius.