Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
nightmareai /cogvideo:00b1c788
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run nightmareai/cogvideo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"nightmareai/cogvideo:00b1c7885c5f1d44b51bcb56c378abc8f141eeacf94c1e64998606515fe63a8d",
{
input: {
seed: 1234,
prompt: "vaporwave princess",
translate: true,
both_stages: true,
image_prompt: "https://replicate.delivery/mgxm/7da0d0fe-2c18-4039-b01b-ae1523b2f016/1658847957.png",
use_guidance: true
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run nightmareai/cogvideo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"nightmareai/cogvideo:00b1c7885c5f1d44b51bcb56c378abc8f141eeacf94c1e64998606515fe63a8d",
input={
"seed": 1234,
"prompt": "vaporwave princess",
"translate": True,
"both_stages": True,
"image_prompt": "https://replicate.delivery/mgxm/7da0d0fe-2c18-4039-b01b-ae1523b2f016/1658847957.png",
"use_guidance": True
}
)
# The nightmareai/cogvideo model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/nightmareai/cogvideo/api#output-schema
print(item)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run nightmareai/cogvideo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "nightmareai/cogvideo:00b1c7885c5f1d44b51bcb56c378abc8f141eeacf94c1e64998606515fe63a8d",
"input": {
"seed": 1234,
"prompt": "vaporwave princess",
"translate": true,
"both_stages": true,
"image_prompt": "https://replicate.delivery/mgxm/7da0d0fe-2c18-4039-b01b-ae1523b2f016/1658847957.png",
"use_guidance": true
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2022-07-27T07:56:02.781320Z",
"created_at": "2022-07-27T07:31:34.054353Z",
"data_removed": false,
"error": null,
"id": "bbwbu2y7ojcvtckfhusxan5dhu",
"input": {
"seed": "1234",
"prompt": "vaporwave princess",
"translate": true,
"both_stages": true,
"image_prompt": "https://replicate.delivery/mgxm/7da0d0fe-2c18-4039-b01b-ae1523b2f016/1658847957.png",
"use_guidance": true
},
"logs": "2022-07-27 07:44:02 INFO [Generating First Frame with CogView2]Raw text: 蒸汽波公主 高清摄影\n2022-07-27 07:44:05 INFO [Stage1: Generating Subsequent Frames, Frame Rate 1.0]\nraw text: 蒸汽波公主 视频\n2022-07-27 07:49:31 INFO CogVideo Stage1 completed. Taken time 328.92\n\n2022-07-27 07:49:46 INFO [Stage2: Generating Frames, Frame Rate 2]\nraw text: 蒸汽波公主\n2022-07-27 07:51:23 INFO Duration 2.00, Taken time 97.55\n\n2022-07-27 07:51:23 INFO [Stage2: Generating Frames, Frame Rate 4]\nraw text: 蒸汽波公主",
"metrics": {
"predict_time": 725.520006,
"total_time": 1468.726967
},
"output": [
"https://replicate.delivery/mgxm/1d207f4e-e144-4e24-98ba-99fc3d8600c9/0.gif",
"https://replicate.delivery/mgxm/8f8e3821-8dde-43ac-ac79-1841a4ba57e6/0.gif"
],
"started_at": "2022-07-27T07:43:57.261314Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/bbwbu2y7ojcvtckfhusxan5dhu",
"cancel": "https://api.replicate.com/v1/predictions/bbwbu2y7ojcvtckfhusxan5dhu/cancel"
},
"version": "00b1c7885c5f1d44b51bcb56c378abc8f141eeacf94c1e64998606515fe63a8d"
}
2022-07-27 07:44:02 INFO [Generating First Frame with CogView2]Raw text: 蒸汽波公主 高清摄影
2022-07-27 07:44:05 INFO [Stage1: Generating Subsequent Frames, Frame Rate 1.0]
raw text: 蒸汽波公主 视频
2022-07-27 07:49:31 INFO CogVideo Stage1 completed. Taken time 328.92
2022-07-27 07:49:46 INFO [Stage2: Generating Frames, Frame Rate 2]
raw text: 蒸汽波公主
2022-07-27 07:51:23 INFO Duration 2.00, Taken time 97.55
2022-07-27 07:51:23 INFO [Stage2: Generating Frames, Frame Rate 4]
raw text: 蒸汽波公主