defaultSelf-portrait oil painting, a beautiful cyborg with golden hair, 8k
typetext
{
"end_prompt": "Self-portrait watercolour, a beautiful cyborg with purple hair, 8k",
"guidance_scale": 8,
"height": 512,
"iterations": 24,
"num_inference_steps": 2,
"prompt_strength": 0.3,
"return_frames": false,
"start_prompt": "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k",
"width": 512,
"zoom_increment": 0
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_est**********************************
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 fofr/lcm-animation using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fofr/lcm-animation:9f10cbd0279420f2234801bd35d0477652decd4a4256d497ac2ad50ffca8668b",
{
input: {
end_prompt: "Self-portrait watercolour, a beautiful cyborg with purple hair, 8k",
guidance_scale: 8,
height: 512,
iterations: 24,
num_inference_steps: 2,
prompt_strength: 0.3,
return_frames: false,
start_prompt: "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k",
width: 512,
zoom_increment: 0
}
}
);
// 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_est**********************************
This is your API token. Keep it to yourself.
import replicate
Run fofr/lcm-animation using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/lcm-animation:9f10cbd0279420f2234801bd35d0477652decd4a4256d497ac2ad50ffca8668b",
input={
"end_prompt": "Self-portrait watercolour, a beautiful cyborg with purple hair, 8k",
"guidance_scale": 8,
"height": 512,
"iterations": 24,
"num_inference_steps": 2,
"prompt_strength": 0.3,
"return_frames": False,
"start_prompt": "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k",
"width": 512,
"zoom_increment": 0
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_est**********************************
This is your API token. Keep it to yourself.
Run fofr/lcm-animation 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": "fofr/lcm-animation:9f10cbd0279420f2234801bd35d0477652decd4a4256d497ac2ad50ffca8668b",
"input": {
"end_prompt": "Self-portrait watercolour, a beautiful cyborg with purple hair, 8k",
"guidance_scale": 8,
"height": 512,
"iterations": 24,
"num_inference_steps": 2,
"prompt_strength": 0.3,
"return_frames": false,
"start_prompt": "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k",
"width": 512,
"zoom_increment": 0
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "t3nj2udb5gtexgssqnhvynjhru",
"model": "fofr/lcm-animation",
"version": "9f10cbd0279420f2234801bd35d0477652decd4a4256d497ac2ad50ffca8668b",
"input": {
"end_prompt": "Self-portrait watercolour, a beautiful cyborg with purple hair, 8k",
"guidance_scale": 8,
"height": 512,
"iterations": 24,
"num_inference_steps": 2,
"prompt_strength": 0.3,
"return_frames": false,
"start_prompt": "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k",
"width": 512,
"zoom_increment": 0
},
"logs": "Using seed: 21366\ntxt2img mode\n 0%| | 0/8 [00:00<?, ?it/s]\n 12%|█▎ | 1/8 [00:00<00:01, 4.53it/s]\n 62%|██████▎ | 5/8 [00:00<00:00, 17.16it/s]\n100%|██████████| 8/8 [00:00<00:00, 18.66it/s]\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 32.36it/s]\nimg2img iteration 1\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.40it/s]\nimg2img iteration 2\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.01it/s]\nimg2img iteration 3\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.28it/s]\nimg2img iteration 4\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 31.30it/s]\nimg2img iteration 5\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.02it/s]\nimg2img iteration 6\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.13it/s]\nimg2img iteration 7\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.41it/s]\nimg2img iteration 8\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 32.49it/s]\nimg2img iteration 9\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 32.98it/s]\nimg2img iteration 10\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 32.79it/s]\nimg2img iteration 11\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.32it/s]\nimg2img iteration 12\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.08it/s]\nimg2img iteration 13\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.23it/s]\nimg2img iteration 14\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.04it/s]\nimg2img iteration 15\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 32.96it/s]\nimg2img iteration 16\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.03it/s]\nimg2img iteration 17\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.03it/s]\nimg2img iteration 18\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.01it/s]\nimg2img iteration 19\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.06it/s]\nimg2img iteration 20\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.20it/s]\nimg2img iteration 21\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.20it/s]\nimg2img iteration 22\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.18it/s]\nimg2img iteration 23\n 0%| | 0/2 [00:00<?, ?it/s]\n100%|██████████| 2/2 [00:00<00:00, 33.38it/s]\nffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers\nbuilt with gcc 11 (Ubuntu 11.2.0-19ubuntu1)\nconfiguration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\nlibavutil 56. 70.100 / 56. 70.100\nlibavcodec 58.134.100 / 58.134.100\nlibavformat 58. 76.100 / 58. 76.100\nlibavdevice 58. 13.100 / 58. 13.100\nlibavfilter 7.110.100 / 7.110.100\nlibswscale 5. 9.100 / 5. 9.100\nlibswresample 3. 9.100 / 3. 9.100\nlibpostproc 55. 9.100 / 55. 9.100\nInput #0, image2, from '/tmp/out-*.png':\nDuration: 00:00:02.00, start: 0.000000, bitrate: N/A\nStream #0:0: Video: png, rgb24(pc), 512x512, 12 fps, 12 tbr, 12 tbn, 12 tbc\nStream mapping:\nStream #0:0 -> #0:0 (png (native) -> h264 (libx264))\nPress [q] to stop, [?] for help\n[libx264 @ 0x557015088c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2\n[libx264 @ 0x557015088c80] profile High, level 2.2, 4:2:0, 8-bit\n[libx264 @ 0x557015088c80] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=15 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=12 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=17.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00\nOutput #0, mp4, to '/tmp/output_video.mp4':\nMetadata:\nencoder : Lavf58.76.100\nStream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 512x512, q=2-31, 12 fps, 12288 tbn\nMetadata:\nencoder : Lavc58.134.100 libx264\nSide data:\ncpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A\nframe= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x\nframe= 24 fps=0.0 q=-1.0 Lsize= 589kB time=00:00:01.75 bitrate=2757.7kbits/s speed=8.26x\nvideo:588kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.189158%\n[libx264 @ 0x557015088c80] frame I:1 Avg QP:17.80 size: 39194\n[libx264 @ 0x557015088c80] frame P:6 Avg QP:17.38 size: 25997\n[libx264 @ 0x557015088c80] frame B:17 Avg QP:17.91 size: 23899\n[libx264 @ 0x557015088c80] consecutive B-frames: 4.2% 0.0% 12.5% 83.3%\n[libx264 @ 0x557015088c80] mb I I16..4: 5.8% 47.5% 46.8%\n[libx264 @ 0x557015088c80] mb P I16..4: 5.6% 40.0% 27.8% P16..4: 11.2% 10.9% 4.4% 0.0% 0.0% skip: 0.1%\n[libx264 @ 0x557015088c80] mb B I16..4: 2.7% 20.8% 18.9% B16..8: 20.6% 20.2% 7.7% direct: 8.1% skip: 1.0% L0:41.5% L1:38.8% BI:19.7%\n[libx264 @ 0x557015088c80] 8x8 transform intra:50.9% inter:64.3%\n[libx264 @ 0x557015088c80] coded y,uvDC,uvAC intra: 87.4% 73.0% 42.9% inter: 75.8% 85.4% 3.6%\n[libx264 @ 0x557015088c80] i16 v,h,dc,p: 32% 15% 4% 49%\n[libx264 @ 0x557015088c80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 8% 18% 7% 9% 13% 6% 11% 6%\n[libx264 @ 0x557015088c80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 9% 12% 10% 12% 14% 8% 10% 6%\n[libx264 @ 0x557015088c80] i8c dc,h,v,p: 57% 13% 23% 8%\n[libx264 @ 0x557015088c80] Weighted P-Frames: Y:50.0% UV:50.0%\n[libx264 @ 0x557015088c80] ref P L0: 52.0% 10.5% 22.6% 12.0% 2.9%\n[libx264 @ 0x557015088c80] ref B L0: 77.0% 18.6% 4.4%\n[libx264 @ 0x557015088c80] ref B L1: 89.1% 10.9%\n[libx264 @ 0x557015088c80] kb/s:2405.81",
"output": [
"https://replicate.delivery/pbxt/l1rwjeJd4gRzMSB723p80GNh10TBSxqumoqgZS2ybPz8uJ7IA/output_video.mp4"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-11-08T12:55:01.935862Z",
"started_at": "2023-11-08T12:56:17.054181Z",
"completed_at": "2023-11-08T12:56:25.857037Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/t3nj2udb5gtexgssqnhvynjhru/cancel",
"get": "https://api.replicate.com/v1/predictions/t3nj2udb5gtexgssqnhvynjhru"
},
"metrics": {
"predict_time": 8.802856,
"total_time": 83.921175
}
}