johnsutor / emoji-painter
Recreate images with Emojis
Prediction
johnsutor/emoji-painter:939a5cf92694c4fd488c685d14036d8496d727cf554961a62dc9c3dac0cbc9d8IDkfq85jzrddrgm0cfts3r24bp28StatusSucceededSourceWebHardwareA100 (80GB)Total durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/KyEN3uzCzvIVVL1F5EOnqVOpNKCJQhUAI7nhH1rgzZZIBg3E/mona.jpg", "scale": 6 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run johnsutor/emoji-painter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "johnsutor/emoji-painter:939a5cf92694c4fd488c685d14036d8496d727cf554961a62dc9c3dac0cbc9d8", { input: { image: "https://replicate.delivery/pbxt/KyEN3uzCzvIVVL1F5EOnqVOpNKCJQhUAI7nhH1rgzZZIBg3E/mona.jpg", scale: 6 } } ); // 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
Import the client:import replicate
Run johnsutor/emoji-painter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "johnsutor/emoji-painter:939a5cf92694c4fd488c685d14036d8496d727cf554961a62dc9c3dac0cbc9d8", input={ "image": "https://replicate.delivery/pbxt/KyEN3uzCzvIVVL1F5EOnqVOpNKCJQhUAI7nhH1rgzZZIBg3E/mona.jpg", "scale": 6 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run johnsutor/emoji-painter 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": "johnsutor/emoji-painter:939a5cf92694c4fd488c685d14036d8496d727cf554961a62dc9c3dac0cbc9d8", "input": { "image": "https://replicate.delivery/pbxt/KyEN3uzCzvIVVL1F5EOnqVOpNKCJQhUAI7nhH1rgzZZIBg3E/mona.jpg", "scale": 6 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-06-02T00:10:33.455961Z", "created_at": "2024-06-02T00:09:51.979000Z", "data_removed": false, "error": null, "id": "kfq85jzrddrgm0cfts3r24bp28", "input": { "image": "https://replicate.delivery/pbxt/KyEN3uzCzvIVVL1F5EOnqVOpNKCJQhUAI7nhH1rgzZZIBg3E/mona.jpg", "scale": 6 }, "logs": "device: cuda\nhidden_dim: 256\nlog_interval: 100\nlog_with: tensorboard\nmixed_precision: 'no'\nn_dec_layers: 3\nn_enc_layers: 3\nn_heads: 8\nnum_blocks: 3\nnum_shapes: 501\nnum_strokes: 8\nparam_per_stroke: 4\nparam_shape: 4\npatch_size: 64\nrecreation_path: !!python/object/apply:cog.types.Path\n- /\n- tmp\n- tmpbkt1i4ou\n- output.png\nscale: 6.0\nshapes_path: ./shapes.pth\ntarget_path: !!python/object/apply:cog.types.Path\n- /\n- tmp\n- tmpn7xxyyrsmona.jpg\nweights_path: ./weights.pth\nhydra:\nrun:\ndir: ./\n 0%| | 0/7 [00:00<?, ?it/s]/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3549.)\nreturn _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]\n 14%|█▍ | 1/7 [00:02<00:15, 2.55s/it]\n 29%|██▊ | 2/7 [00:07<00:20, 4.04s/it]\n 43%|████▎ | 3/7 [00:13<00:19, 4.99s/it]\n 57%|█████▋ | 4/7 [00:16<00:11, 3.97s/it]\n 71%|███████▏ | 5/7 [00:17<00:05, 2.92s/it]\n 86%|████████▌ | 6/7 [00:18<00:02, 2.31s/it]\n100%|██████████| 7/7 [00:19<00:00, 1.91s/it]\n100%|██████████| 7/7 [00:19<00:00, 2.78s/it]", "metrics": { "predict_time": 22.800578, "total_time": 41.476961 }, "output": "https://replicate.delivery/pbxt/YEfMdGzqwOzKFy7hPvXNnE2mejCJBXevTLwjv4b1zsjwTt0lA/output.png", "started_at": "2024-06-02T00:10:10.655383Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/kfq85jzrddrgm0cfts3r24bp28", "cancel": "https://api.replicate.com/v1/predictions/kfq85jzrddrgm0cfts3r24bp28/cancel" }, "version": "939a5cf92694c4fd488c685d14036d8496d727cf554961a62dc9c3dac0cbc9d8" }
Generated indevice: cuda hidden_dim: 256 log_interval: 100 log_with: tensorboard mixed_precision: 'no' n_dec_layers: 3 n_enc_layers: 3 n_heads: 8 num_blocks: 3 num_shapes: 501 num_strokes: 8 param_per_stroke: 4 param_shape: 4 patch_size: 64 recreation_path: !!python/object/apply:cog.types.Path - / - tmp - tmpbkt1i4ou - output.png scale: 6.0 shapes_path: ./shapes.pth target_path: !!python/object/apply:cog.types.Path - / - tmp - tmpn7xxyyrsmona.jpg weights_path: ./weights.pth hydra: run: dir: ./ 0%| | 0/7 [00:00<?, ?it/s]/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3549.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] 14%|█▍ | 1/7 [00:02<00:15, 2.55s/it] 29%|██▊ | 2/7 [00:07<00:20, 4.04s/it] 43%|████▎ | 3/7 [00:13<00:19, 4.99s/it] 57%|█████▋ | 4/7 [00:16<00:11, 3.97s/it] 71%|███████▏ | 5/7 [00:17<00:05, 2.92s/it] 86%|████████▌ | 6/7 [00:18<00:02, 2.31s/it] 100%|██████████| 7/7 [00:19<00:00, 1.91s/it] 100%|██████████| 7/7 [00:19<00:00, 2.78s/it]
Prediction
johnsutor/emoji-painter:e4092d38b3883a74b0b46537018f5a759e0020d0a4d4d2499a898f2c43bceda4IDpcmxpgc5n5rgp0cfmv0r1sead4StatusSucceededSourceWebHardwareA100 (80GB)Total durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/KyELvNissievQm1KTJwLt9Ez6NTWitQcca5C7Vbdj8tHTB7Y/mona.jpg", "scale": 2 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run johnsutor/emoji-painter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "johnsutor/emoji-painter:e4092d38b3883a74b0b46537018f5a759e0020d0a4d4d2499a898f2c43bceda4", { input: { image: "https://replicate.delivery/pbxt/KyELvNissievQm1KTJwLt9Ez6NTWitQcca5C7Vbdj8tHTB7Y/mona.jpg", scale: 2 } } ); // 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
Import the client:import replicate
Run johnsutor/emoji-painter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "johnsutor/emoji-painter:e4092d38b3883a74b0b46537018f5a759e0020d0a4d4d2499a898f2c43bceda4", input={ "image": "https://replicate.delivery/pbxt/KyELvNissievQm1KTJwLt9Ez6NTWitQcca5C7Vbdj8tHTB7Y/mona.jpg", "scale": 2 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run johnsutor/emoji-painter 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": "johnsutor/emoji-painter:e4092d38b3883a74b0b46537018f5a759e0020d0a4d4d2499a898f2c43bceda4", "input": { "image": "https://replicate.delivery/pbxt/KyELvNissievQm1KTJwLt9Ez6NTWitQcca5C7Vbdj8tHTB7Y/mona.jpg", "scale": 2 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-05-23T18:41:45.584764Z", "created_at": "2024-05-23T18:40:51.625000Z", "data_removed": false, "error": null, "id": "pcmxpgc5n5rgp0cfmv0r1sead4", "input": { "image": "https://replicate.delivery/pbxt/KyELvNissievQm1KTJwLt9Ez6NTWitQcca5C7Vbdj8tHTB7Y/mona.jpg", "scale": 2 }, "logs": "device: cuda\nhidden_dim: 256\nlog_interval: 100\nlog_with: tensorboard\nmixed_precision: 'no'\nn_dec_layers: 3\nn_enc_layers: 3\nn_heads: 8\nnum_blocks: 3\nnum_shapes: 501\nnum_strokes: 8\nparam_per_stroke: 4\nparam_shape: 4\npatch_size: 64\nrecreation_path: !!python/object/apply:cog.types.Path\n- /\n- tmp\n- tmprmi1u39g\n- output.png\nscale: 2.0\nshapes_path: ./shapes.pth\ntarget_path: !!python/object/apply:cog.types.Path\n- /\n- tmp\n- tmpni_7v57mmona.jpg\nweights_path: ./weights.pth\nhydra:\nrun:\ndir: ./\n 0%| | 0/5 [00:00<?, ?it/s]/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3549.)\nreturn _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]\n 20%|██ | 1/5 [00:00<00:01, 3.62it/s]\n 40%|████ | 2/5 [00:00<00:00, 3.20it/s]\n 60%|██████ | 3/5 [00:01<00:00, 2.75it/s]\n 80%|████████ | 4/5 [00:01<00:00, 3.53it/s]\n100%|██████████| 5/5 [00:01<00:00, 4.58it/s]\n100%|██████████| 5/5 [00:01<00:00, 3.84it/s]", "metrics": { "predict_time": 3.760628, "total_time": 53.959764 }, "output": "https://replicate.delivery/pbxt/6aLwHGuEvI6xJZqJR5vWVreCyEeAiO9OdMa2XcReaxMRfPdLB/output.png", "started_at": "2024-05-23T18:41:41.824136Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/pcmxpgc5n5rgp0cfmv0r1sead4", "cancel": "https://api.replicate.com/v1/predictions/pcmxpgc5n5rgp0cfmv0r1sead4/cancel" }, "version": "e4092d38b3883a74b0b46537018f5a759e0020d0a4d4d2499a898f2c43bceda4" }
Generated indevice: cuda hidden_dim: 256 log_interval: 100 log_with: tensorboard mixed_precision: 'no' n_dec_layers: 3 n_enc_layers: 3 n_heads: 8 num_blocks: 3 num_shapes: 501 num_strokes: 8 param_per_stroke: 4 param_shape: 4 patch_size: 64 recreation_path: !!python/object/apply:cog.types.Path - / - tmp - tmprmi1u39g - output.png scale: 2.0 shapes_path: ./shapes.pth target_path: !!python/object/apply:cog.types.Path - / - tmp - tmpni_7v57mmona.jpg weights_path: ./weights.pth hydra: run: dir: ./ 0%| | 0/5 [00:00<?, ?it/s]/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3549.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] 20%|██ | 1/5 [00:00<00:01, 3.62it/s] 40%|████ | 2/5 [00:00<00:00, 3.20it/s] 60%|██████ | 3/5 [00:01<00:00, 2.75it/s] 80%|████████ | 4/5 [00:01<00:00, 3.53it/s] 100%|██████████| 5/5 [00:01<00:00, 4.58it/s] 100%|██████████| 5/5 [00:01<00:00, 3.84it/s]
Want to make some of these yourself?
Run this model