typetext
{
"frames_per_second": 20,
"guidance_scale": 7.5,
"height": "768",
"num_animation_frames": "20",
"num_inference_steps": "20",
"num_interpolation_steps": "25",
"prompt_end": "tropical jungle, cgsociety",
"prompt_start": "colorful abstract patterns",
"seed_end": 2,
"seed_start": 1,
"width": "1024"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_CWE**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run andreasjansson/tile-morph using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"andreasjansson/tile-morph:a819625e6d8b1884f0c5328cec39a7296737ab9bb4d1ea1d8a31a916cafa27bf",
{
input: {
frames_per_second: 20,
guidance_scale: 7.5,
height: "768",
num_animation_frames: "20",
num_inference_steps: "20",
num_interpolation_steps: "25",
prompt_end: "tropical jungle, cgsociety",
prompt_start: "colorful abstract patterns",
seed_end: 2,
seed_start: 1,
width: "1024"
}
}
);
// 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=r8_CWE**********************************
This is your API token. Keep it to yourself.
import replicate
Run andreasjansson/tile-morph using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"andreasjansson/tile-morph:a819625e6d8b1884f0c5328cec39a7296737ab9bb4d1ea1d8a31a916cafa27bf",
input={
"frames_per_second": 20,
"guidance_scale": 7.5,
"height": "768",
"num_animation_frames": "20",
"num_inference_steps": "20",
"num_interpolation_steps": "25",
"prompt_end": "tropical jungle, cgsociety",
"prompt_start": "colorful abstract patterns",
"seed_end": 2,
"seed_start": 1,
"width": "1024"
}
)
# The andreasjansson/tile-morph 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/andreasjansson/tile-morph/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=r8_CWE**********************************
This is your API token. Keep it to yourself.
Run andreasjansson/tile-morph 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": "andreasjansson/tile-morph:a819625e6d8b1884f0c5328cec39a7296737ab9bb4d1ea1d8a31a916cafa27bf",
"input": {
"frames_per_second": 20,
"guidance_scale": 7.5,
"height": "768",
"num_animation_frames": "20",
"num_inference_steps": "20",
"num_interpolation_steps": "25",
"prompt_end": "tropical jungle, cgsociety",
"prompt_start": "colorful abstract patterns",
"seed_end": 2,
"seed_start": 1,
"width": "1024"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "tbsl3qsevrap3a7y27y66emtbe",
"model": "andreasjansson/tile-morph",
"version": "a819625e6d8b1884f0c5328cec39a7296737ab9bb4d1ea1d8a31a916cafa27bf",
"input": {
"frames_per_second": 20,
"guidance_scale": 7.5,
"height": "768",
"num_animation_frames": "20",
"num_inference_steps": "20",
"num_interpolation_steps": "25",
"prompt_end": "tropical jungle, cgsociety",
"prompt_start": "colorful abstract patterns",
"seed_end": 2,
"seed_start": 1,
"width": "1024"
},
"logs": "Using seeds: 1, 2\nGenerating first and last keyframes\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\nGenerating frame 1 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.153036117553711\nGenerating frame 2 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1492583751678467\nGenerating frame 3 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1709370613098145\nGenerating frame 4 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1507010459899902\nGenerating frame 5 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.14638352394104\nGenerating frame 6 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.16998553276062\nGenerating frame 7 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.170248508453369\nGenerating frame 8 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.172081708908081\nGenerating frame 9 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1681506633758545\nGenerating frame 10 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1461799144744873\nGenerating frame 11 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.17413592338562\nGenerating frame 12 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.131671905517578\nGenerating frame 13 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1551811695098877\nGenerating frame 14 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1367413997650146\nGenerating frame 15 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1480202674865723\nGenerating frame 16 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.143221139907837\nGenerating frame 17 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.140272855758667\nGenerating frame 18 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1339914798736572\nGenerating frame 19 of keyframe 0\n 0%| | 0/20 [00:00<?, ?it/s]\n0%| | 0/20 [00:03<?, ?it/s]\ndenoise time.time() - t=3.1306416988372803\nInterpolating images from latents\nSaving MP4",
"output": [
"https://replicate.delivery/pbxt/ZUZ5fk3s7X2RPaKecNyxmIefTkPftReHhooV2NWY0XJ9lgGIE/output.mp4"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-02-20T22:02:28.797Z",
"started_at": "2023-02-20T22:02:28.876273Z",
"completed_at": "2023-02-20T22:05:12.949739Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/tbsl3qsevrap3a7y27y66emtbe/cancel",
"get": "https://api.replicate.com/v1/predictions/tbsl3qsevrap3a7y27y66emtbe"
},
"metrics": {
"predict_time": 164.073466,
"total_time": 164.152739
}
}