meta
/
ic_gan
Instance-Conditioned GAN
Prediction
meta/ic_gan:e582bc19ModelIDhva3rgqw65hrdddtrkyskq23qqStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "seed": "0", "image": "https://replicate.delivery/mgxm/cd93a7fb-2dd7-41eb-80d5-b276159bd1fa/fantasy_drawing.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "castle" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", { input: { seed: "0", image: "https://replicate.delivery/mgxm/cd93a7fb-2dd7-41eb-80d5-b276159bd1fa/fantasy_drawing.jpeg", gen_model: "cc_icgan", num_samples: "4", conditional_class: "castle" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", input={ "seed": "0", "image": "https://replicate.delivery/mgxm/cd93a7fb-2dd7-41eb-80d5-b276159bd1fa/fantasy_drawing.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "castle" } ) # The meta/ic_gan 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/meta/ic_gan/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run meta/ic_gan 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": "e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", "input": { "seed": "0", "image": "https://replicate.delivery/mgxm/cd93a7fb-2dd7-41eb-80d5-b276159bd1fa/fantasy_drawing.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "castle" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-09-24T18:50:12.277405Z", "created_at": "2021-09-24T18:45:54.881050Z", "data_removed": false, "error": null, "id": "hva3rgqw65hrdddtrkyskq23qq", "input": { "seed": "0", "image": "https://replicate.delivery/mgxm/cd93a7fb-2dd7-41eb-80d5-b276159bd1fa/fantasy_drawing.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "castle" }, "logs": "using resnet50 to extract features\nInside resnet function, using ImageNet pretrained from model url!\nDownloading: \"https://download.pytorch.org/models/resnet50-19c8e357.pth\" to /root/.cache/torch/hub/checkpoints/resnet50-19c8e357.pth\n\n 0%| | 0.00/97.8M [00:00<?, ?B/s]\n\n 10%|9 | 9.68M/97.8M [00:00<00:00, 101MB/s]\n\n 31%|### | 30.0M/97.8M [00:00<00:00, 167MB/s]\n\n 47%|####7 | 46.3M/97.8M [00:00<00:00, 169MB/s]\n\n 69%|######9 | 67.7M/97.8M [00:00<00:00, 191MB/s]\n\n 95%|#########4| 92.7M/97.8M [00:00<00:00, 217MB/s]\n\n100%|##########| 97.8M/97.8M [00:00<00:00, 197MB/s]\nUsing pretrained weights on full ImageNet.\nObtaining instance features from input image!\nFor name best\nbest0\n we have an FID:\n8.461181640625\nCheckpoint with name\nbest1\n not in folder.\nFinal name selected is\nbest0\nLoading best0 weights from .//cc_icgan_biggan_imagenet_res256...\nExperiment name is cc_icgan_biggan_imagenet_res256\nAdding attention layer in G at resolution 64\nParam count for Gs initialized parameters: 92299715\nLoading weights...\nLoading best0 weights from .//cc_icgan_biggan_imagenet_res256...\nPutting G in eval mode..\n/src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n instance_vector = torch.tensor(", "metrics": {}, "output": [ { "file": "https://replicate.delivery/mgxm/03b4e597-15d3-4118-94e2-4f28fdefaf2a/out.png" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/hva3rgqw65hrdddtrkyskq23qq", "cancel": "https://api.replicate.com/v1/predictions/hva3rgqw65hrdddtrkyskq23qq/cancel" }, "version": "93381a1593b23062bcd95585b0f2b2c0b30c5684c8df904b881e7ad3b2e3227f" }
using resnet50 to extract features Inside resnet function, using ImageNet pretrained from model url! Downloading: "https://download.pytorch.org/models/resnet50-19c8e357.pth" to /root/.cache/torch/hub/checkpoints/resnet50-19c8e357.pth 0%| | 0.00/97.8M [00:00<?, ?B/s] 10%|9 | 9.68M/97.8M [00:00<00:00, 101MB/s] 31%|### | 30.0M/97.8M [00:00<00:00, 167MB/s] 47%|####7 | 46.3M/97.8M [00:00<00:00, 169MB/s] 69%|######9 | 67.7M/97.8M [00:00<00:00, 191MB/s] 95%|#########4| 92.7M/97.8M [00:00<00:00, 217MB/s] 100%|##########| 97.8M/97.8M [00:00<00:00, 197MB/s] Using pretrained weights on full ImageNet. Obtaining instance features from input image! For name best best0 we have an FID: 8.461181640625 Checkpoint with name best1 not in folder. Final name selected is best0 Loading best0 weights from .//cc_icgan_biggan_imagenet_res256... Experiment name is cc_icgan_biggan_imagenet_res256 Adding attention layer in G at resolution 64 Param count for Gs initialized parameters: 92299715 Loading weights... Loading best0 weights from .//cc_icgan_biggan_imagenet_res256... Putting G in eval mode.. /src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). instance_vector = torch.tensor(
Prediction
meta/ic_gan:e582bc19ModelIDdmupo24nc5cj5jbt5da3ixauiyStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "seed": "0", "image": "https://replicate.delivery/mgxm/6ad5b06a-a6c9-4b5f-bef7-fd6abdfeeee4/colorful_painting.jpeg", "gen_model": "icgan", "num_samples": "4" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", { input: { seed: "0", image: "https://replicate.delivery/mgxm/6ad5b06a-a6c9-4b5f-bef7-fd6abdfeeee4/colorful_painting.jpeg", gen_model: "icgan", num_samples: "4" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", input={ "seed": "0", "image": "https://replicate.delivery/mgxm/6ad5b06a-a6c9-4b5f-bef7-fd6abdfeeee4/colorful_painting.jpeg", "gen_model": "icgan", "num_samples": "4" } ) # The meta/ic_gan 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/meta/ic_gan/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run meta/ic_gan 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": "e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", "input": { "seed": "0", "image": "https://replicate.delivery/mgxm/6ad5b06a-a6c9-4b5f-bef7-fd6abdfeeee4/colorful_painting.jpeg", "gen_model": "icgan", "num_samples": "4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-09-25T12:08:16.978020Z", "created_at": "2021-09-25T11:59:27.141515Z", "data_removed": false, "error": null, "id": "dmupo24nc5cj5jbt5da3ixauiy", "input": { "seed": "0", "image": "https://replicate.delivery/mgxm/6ad5b06a-a6c9-4b5f-bef7-fd6abdfeeee4/colorful_painting.jpeg", "gen_model": "icgan", "num_samples": "4" }, "logs": "using resnet50 to extract features\nLoading pretrained weights from:\nswav_pretrained.pth.tar\nkey\nprojection_head.0.weight\n not in dict\nkey\nprojection_head.0.bias\n not in dict\nkey\nprojection_head.1.weight\n not in dict\nkey\nprojection_head.1.bias\n not in dict\nkey\nprojection_head.1.running_mean\n not in dict\nkey\nprojection_head.1.running_var\n not in dict\nkey\nprojection_head.1.num_batches_tracked\n not in dict\nkey\nprojection_head.3.weight\n not in dict\nkey\nprojection_head.3.bias\n not in dict\nkey\nprototypes.weight\n not in dict\nNetwork key\nfc.weight\n not in dict to load\nNetwork key\nfc.bias\n not in dict to load\nObtaining instance features from input image!\nFor name best\nbest0\n we have an FID:\n22.453704833984375\nCheckpoint with name\nbest1\n not in folder.\nFinal name selected is\nbest0\nLoading best0 weights from .//icgan_biggan_imagenet_res256...\nExperiment name is icgan_biggan_imagenet_res256\nAdding attention layer in G at resolution 64\nParam count for Gs initialized parameters: 90014147\nLoading weights...\nLoading best0 weights from .//icgan_biggan_imagenet_res256...\nPutting G in eval mode..\n/src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n instance_vector = torch.tensor(", "metrics": {}, "output": [ { "file": "https://replicate.delivery/mgxm/efbc7068-9c32-4dbb-8823-3c9fed1adee5/out.png" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/dmupo24nc5cj5jbt5da3ixauiy", "cancel": "https://api.replicate.com/v1/predictions/dmupo24nc5cj5jbt5da3ixauiy/cancel" }, "version": "93381a1593b23062bcd95585b0f2b2c0b30c5684c8df904b881e7ad3b2e3227f" }
using resnet50 to extract features Loading pretrained weights from: swav_pretrained.pth.tar key projection_head.0.weight not in dict key projection_head.0.bias not in dict key projection_head.1.weight not in dict key projection_head.1.bias not in dict key projection_head.1.running_mean not in dict key projection_head.1.running_var not in dict key projection_head.1.num_batches_tracked not in dict key projection_head.3.weight not in dict key projection_head.3.bias not in dict key prototypes.weight not in dict Network key fc.weight not in dict to load Network key fc.bias not in dict to load Obtaining instance features from input image! For name best best0 we have an FID: 22.453704833984375 Checkpoint with name best1 not in folder. Final name selected is best0 Loading best0 weights from .//icgan_biggan_imagenet_res256... Experiment name is icgan_biggan_imagenet_res256 Adding attention layer in G at resolution 64 Param count for Gs initialized parameters: 90014147 Loading weights... Loading best0 weights from .//icgan_biggan_imagenet_res256... Putting G in eval mode.. /src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). instance_vector = torch.tensor(
Prediction
meta/ic_gan:e582bc19ModelIDp53qai47cnbxxl7wabn2j52ts4StatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "seed": "0", "image": "https://replicate.delivery/mgxm/2a02cdee-868e-4660-a702-124f76792c7a/dogimage.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "Labrador_retriever" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", { input: { seed: "0", image: "https://replicate.delivery/mgxm/2a02cdee-868e-4660-a702-124f76792c7a/dogimage.jpeg", gen_model: "cc_icgan", num_samples: "4", conditional_class: "Labrador_retriever" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", input={ "seed": "0", "image": "https://replicate.delivery/mgxm/2a02cdee-868e-4660-a702-124f76792c7a/dogimage.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "Labrador_retriever" } ) # The meta/ic_gan 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/meta/ic_gan/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run meta/ic_gan 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": "e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", "input": { "seed": "0", "image": "https://replicate.delivery/mgxm/2a02cdee-868e-4660-a702-124f76792c7a/dogimage.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "Labrador_retriever" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-09-25T12:24:18.427089Z", "created_at": "2021-09-25T12:24:06.054118Z", "data_removed": false, "error": null, "id": "p53qai47cnbxxl7wabn2j52ts4", "input": { "seed": "0", "image": "https://replicate.delivery/mgxm/2a02cdee-868e-4660-a702-124f76792c7a/dogimage.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "Labrador_retriever" }, "logs": "using resnet50 to extract features\nInside resnet function, using ImageNet pretrained from model url!\nUsing pretrained weights on full ImageNet.\nObtaining instance features from input image!\nFor name best\nbest0\n we have an FID:\n8.461181640625\nCheckpoint with name\nbest1\n not in folder.\nFinal name selected is\nbest0\nLoading best0 weights from .//cc_icgan_biggan_imagenet_res256...\nExperiment name is cc_icgan_biggan_imagenet_res256\nAdding attention layer in G at resolution 64\nParam count for Gs initialized parameters: 92299715\nLoading weights...\nLoading best0 weights from .//cc_icgan_biggan_imagenet_res256...\nPutting G in eval mode..\n/src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n instance_vector = torch.tensor(", "metrics": {}, "output": [ { "file": "https://replicate.delivery/mgxm/d5258abb-12d0-406a-aa40-fdc32d04fc14/out.png" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/p53qai47cnbxxl7wabn2j52ts4", "cancel": "https://api.replicate.com/v1/predictions/p53qai47cnbxxl7wabn2j52ts4/cancel" }, "version": "93381a1593b23062bcd95585b0f2b2c0b30c5684c8df904b881e7ad3b2e3227f" }
using resnet50 to extract features Inside resnet function, using ImageNet pretrained from model url! Using pretrained weights on full ImageNet. Obtaining instance features from input image! For name best best0 we have an FID: 8.461181640625 Checkpoint with name best1 not in folder. Final name selected is best0 Loading best0 weights from .//cc_icgan_biggan_imagenet_res256... Experiment name is cc_icgan_biggan_imagenet_res256 Adding attention layer in G at resolution 64 Param count for Gs initialized parameters: 92299715 Loading weights... Loading best0 weights from .//cc_icgan_biggan_imagenet_res256... Putting G in eval mode.. /src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). instance_vector = torch.tensor(
Prediction
meta/ic_gan:e582bc19ModelIDe4zt2orolbgrjdyo2gf33lcjlaStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "seed": "0", "image": "https://replicate.delivery/mgxm/3d4f4dc8-139d-4182-83e8-2cdb48cad2fb/dogimage.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "Sussex_spaniel" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", { input: { seed: "0", image: "https://replicate.delivery/mgxm/3d4f4dc8-139d-4182-83e8-2cdb48cad2fb/dogimage.jpeg", gen_model: "cc_icgan", num_samples: "4", conditional_class: "Sussex_spaniel" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", input={ "seed": "0", "image": "https://replicate.delivery/mgxm/3d4f4dc8-139d-4182-83e8-2cdb48cad2fb/dogimage.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "Sussex_spaniel" } ) # The meta/ic_gan 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/meta/ic_gan/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run meta/ic_gan 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": "e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", "input": { "seed": "0", "image": "https://replicate.delivery/mgxm/3d4f4dc8-139d-4182-83e8-2cdb48cad2fb/dogimage.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "Sussex_spaniel" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-09-25T12:25:38.192456Z", "created_at": "2021-09-25T12:25:31.311452Z", "data_removed": false, "error": null, "id": "e4zt2orolbgrjdyo2gf33lcjla", "input": { "seed": "0", "image": "https://replicate.delivery/mgxm/3d4f4dc8-139d-4182-83e8-2cdb48cad2fb/dogimage.jpeg", "gen_model": "cc_icgan", "num_samples": "4", "conditional_class": "Sussex_spaniel" }, "logs": "Obtaining instance features from input image!\n/src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n instance_vector = torch.tensor(", "metrics": { "total_time": 6.881004 }, "output": [ { "file": "https://replicate.delivery/mgxm/99239e60-7c28-4214-9503-fd4f4f0e8409/out.png" } ], "started_at": "2021-12-11T02:42:41.719584Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/e4zt2orolbgrjdyo2gf33lcjla", "cancel": "https://api.replicate.com/v1/predictions/e4zt2orolbgrjdyo2gf33lcjla/cancel" }, "version": "93381a1593b23062bcd95585b0f2b2c0b30c5684c8df904b881e7ad3b2e3227f" }
Obtaining instance features from input image! /src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). instance_vector = torch.tensor(
Prediction
meta/ic_gan:e582bc19ModelIDjn7pgvowtfc67ksu4gicljqtvyStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "seed": 0, "image": "https://replicate.delivery/mgxm/86206479-6ce0-45da-98e7-514d9273484b/dogimage.jpeg", "gen_model": "icgan", "num_samples": "4" }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", { input: { seed: 0, image: "https://replicate.delivery/mgxm/86206479-6ce0-45da-98e7-514d9273484b/dogimage.jpeg", gen_model: "icgan", num_samples: "4" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run meta/ic_gan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "meta/ic_gan:e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", input={ "seed": 0, "image": "https://replicate.delivery/mgxm/86206479-6ce0-45da-98e7-514d9273484b/dogimage.jpeg", "gen_model": "icgan", "num_samples": "4" } ) # The meta/ic_gan 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/meta/ic_gan/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run meta/ic_gan 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": "e582bc19e26a2cc003c5bf124588976ded820aadd4060326fe152d16899f3240", "input": { "seed": 0, "image": "https://replicate.delivery/mgxm/86206479-6ce0-45da-98e7-514d9273484b/dogimage.jpeg", "gen_model": "icgan", "num_samples": "4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-09-25T12:28:52.343175Z", "created_at": "2021-09-25T12:28:44.791522Z", "data_removed": false, "error": null, "id": "jn7pgvowtfc67ksu4gicljqtvy", "input": { "seed": 0, "image": "https://replicate.delivery/mgxm/86206479-6ce0-45da-98e7-514d9273484b/dogimage.jpeg", "gen_model": "icgan", "num_samples": "4" }, "logs": "Obtaining instance features from input image!\n/src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).\n instance_vector = torch.tensor(", "metrics": {}, "output": [ { "file": "https://replicate.delivery/mgxm/56dda931-139c-443d-b1a9-09d6e5e59880/out.png" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/jn7pgvowtfc67ksu4gicljqtvy", "cancel": "https://api.replicate.com/v1/predictions/jn7pgvowtfc67ksu4gicljqtvy/cancel" }, "version": "93381a1593b23062bcd95585b0f2b2c0b30c5684c8df904b881e7ad3b2e3227f" }
Obtaining instance features from input image! /src/predict.py:126: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). instance_vector = torch.tensor(
Want to make some of these yourself?
Run this model