Prediction
genmoai/mochi-1-lora:bad496d88086d5f60307291a512fdcb4fab0b30027e7ccbcc2ecf5e6606d5e20Input
- fps
- 24
- seed
- 8520
- prompt
- a parrot flying in the blue skies, a grainy or noisy video effect in the background
- hf_lora
- lucataco/mochi-lora-vhs
- lora_scale
- 1
- num_frames
- 121
- guidance_scale
- 6
- num_inference_steps
- 30
{
"fps": 24,
"seed": 8520,
"prompt": "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
"hf_lora": "lucataco/mochi-lora-vhs",
"lora_scale": 1,
"num_frames": 121,
"guidance_scale": 6,
"num_inference_steps": 30
}
Install Replicate’s Node.js client library:
npm install replicate
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run genmoai/mochi-1-lora using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"genmoai/mochi-1-lora:bad496d88086d5f60307291a512fdcb4fab0b30027e7ccbcc2ecf5e6606d5e20",
{
input: {
fps: 24,
seed: 8520,
prompt: "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
hf_lora: "lucataco/mochi-lora-vhs",
lora_scale: 1,
num_frames: 121,
guidance_scale: 6,
num_inference_steps: 30
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:
pip install replicate
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:
import replicate
Run genmoai/mochi-1-lora using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"genmoai/mochi-1-lora:bad496d88086d5f60307291a512fdcb4fab0b30027e7ccbcc2ecf5e6606d5e20",
input={
"fps": 24,
"seed": 8520,
"prompt": "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
"hf_lora": "lucataco/mochi-lora-vhs",
"lora_scale": 1,
"num_frames": 121,
"guidance_scale": 6,
"num_inference_steps": 30
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run genmoai/mochi-1-lora 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": "genmoai/mochi-1-lora:bad496d88086d5f60307291a512fdcb4fab0b30027e7ccbcc2ecf5e6606d5e20",
"input": {
"fps": 24,
"seed": 8520,
"prompt": "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
"hf_lora": "lucataco/mochi-lora-vhs",
"lora_scale": 1,
"num_frames": 121,
"guidance_scale": 6,
"num_inference_steps": 30
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{
"completed_at": "2024-12-11T19:30:20.554707Z",
"created_at": "2024-12-11T19:25:47.264000Z",
"data_removed": false,
"error": null,
"id": "sk5q509zg1rma0ckpwqtq3t9zw",
"input": {
"fps": 24,
"seed": 8520,
"prompt": "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
"hf_lora": "lucataco/mochi-lora-vhs",
"lora_scale": 1,
"num_frames": 121,
"guidance_scale": 6,
"num_inference_steps": 30
},
"logs": "Using seed: 8520\nLoading LoRA: lucataco/mochi-lora-vhs with scale of: 1.0\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:13<06:33, 13.58s/it]\n 7%|▋ | 2/30 [00:19<04:13, 9.05s/it]\n 10%|█ | 3/30 [00:26<03:35, 7.98s/it]\n 13%|█▎ | 4/30 [00:32<03:14, 7.49s/it]\n 17%|█▋ | 5/30 [00:39<03:00, 7.22s/it]\n 20%|██ | 6/30 [00:46<02:49, 7.05s/it]\n 23%|██▎ | 7/30 [00:53<02:39, 6.94s/it]\n 27%|██▋ | 8/30 [00:59<02:31, 6.88s/it]\n 30%|███ | 9/30 [01:06<02:23, 6.83s/it]\n 33%|███▎ | 10/30 [01:13<02:16, 6.81s/it]\n 37%|███▋ | 11/30 [01:20<02:08, 6.79s/it]\n 40%|████ | 12/30 [01:26<02:01, 6.77s/it]\n 43%|████▎ | 13/30 [01:33<01:55, 6.77s/it]\n 47%|████▋ | 14/30 [01:40<01:48, 6.76s/it]\n 50%|█████ | 15/30 [01:47<01:41, 6.75s/it]\n 53%|█████▎ | 16/30 [01:53<01:34, 6.75s/it]\n 57%|█████▋ | 17/30 [02:00<01:27, 6.75s/it]\n 60%|██████ | 18/30 [02:07<01:20, 6.75s/it]\n 63%|██████▎ | 19/30 [02:13<01:14, 6.74s/it]\n 67%|██████▋ | 20/30 [02:20<01:07, 6.74s/it]\n 70%|███████ | 21/30 [02:27<01:00, 6.74s/it]\n 73%|███████▎ | 22/30 [02:34<00:53, 6.74s/it]\n 77%|███████▋ | 23/30 [02:40<00:47, 6.75s/it]\n 80%|████████ | 24/30 [02:47<00:40, 6.74s/it]\n 83%|████████▎ | 25/30 [02:54<00:33, 6.74s/it]\n 87%|████████▋ | 26/30 [03:01<00:26, 6.74s/it]\n 90%|█████████ | 27/30 [03:07<00:20, 6.74s/it]\n 93%|█████████▎| 28/30 [03:14<00:13, 6.74s/it]\n 97%|█████████▋| 29/30 [03:21<00:06, 6.74s/it]\n100%|██████████| 30/30 [03:28<00:00, 6.74s/it]\n100%|██████████| 30/30 [03:28<00:00, 6.94s/it]",
"metrics": {
"predict_time": 232.965928495,
"total_time": 273.290707
},
"output": "https://replicate.delivery/xezq/Qq9MavvCj4ZAHB3VfnRVhRFMCM0ZDi1irSeG35wUlYDMp55TA/output.mp4",
"started_at": "2024-12-11T19:26:27.588778Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-d23fzxnwmph5lkzp5ssxt5fmofjiot2texefh3ge7rossibsqk7q",
"get": "https://api.replicate.com/v1/predictions/sk5q509zg1rma0ckpwqtq3t9zw",
"cancel": "https://api.replicate.com/v1/predictions/sk5q509zg1rma0ckpwqtq3t9zw/cancel"
},
"version": "bad496d88086d5f60307291a512fdcb4fab0b30027e7ccbcc2ecf5e6606d5e20"
}
Generated in
Using seed: 8520
Loading LoRA: lucataco/mochi-lora-vhs with scale of: 1.0
0%| | 0/30 [00:00<?, ?it/s]
3%|▎ | 1/30 [00:13<06:33, 13.58s/it]
7%|▋ | 2/30 [00:19<04:13, 9.05s/it]
10%|█ | 3/30 [00:26<03:35, 7.98s/it]
13%|█▎ | 4/30 [00:32<03:14, 7.49s/it]
17%|█▋ | 5/30 [00:39<03:00, 7.22s/it]
20%|██ | 6/30 [00:46<02:49, 7.05s/it]
23%|██▎ | 7/30 [00:53<02:39, 6.94s/it]
27%|██▋ | 8/30 [00:59<02:31, 6.88s/it]
30%|███ | 9/30 [01:06<02:23, 6.83s/it]
33%|███▎ | 10/30 [01:13<02:16, 6.81s/it]
37%|███▋ | 11/30 [01:20<02:08, 6.79s/it]
40%|████ | 12/30 [01:26<02:01, 6.77s/it]
43%|████▎ | 13/30 [01:33<01:55, 6.77s/it]
47%|████▋ | 14/30 [01:40<01:48, 6.76s/it]
50%|█████ | 15/30 [01:47<01:41, 6.75s/it]
53%|█████▎ | 16/30 [01:53<01:34, 6.75s/it]
57%|█████▋ | 17/30 [02:00<01:27, 6.75s/it]
60%|██████ | 18/30 [02:07<01:20, 6.75s/it]
63%|██████▎ | 19/30 [02:13<01:14, 6.74s/it]
67%|██████▋ | 20/30 [02:20<01:07, 6.74s/it]
70%|███████ | 21/30 [02:27<01:00, 6.74s/it]
73%|███████▎ | 22/30 [02:34<00:53, 6.74s/it]
77%|███████▋ | 23/30 [02:40<00:47, 6.75s/it]
80%|████████ | 24/30 [02:47<00:40, 6.74s/it]
83%|████████▎ | 25/30 [02:54<00:33, 6.74s/it]
87%|████████▋ | 26/30 [03:01<00:26, 6.74s/it]
90%|█████████ | 27/30 [03:07<00:20, 6.74s/it]
93%|█████████▎| 28/30 [03:14<00:13, 6.74s/it]
97%|█████████▋| 29/30 [03:21<00:06, 6.74s/it]
100%|██████████| 30/30 [03:28<00:00, 6.74s/it]
100%|██████████| 30/30 [03:28<00:00, 6.94s/it]