You're looking at a specific version of this model. Jump to the model overview.
zetyquickly-org /faceswap-a-gif:974be353
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variableexport 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 zetyquickly-org/faceswap-a-gif using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zetyquickly-org/faceswap-a-gif:974be35318aab27d78c8c935761e665620236d3b157a9b35385c7905c601d977",
{
input: {
source: "https://replicate.delivery/pbxt/MSGVMZFwtAVjR6GfWtJPXkWY8oD5x1VU1YD33L0cDfus1PpX/target2.jpg",
target: "https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExcXZ5NHJmczN3YmFpcjUzdml4MWIwcWJ5MmNhbWNzY3BkMWs2b2VocSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/fwEB7wWfavrNyuTbMe/giphy.gif"
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run zetyquickly-org/faceswap-a-gif using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zetyquickly-org/faceswap-a-gif:974be35318aab27d78c8c935761e665620236d3b157a9b35385c7905c601d977",
input={
"source": "https://replicate.delivery/pbxt/MSGVMZFwtAVjR6GfWtJPXkWY8oD5x1VU1YD33L0cDfus1PpX/target2.jpg",
"target": "https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExcXZ5NHJmczN3YmFpcjUzdml4MWIwcWJ5MmNhbWNzY3BkMWs2b2VocSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/fwEB7wWfavrNyuTbMe/giphy.gif"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run zetyquickly-org/faceswap-a-gif 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": "974be35318aab27d78c8c935761e665620236d3b157a9b35385c7905c601d977",
"input": {
"source": "https://replicate.delivery/pbxt/MSGVMZFwtAVjR6GfWtJPXkWY8oD5x1VU1YD33L0cDfus1PpX/target2.jpg",
"target": "https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExcXZ5NHJmczN3YmFpcjUzdml4MWIwcWJ5MmNhbWNzY3BkMWs2b2VocSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/fwEB7wWfavrNyuTbMe/giphy.gif"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run zetyquickly-org/faceswap-a-gif using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/zetyquickly-org/faceswap-a-gif@sha256:974be35318aab27d78c8c935761e665620236d3b157a9b35385c7905c601d977 \
-i 'source="https://replicate.delivery/pbxt/MSGVMZFwtAVjR6GfWtJPXkWY8oD5x1VU1YD33L0cDfus1PpX/target2.jpg"' \
-i 'target="https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExcXZ5NHJmczN3YmFpcjUzdml4MWIwcWJ5MmNhbWNzY3BkMWs2b2VocSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/fwEB7wWfavrNyuTbMe/giphy.gif"'
To learn more, take a look at the Cog documentation.
Pull and run zetyquickly-org/faceswap-a-gif using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/zetyquickly-org/faceswap-a-gif@sha256:974be35318aab27d78c8c935761e665620236d3b157a9b35385c7905c601d977
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "source": "https://replicate.delivery/pbxt/MSGVMZFwtAVjR6GfWtJPXkWY8oD5x1VU1YD33L0cDfus1PpX/target2.jpg", "target": "https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExcXZ5NHJmczN3YmFpcjUzdml4MWIwcWJ5MmNhbWNzY3BkMWs2b2VocSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/fwEB7wWfavrNyuTbMe/giphy.gif" } }' \ http://localhost:5000/predictions
Add a payment method to run this model.
Each run costs approximately $0.0026. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2025-02-07T05:50:25.188414Z",
"created_at": "2025-02-07T05:50:21.655000Z",
"data_removed": false,
"error": null,
"id": "sq585vmbtxrma0cmvvtspw3eq4",
"input": {
"source": "https://replicate.delivery/pbxt/MSGVMZFwtAVjR6GfWtJPXkWY8oD5x1VU1YD33L0cDfus1PpX/target2.jpg",
"target": "https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExcXZ5NHJmczN3YmFpcjUzdml4MWIwcWJ5MmNhbWNzY3BkMWs2b2VocSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/fwEB7wWfavrNyuTbMe/giphy.gif"
},
"logs": null,
"metrics": {
"predict_time": 3.44221904,
"total_time": 3.533414
},
"output": "https://replicate.delivery/xezq/UbMIZTBeafkKJ0C3XaEMxkSE6mya8IQelfZXyg1Uq51GSUzQB/tmph8w_y0vi.gif",
"started_at": "2025-02-07T05:50:21.746195Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-i4w7sjhez3rqj5hcbmkuqymuj7jxmr5j3xb4eukvgpsfofl4wqfa",
"get": "https://api.replicate.com/v1/predictions/sq585vmbtxrma0cmvvtspw3eq4",
"cancel": "https://api.replicate.com/v1/predictions/sq585vmbtxrma0cmvvtspw3eq4/cancel"
},
"version": "974be35318aab27d78c8c935761e665620236d3b157a9b35385c7905c601d977"
}