615 lines
28 KiB
JSON
615 lines
28 KiB
JSON
{
|
||
"url": "https://replicate.com/fofr/latent-consistency-model",
|
||
"owner": "fofr",
|
||
"name": "latent-consistency-model",
|
||
"description": "Super-fast, 0.6s per image. LCM with img2img, large batching and canny controlnet",
|
||
"visibility": "public",
|
||
"github_url": "https://github.com/fofr/cog-lcm",
|
||
"paper_url": null,
|
||
"license_url": "https://github.com/fofr/cog-lcm/blob/main/LICENSE",
|
||
"run_count": 0,
|
||
"cover_image_url": "https://tjzk.replicate.delivery/models_models_featured_image/859c8ec6-4046-4d4e-9826-b7b575e5b79f/cover.webp",
|
||
"default_example": {
|
||
"id": "uzzsxzjb2sus5xl5jqnxpjlyoq",
|
||
"model": "fofr/latent-consistency-model",
|
||
"version": "fd0f02756ae5c3244cfb45c0603296e7418c07d1501bc6e9463ea2d215d5e38f",
|
||
"status": "succeeded",
|
||
"input": {
|
||
"image": "https://replicate.delivery/pbxt/JlG0Efd2ubBp9yGnlOi7I9Se2rXnJSrPFogLf0YieKgjnWN6/download-6.png",
|
||
"width": 768,
|
||
"height": 768,
|
||
"prompt": "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k",
|
||
"num_images": 1,
|
||
"guidance_scale": 8,
|
||
"archive_outputs": false,
|
||
"prompt_strength": 0.45,
|
||
"sizing_strategy": "width/height",
|
||
"lcm_origin_steps": 50,
|
||
"canny_low_threshold": 100,
|
||
"num_inference_steps": 4,
|
||
"canny_high_threshold": 200,
|
||
"control_guidance_end": 1,
|
||
"control_guidance_start": 0,
|
||
"controlnet_conditioning_scale": 2
|
||
},
|
||
"output": [
|
||
"https://replicate.delivery/pbxt/LF23xWrMie2vMCmbiswetET2BLperpEtNodZSN4yNfDkAClHB/out-0.jpg"
|
||
],
|
||
"logs": "Using seed: 38477\nFound 1 prompt:\n- Self-portrait oil painting, a beautiful cyborg with golden hair, 8k\nMaking 1 image\nUsing given dimensions\nimg2img mode\n 0%| | 0/4 [00:00<?, ?it/s]\n 50%|█████ | 2/4 [00:00<00:00, 17.91it/s]\n100%|██████████| 4/4 [00:00<00:00, 17.82it/s]\n100%|██████████| 4/4 [00:00<00:00, 17.81it/s]",
|
||
"error": null,
|
||
"metrics": {
|
||
"predict_time": 0.845919,
|
||
"total_time": 1.28709
|
||
},
|
||
"created_at": "2023-11-17T12:01:12.926959Z",
|
||
"started_at": "2023-11-17T12:01:13.368130Z",
|
||
"completed_at": "2023-11-17T12:01:14.214049Z",
|
||
"urls": {
|
||
"get": "https://api.replicate.com/v1/predictions/uzzsxzjb2sus5xl5jqnxpjlyoq",
|
||
"cancel": "https://api.replicate.com/v1/predictions/uzzsxzjb2sus5xl5jqnxpjlyoq/cancel"
|
||
}
|
||
},
|
||
"latest_version": {
|
||
"id": "683d19dc312f7a9f0428b04429a9ccefd28dbf7785fef083ad5cf991b65f406f",
|
||
"created_at": "2024-01-10T10:02:04.312938+00:00",
|
||
"cog_version": "0.8.6",
|
||
"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",
|
||
"properties": {
|
||
"seed": {
|
||
"type": "integer",
|
||
"title": "Seed",
|
||
"x-order": 10,
|
||
"description": "Random seed. Leave blank to randomize the seed"
|
||
},
|
||
"image": {
|
||
"type": "string",
|
||
"title": "Image",
|
||
"format": "uri",
|
||
"x-order": 4,
|
||
"description": "Input image for img2img"
|
||
},
|
||
"width": {
|
||
"type": "integer",
|
||
"title": "Width",
|
||
"default": 768,
|
||
"x-order": 1,
|
||
"description": "Width of output image. Lower if out of memory"
|
||
},
|
||
"height": {
|
||
"type": "integer",
|
||
"title": "Height",
|
||
"default": 768,
|
||
"x-order": 2,
|
||
"description": "Height of output image. Lower if out of memory"
|
||
},
|
||
"prompt": {
|
||
"type": "string",
|
||
"title": "Prompt",
|
||
"default": "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k",
|
||
"x-order": 0,
|
||
"description": "For multiple prompts, enter each on a new line."
|
||
},
|
||
"num_images": {
|
||
"type": "integer",
|
||
"title": "Num Images",
|
||
"default": 1,
|
||
"maximum": 50,
|
||
"minimum": 1,
|
||
"x-order": 6,
|
||
"description": "Number of images per prompt"
|
||
},
|
||
"control_image": {
|
||
"type": "string",
|
||
"title": "Control Image",
|
||
"format": "uri",
|
||
"x-order": 11,
|
||
"description": "Image for controlnet conditioning"
|
||
},
|
||
"guidance_scale": {
|
||
"type": "number",
|
||
"title": "Guidance Scale",
|
||
"default": 8,
|
||
"maximum": 20,
|
||
"minimum": 1,
|
||
"x-order": 8,
|
||
"description": "Scale for classifier-free guidance"
|
||
},
|
||
"archive_outputs": {
|
||
"type": "boolean",
|
||
"title": "Archive Outputs",
|
||
"default": false,
|
||
"x-order": 17,
|
||
"description": "Option to archive the output images"
|
||
},
|
||
"prompt_strength": {
|
||
"type": "number",
|
||
"title": "Prompt Strength",
|
||
"default": 0.8,
|
||
"maximum": 1,
|
||
"minimum": 0,
|
||
"x-order": 5,
|
||
"description": "Prompt strength when using img2img. 1.0 corresponds to full destruction of information in image"
|
||
},
|
||
"sizing_strategy": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/sizing_strategy"
|
||
}
|
||
],
|
||
"default": "width/height",
|
||
"x-order": 3,
|
||
"description": "Decide how to resize images – use width/height, resize based on input image or control image"
|
||
},
|
||
"lcm_origin_steps": {
|
||
"type": "integer",
|
||
"title": "Lcm Origin Steps",
|
||
"default": 50,
|
||
"minimum": 1,
|
||
"x-order": 9
|
||
},
|
||
"canny_low_threshold": {
|
||
"type": "number",
|
||
"title": "Canny Low Threshold",
|
||
"default": 100,
|
||
"maximum": 255,
|
||
"minimum": 1,
|
||
"x-order": 15,
|
||
"description": "Canny low threshold"
|
||
},
|
||
"num_inference_steps": {
|
||
"type": "integer",
|
||
"title": "Num Inference Steps",
|
||
"default": 8,
|
||
"maximum": 50,
|
||
"minimum": 1,
|
||
"x-order": 7,
|
||
"description": "Number of denoising steps. Recommend 1 to 8 steps."
|
||
},
|
||
"canny_high_threshold": {
|
||
"type": "number",
|
||
"title": "Canny High Threshold",
|
||
"default": 200,
|
||
"maximum": 255,
|
||
"minimum": 1,
|
||
"x-order": 16,
|
||
"description": "Canny high threshold"
|
||
},
|
||
"control_guidance_end": {
|
||
"type": "number",
|
||
"title": "Control Guidance End",
|
||
"default": 1,
|
||
"maximum": 1,
|
||
"minimum": 0,
|
||
"x-order": 14,
|
||
"description": "Controlnet end"
|
||
},
|
||
"control_guidance_start": {
|
||
"type": "number",
|
||
"title": "Control Guidance Start",
|
||
"default": 0,
|
||
"maximum": 1,
|
||
"minimum": 0,
|
||
"x-order": 13,
|
||
"description": "Controlnet start"
|
||
},
|
||
"disable_safety_checker": {
|
||
"type": "boolean",
|
||
"title": "Disable Safety Checker",
|
||
"default": false,
|
||
"x-order": 18,
|
||
"description": "Disable safety checker for generated images. This feature is only available through the API"
|
||
},
|
||
"controlnet_conditioning_scale": {
|
||
"type": "number",
|
||
"title": "Controlnet Conditioning Scale",
|
||
"default": 2,
|
||
"maximum": 4,
|
||
"minimum": 0.1,
|
||
"x-order": 12,
|
||
"description": "Controlnet conditioning scale"
|
||
}
|
||
}
|
||
},
|
||
"Output": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string",
|
||
"format": "uri"
|
||
},
|
||
"title": "Output"
|
||
},
|
||
"Status": {
|
||
"enum": [
|
||
"starting",
|
||
"processing",
|
||
"succeeded",
|
||
"canceled",
|
||
"failed"
|
||
],
|
||
"type": "string",
|
||
"title": "Status",
|
||
"description": "An enumeration."
|
||
},
|
||
"WebhookEvent": {
|
||
"enum": [
|
||
"start",
|
||
"output",
|
||
"logs",
|
||
"completed"
|
||
],
|
||
"type": "string",
|
||
"title": "WebhookEvent",
|
||
"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"
|
||
}
|
||
}
|
||
},
|
||
"sizing_strategy": {
|
||
"enum": [
|
||
"width/height",
|
||
"input_image",
|
||
"control_image"
|
||
],
|
||
"type": "string",
|
||
"title": "sizing_strategy",
|
||
"description": "An enumeration."
|
||
},
|
||
"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"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} |