594 lines
27 KiB
JSON
594 lines
27 KiB
JSON
{
|
|
"url": "https://replicate.com/black-forest-labs/flux-dev",
|
|
"owner": "black-forest-labs",
|
|
"name": "flux-dev",
|
|
"description": "A 12 billion parameter rectified flow transformer capable of generating images from text descriptions",
|
|
"visibility": "public",
|
|
"github_url": "https://github.com/replicate/cog-flux",
|
|
"paper_url": null,
|
|
"license_url": "https://github.com/black-forest-labs/flux/blob/main/model_licenses/LICENSE-FLUX1-dev",
|
|
"run_count": 0,
|
|
"cover_image_url": "https://tjzk.replicate.delivery/models_models_featured_image/cb4203e5-9ece-42e7-b326-98ff3fa35c3a/Replicate_Prediction_15.webp",
|
|
"default_example": {
|
|
"id": "jbwzpaxs71rm40cj1e5rqq33c0",
|
|
"model": "replicate/flux-dev-internal-model",
|
|
"version": "2081ff3a5490ce6b6a2040d3d280a6beb2efbcf63851aabce421fbed8be6e9a2",
|
|
"status": "succeeded",
|
|
"input": {
|
|
"prompt": "black forest gateau cake spelling out the words \"FLUX DEV\", tasty, food photography, dynamic shot",
|
|
"go_fast": true,
|
|
"guidance": 3.5,
|
|
"num_outputs": 1,
|
|
"aspect_ratio": "1:1",
|
|
"output_format": "webp",
|
|
"output_quality": 80,
|
|
"prompt_strength": 0.8,
|
|
"num_inference_steps": 28
|
|
},
|
|
"output": [
|
|
"https://replicate.delivery/yhqm/xU3wLlAQcGpZLVQipTVxaZMaL4omk9n7d1suU0byMnngfQvJA/out-0.webp"
|
|
],
|
|
"logs": "running quantized prediction\ngenerating\nUsing seed: 9337\n 0%| | 0/28 [00:00<?, ?it/s]\n 7%|▋ | 2/28 [00:00<00:01, 17.38it/s]\n 14%|█▍ | 4/28 [00:00<00:01, 12.53it/s]\n 21%|██▏ | 6/28 [00:00<00:01, 11.49it/s]\n 29%|██▊ | 8/28 [00:00<00:01, 11.06it/s]\n 36%|███▌ | 10/28 [00:00<00:01, 10.76it/s]\n 43%|████▎ | 12/28 [00:01<00:01, 10.50it/s]\n 50%|█████ | 14/28 [00:01<00:01, 10.46it/s]\n 57%|█████▋ | 16/28 [00:01<00:01, 10.46it/s]\n 64%|██████▍ | 18/28 [00:01<00:00, 10.44it/s]\n 71%|███████▏ | 20/28 [00:01<00:00, 10.40it/s]\n 79%|███████▊ | 22/28 [00:02<00:00, 10.26it/s]\n 86%|████████▌ | 24/28 [00:02<00:00, 10.29it/s]\n 93%|█████████▎| 26/28 [00:02<00:00, 10.34it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.37it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.65it/s]\nTotal safe images: 1 out of 1",
|
|
"error": null,
|
|
"metrics": {
|
|
"image_count": 1,
|
|
"predict_time": 3.200260047,
|
|
"total_time": 3.208556
|
|
},
|
|
"created_at": "2024-09-19T18:29:19.288000Z",
|
|
"started_at": "2024-09-19T18:29:19.296296Z",
|
|
"completed_at": "2024-09-19T18:29:22.496556Z",
|
|
"urls": {
|
|
"get": "https://api.replicate.com/v1/predictions/jbwzpaxs71rm40cj1e5rqq33c0",
|
|
"cancel": "https://api.replicate.com/v1/predictions/jbwzpaxs71rm40cj1e5rqq33c0/cancel"
|
|
}
|
|
},
|
|
"latest_version": {
|
|
"id": "0cce3d40843963ebc7b6d976778e977c8f3ae3d0980a37cb5204f8fa0289e3d2",
|
|
"created_at": "2024-10-02T01:36:05.962718+00:00",
|
|
"cog_version": "0.9.21",
|
|
"openapi_schema": {
|
|
"info": {
|
|
"title": "Cog",
|
|
"version": "0.1.0"
|
|
},
|
|
"paths": {
|
|
"/": {
|
|
"get": {
|
|
"summary": "Root",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Root Get"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
}
|
|
},
|
|
"operationId": "root__get"
|
|
}
|
|
},
|
|
"/shutdown": {
|
|
"post": {
|
|
"summary": "Start Shutdown",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Start Shutdown Shutdown Post"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
}
|
|
},
|
|
"operationId": "start_shutdown_shutdown_post"
|
|
}
|
|
},
|
|
"/predictions": {
|
|
"post": {
|
|
"summary": "Predict",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PredictionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"in": "header",
|
|
"name": "prefer",
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Prefer"
|
|
},
|
|
"required": false
|
|
}
|
|
],
|
|
"description": "Run a single prediction on the model",
|
|
"operationId": "predict_predictions_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PredictionRequest"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/health-check": {
|
|
"get": {
|
|
"summary": "Healthcheck",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Healthcheck Health Check Get"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
}
|
|
},
|
|
"operationId": "healthcheck_health_check_get"
|
|
}
|
|
},
|
|
"/predictions/{prediction_id}": {
|
|
"put": {
|
|
"summary": "Predict Idempotent",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PredictionResponse"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "prediction_id",
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Prediction ID"
|
|
},
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "header",
|
|
"name": "prefer",
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Prefer"
|
|
},
|
|
"required": false
|
|
}
|
|
],
|
|
"description": "Run a single prediction on the model (idempotent creation).",
|
|
"operationId": "predict_idempotent_predictions__prediction_id__put",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PredictionRequest"
|
|
}
|
|
],
|
|
"title": "Prediction Request"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/predictions/{prediction_id}/cancel": {
|
|
"post": {
|
|
"summary": "Cancel",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"title": "Response Cancel Predictions Prediction Id Cancel Post"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successful Response"
|
|
},
|
|
"422": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
},
|
|
"description": "Validation Error"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "prediction_id",
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Prediction ID"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"description": "Cancel a running prediction",
|
|
"operationId": "cancel_predictions__prediction_id__cancel_post"
|
|
}
|
|
}
|
|
},
|
|
"openapi": "3.0.2",
|
|
"components": {
|
|
"schemas": {
|
|
"Input": {
|
|
"type": "object",
|
|
"title": "Input",
|
|
"required": [
|
|
"prompt"
|
|
],
|
|
"properties": {
|
|
"seed": {
|
|
"type": "integer",
|
|
"title": "Seed",
|
|
"x-order": 7,
|
|
"description": "Random seed. Set for reproducible generation"
|
|
},
|
|
"image": {
|
|
"type": "string",
|
|
"title": "Image",
|
|
"format": "uri",
|
|
"x-order": 2,
|
|
"description": "Input image for image to image mode. The aspect ratio of your output will match this image"
|
|
},
|
|
"prompt": {
|
|
"type": "string",
|
|
"title": "Prompt",
|
|
"x-order": 0,
|
|
"description": "Prompt for generated image"
|
|
},
|
|
"go_fast": {
|
|
"type": "boolean",
|
|
"title": "Go Fast",
|
|
"default": true,
|
|
"x-order": 11,
|
|
"description": "Run faster predictions with model optimized for speed (currently fp8 quantized); disable to run in original bf16"
|
|
},
|
|
"guidance": {
|
|
"type": "number",
|
|
"title": "Guidance",
|
|
"default": 3,
|
|
"maximum": 10,
|
|
"minimum": 0,
|
|
"x-order": 6,
|
|
"description": "Guidance for generated image"
|
|
},
|
|
"megapixels": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/megapixels"
|
|
}
|
|
],
|
|
"default": "1",
|
|
"x-order": 12,
|
|
"description": "Approximate number of megapixels for generated image"
|
|
},
|
|
"num_outputs": {
|
|
"type": "integer",
|
|
"title": "Num Outputs",
|
|
"default": 1,
|
|
"maximum": 4,
|
|
"minimum": 1,
|
|
"x-order": 4,
|
|
"description": "Number of outputs to generate"
|
|
},
|
|
"aspect_ratio": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/aspect_ratio"
|
|
}
|
|
],
|
|
"default": "1:1",
|
|
"x-order": 1,
|
|
"description": "Aspect ratio for the generated image"
|
|
},
|
|
"output_format": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/output_format"
|
|
}
|
|
],
|
|
"default": "webp",
|
|
"x-order": 8,
|
|
"description": "Format of the output images"
|
|
},
|
|
"output_quality": {
|
|
"type": "integer",
|
|
"title": "Output Quality",
|
|
"default": 80,
|
|
"maximum": 100,
|
|
"minimum": 0,
|
|
"x-order": 9,
|
|
"description": "Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs"
|
|
},
|
|
"prompt_strength": {
|
|
"type": "number",
|
|
"title": "Prompt Strength",
|
|
"default": 0.8,
|
|
"maximum": 1,
|
|
"minimum": 0,
|
|
"x-order": 3,
|
|
"description": "Prompt strength when using img2img. 1.0 corresponds to full destruction of information in image"
|
|
},
|
|
"num_inference_steps": {
|
|
"type": "integer",
|
|
"title": "Num Inference Steps",
|
|
"default": 28,
|
|
"maximum": 50,
|
|
"minimum": 1,
|
|
"x-order": 5,
|
|
"description": "Number of denoising steps. Recommended range is 28-50"
|
|
},
|
|
"disable_safety_checker": {
|
|
"type": "boolean",
|
|
"title": "Disable Safety Checker",
|
|
"default": false,
|
|
"x-order": 10,
|
|
"description": "Disable safety checker for generated images."
|
|
}
|
|
}
|
|
},
|
|
"Output": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"title": "Output"
|
|
},
|
|
"Status": {
|
|
"enum": [
|
|
"starting",
|
|
"processing",
|
|
"succeeded",
|
|
"canceled",
|
|
"failed"
|
|
],
|
|
"type": "string",
|
|
"title": "Status",
|
|
"description": "An enumeration."
|
|
},
|
|
"megapixels": {
|
|
"enum": [
|
|
"1",
|
|
"0.25"
|
|
],
|
|
"type": "string",
|
|
"title": "megapixels",
|
|
"description": "An enumeration."
|
|
},
|
|
"WebhookEvent": {
|
|
"enum": [
|
|
"start",
|
|
"output",
|
|
"logs",
|
|
"completed"
|
|
],
|
|
"type": "string",
|
|
"title": "WebhookEvent",
|
|
"description": "An enumeration."
|
|
},
|
|
"aspect_ratio": {
|
|
"enum": [
|
|
"1:1",
|
|
"16:9",
|
|
"21:9",
|
|
"3:2",
|
|
"2:3",
|
|
"4:5",
|
|
"5:4",
|
|
"3:4",
|
|
"4:3",
|
|
"9:16",
|
|
"9:21"
|
|
],
|
|
"type": "string",
|
|
"title": "aspect_ratio",
|
|
"description": "An enumeration."
|
|
},
|
|
"output_format": {
|
|
"enum": [
|
|
"webp",
|
|
"jpg",
|
|
"png"
|
|
],
|
|
"type": "string",
|
|
"title": "output_format",
|
|
"description": "An enumeration."
|
|
},
|
|
"ValidationError": {
|
|
"type": "object",
|
|
"title": "ValidationError",
|
|
"required": [
|
|
"loc",
|
|
"msg",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"loc": {
|
|
"type": "array",
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
]
|
|
},
|
|
"title": "Location"
|
|
},
|
|
"msg": {
|
|
"type": "string",
|
|
"title": "Message"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"title": "Error Type"
|
|
}
|
|
}
|
|
},
|
|
"PredictionRequest": {
|
|
"type": "object",
|
|
"title": "PredictionRequest",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"title": "Id"
|
|
},
|
|
"input": {
|
|
"$ref": "#/components/schemas/Input"
|
|
},
|
|
"webhook": {
|
|
"type": "string",
|
|
"title": "Webhook",
|
|
"format": "uri",
|
|
"maxLength": 65536,
|
|
"minLength": 1
|
|
},
|
|
"created_at": {
|
|
"type": "string",
|
|
"title": "Created At",
|
|
"format": "date-time"
|
|
},
|
|
"output_file_prefix": {
|
|
"type": "string",
|
|
"title": "Output File Prefix"
|
|
},
|
|
"webhook_events_filter": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/WebhookEvent"
|
|
},
|
|
"default": [
|
|
"start",
|
|
"output",
|
|
"logs",
|
|
"completed"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"PredictionResponse": {
|
|
"type": "object",
|
|
"title": "PredictionResponse",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"title": "Id"
|
|
},
|
|
"logs": {
|
|
"type": "string",
|
|
"title": "Logs",
|
|
"default": ""
|
|
},
|
|
"error": {
|
|
"type": "string",
|
|
"title": "Error"
|
|
},
|
|
"input": {
|
|
"$ref": "#/components/schemas/Input"
|
|
},
|
|
"output": {
|
|
"$ref": "#/components/schemas/Output"
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/Status"
|
|
},
|
|
"metrics": {
|
|
"type": "object",
|
|
"title": "Metrics"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"title": "Version"
|
|
},
|
|
"created_at": {
|
|
"type": "string",
|
|
"title": "Created At",
|
|
"format": "date-time"
|
|
},
|
|
"started_at": {
|
|
"type": "string",
|
|
"title": "Started At",
|
|
"format": "date-time"
|
|
},
|
|
"completed_at": {
|
|
"type": "string",
|
|
"title": "Completed At",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"HTTPValidationError": {
|
|
"type": "object",
|
|
"title": "HTTPValidationError",
|
|
"properties": {
|
|
"detail": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ValidationError"
|
|
},
|
|
"title": "Detail"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |