cjwbw/textdiffuser

Diffusion Models as Text Painters

Clip-Guided Diffusion Model for Image Generation

Generates pokemon sprites from prompt

Real-ESRGAN super-resolution model from ruDALL-E

face alignment using stylegan-encoding

Image Manipulatinon with Diffusion Autoencoders

Blind Face Restoration with Vector-Quantized Dictionary and Parallel Decoder
Global Tracking Transformers

Colorization using a Generative Color Prior for Natural Images

Language-Free Training of a Text-to-Image Generator with CLIP

Composable Diffusion

Decoding Micromotion in Low-dimensional Latent Spaces from StyleGAN

VQ-Diffusion for Text-to-Image Synthesis

text-to-image generation

Panoptic Scene Graph Generation

text-to-image with latent diffusion

Unsupervised Night Image Enhancement

Inpainting using Denoising Diffusion Probabilistic Models

stable-diffusion with negative prompts, more scheduler

Pose-Invariant Hairstyle Transfer

End-to-End Document Image Enhancement Transformer
Prediction
cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858cInput
- prompt
- A sign that says 'Hello'
- sample_num
- 1
- guidance_scale
- 7.5
- num_inference_steps
- 50
{ "prompt": "A sign that says 'Hello'", "sample_num": 1, "guidance_scale": 7.5, "num_inference_steps": 50 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", { input: { prompt: "A sign that says 'Hello'", sample_num: 1, guidance_scale: 7.5, num_inference_steps: 50 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", input={ "prompt": "A sign that says 'Hello'", "sample_num": 1, "guidance_scale": 7.5, "num_inference_steps": 50 } ) # 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.
Run cjwbw/textdiffuser 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": "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", "input": { "prompt": "A sign that says \'Hello\'", "sample_num": 1, "guidance_scale": 7.5, "num_inference_steps": 50 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-04T13:55:39.878899Z", "created_at": "2023-06-04T13:48:05.192082Z", "data_removed": false, "error": null, "id": "7o5xuuglazfz7jwippj3gzlo6u", "input": { "prompt": "A sign that says 'Hello'", "sample_num": 1, "guidance_scale": 7.5, "num_inference_steps": 50 }, "logs": "Using seed: 19585\nencoder_hidden_states: torch.Size([1, 77, 768]).\nencoder_hidden_states_nocond: torch.Size([1, 77, 768]).\n[!] Detected keywords: ['Hello'] from prompt A sign that says 'Hello'\nindex\tkeyword\tx_min\ty_min\tx_max\ty_max\n0\tHello\t83\t140\t416\t311\n[√] Layout is successfully generated\ncharacter-level segmentation_mask: torch.Size([1, 256, 256]).\nfeature_mask: torch.Size([1, 1, 64, 64]).\nmasked_feature: torch.Size([1, 4, 64, 64]).\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:00<00:28, 1.69it/s]\n 4%|▍ | 2/50 [00:01<00:27, 1.73it/s]\n 6%|▌ | 3/50 [00:01<00:27, 1.74it/s]\n 8%|▊ | 4/50 [00:02<00:26, 1.76it/s]\n 10%|█ | 5/50 [00:02<00:25, 1.77it/s]\n 12%|█▏ | 6/50 [00:03<00:24, 1.77it/s]\n 14%|█▍ | 7/50 [00:03<00:24, 1.77it/s]\n 16%|█▌ | 8/50 [00:04<00:23, 1.77it/s]\n 18%|█▊ | 9/50 [00:05<00:23, 1.77it/s]\n 20%|██ | 10/50 [00:05<00:22, 1.77it/s]\n 22%|██▏ | 11/50 [00:06<00:21, 1.77it/s]\n 24%|██▍ | 12/50 [00:06<00:21, 1.78it/s]\n 26%|██▌ | 13/50 [00:07<00:20, 1.78it/s]\n 28%|██▊ | 14/50 [00:07<00:20, 1.77it/s]\n 30%|███ | 15/50 [00:08<00:19, 1.77it/s]\n 32%|███▏ | 16/50 [00:09<00:19, 1.77it/s]\n 34%|███▍ | 17/50 [00:09<00:18, 1.77it/s]\n 36%|███▌ | 18/50 [00:10<00:18, 1.77it/s]\n 38%|███▊ | 19/50 [00:10<00:17, 1.77it/s]\n 40%|████ | 20/50 [00:11<00:17, 1.76it/s]\n 42%|████▏ | 21/50 [00:11<00:16, 1.76it/s]\n 44%|████▍ | 22/50 [00:12<00:15, 1.76it/s]\n 46%|████▌ | 23/50 [00:13<00:15, 1.76it/s]\n 48%|████▊ | 24/50 [00:13<00:14, 1.76it/s]\n 50%|█████ | 25/50 [00:14<00:14, 1.76it/s]\n 52%|█████▏ | 26/50 [00:14<00:13, 1.75it/s]\n 54%|█████▍ | 27/50 [00:15<00:13, 1.75it/s]\n 56%|█████▌ | 28/50 [00:15<00:12, 1.75it/s]\n 58%|█████▊ | 29/50 [00:16<00:12, 1.74it/s]\n 60%|██████ | 30/50 [00:17<00:11, 1.74it/s]\n 62%|██████▏ | 31/50 [00:17<00:10, 1.74it/s]\n 64%|██████▍ | 32/50 [00:18<00:10, 1.75it/s]\n 66%|██████▌ | 33/50 [00:18<00:09, 1.73it/s]\n 68%|██████▊ | 34/50 [00:19<00:09, 1.73it/s]\n 70%|███████ | 35/50 [00:19<00:08, 1.72it/s]\n 72%|███████▏ | 36/50 [00:20<00:08, 1.72it/s]\n 74%|███████▍ | 37/50 [00:21<00:07, 1.72it/s]\n 76%|███████▌ | 38/50 [00:21<00:06, 1.72it/s]\n 78%|███████▊ | 39/50 [00:22<00:06, 1.72it/s]\n 80%|████████ | 40/50 [00:22<00:05, 1.72it/s]\n 82%|████████▏ | 41/50 [00:23<00:05, 1.71it/s]\n 84%|████████▍ | 42/50 [00:24<00:04, 1.71it/s]\n 86%|████████▌ | 43/50 [00:24<00:04, 1.71it/s]\n 88%|████████▊ | 44/50 [00:25<00:03, 1.71it/s]\n 90%|█████████ | 45/50 [00:25<00:02, 1.70it/s]\n 92%|█████████▏| 46/50 [00:26<00:02, 1.70it/s]\n 94%|█████████▍| 47/50 [00:26<00:01, 1.70it/s]\n 96%|█████████▌| 48/50 [00:27<00:01, 1.70it/s]\n 98%|█████████▊| 49/50 [00:28<00:00, 1.69it/s]\n100%|██████████| 50/50 [00:28<00:00, 1.69it/s]\n100%|██████████| 50/50 [00:28<00:00, 1.74it/s]", "metrics": { "predict_time": 32.607222, "total_time": 454.686817 }, "output": [ "https://replicate.delivery/pbxt/H3HtX6WsVnK1MRe5SWtXTN8n64OjIRdRALEfnpVLjDTbnkCRA/out_0.png" ], "started_at": "2023-06-04T13:55:07.271677Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/7o5xuuglazfz7jwippj3gzlo6u", "cancel": "https://api.replicate.com/v1/predictions/7o5xuuglazfz7jwippj3gzlo6u/cancel" }, "version": "7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c" }
Generated inUsing seed: 19585 encoder_hidden_states: torch.Size([1, 77, 768]). encoder_hidden_states_nocond: torch.Size([1, 77, 768]). [!] Detected keywords: ['Hello'] from prompt A sign that says 'Hello' index keyword x_min y_min x_max y_max 0 Hello 83 140 416 311 [√] Layout is successfully generated character-level segmentation_mask: torch.Size([1, 256, 256]). feature_mask: torch.Size([1, 1, 64, 64]). masked_feature: torch.Size([1, 4, 64, 64]). 0%| | 0/50 [00:00<?, ?it/s] 2%|▏ | 1/50 [00:00<00:28, 1.69it/s] 4%|▍ | 2/50 [00:01<00:27, 1.73it/s] 6%|▌ | 3/50 [00:01<00:27, 1.74it/s] 8%|▊ | 4/50 [00:02<00:26, 1.76it/s] 10%|█ | 5/50 [00:02<00:25, 1.77it/s] 12%|█▏ | 6/50 [00:03<00:24, 1.77it/s] 14%|█▍ | 7/50 [00:03<00:24, 1.77it/s] 16%|█▌ | 8/50 [00:04<00:23, 1.77it/s] 18%|█▊ | 9/50 [00:05<00:23, 1.77it/s] 20%|██ | 10/50 [00:05<00:22, 1.77it/s] 22%|██▏ | 11/50 [00:06<00:21, 1.77it/s] 24%|██▍ | 12/50 [00:06<00:21, 1.78it/s] 26%|██▌ | 13/50 [00:07<00:20, 1.78it/s] 28%|██▊ | 14/50 [00:07<00:20, 1.77it/s] 30%|███ | 15/50 [00:08<00:19, 1.77it/s] 32%|███▏ | 16/50 [00:09<00:19, 1.77it/s] 34%|███▍ | 17/50 [00:09<00:18, 1.77it/s] 36%|███▌ | 18/50 [00:10<00:18, 1.77it/s] 38%|███▊ | 19/50 [00:10<00:17, 1.77it/s] 40%|████ | 20/50 [00:11<00:17, 1.76it/s] 42%|████▏ | 21/50 [00:11<00:16, 1.76it/s] 44%|████▍ | 22/50 [00:12<00:15, 1.76it/s] 46%|████▌ | 23/50 [00:13<00:15, 1.76it/s] 48%|████▊ | 24/50 [00:13<00:14, 1.76it/s] 50%|█████ | 25/50 [00:14<00:14, 1.76it/s] 52%|█████▏ | 26/50 [00:14<00:13, 1.75it/s] 54%|█████▍ | 27/50 [00:15<00:13, 1.75it/s] 56%|█████▌ | 28/50 [00:15<00:12, 1.75it/s] 58%|█████▊ | 29/50 [00:16<00:12, 1.74it/s] 60%|██████ | 30/50 [00:17<00:11, 1.74it/s] 62%|██████▏ | 31/50 [00:17<00:10, 1.74it/s] 64%|██████▍ | 32/50 [00:18<00:10, 1.75it/s] 66%|██████▌ | 33/50 [00:18<00:09, 1.73it/s] 68%|██████▊ | 34/50 [00:19<00:09, 1.73it/s] 70%|███████ | 35/50 [00:19<00:08, 1.72it/s] 72%|███████▏ | 36/50 [00:20<00:08, 1.72it/s] 74%|███████▍ | 37/50 [00:21<00:07, 1.72it/s] 76%|███████▌ | 38/50 [00:21<00:06, 1.72it/s] 78%|███████▊ | 39/50 [00:22<00:06, 1.72it/s] 80%|████████ | 40/50 [00:22<00:05, 1.72it/s] 82%|████████▏ | 41/50 [00:23<00:05, 1.71it/s] 84%|████████▍ | 42/50 [00:24<00:04, 1.71it/s] 86%|████████▌ | 43/50 [00:24<00:04, 1.71it/s] 88%|████████▊ | 44/50 [00:25<00:03, 1.71it/s] 90%|█████████ | 45/50 [00:25<00:02, 1.70it/s] 92%|█████████▏| 46/50 [00:26<00:02, 1.70it/s] 94%|█████████▍| 47/50 [00:26<00:01, 1.70it/s] 96%|█████████▌| 48/50 [00:27<00:01, 1.70it/s] 98%|█████████▊| 49/50 [00:28<00:00, 1.69it/s] 100%|██████████| 50/50 [00:28<00:00, 1.69it/s] 100%|██████████| 50/50 [00:28<00:00, 1.74it/s]
Prediction
cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858cIDmhrxrxi32jcobihsddidnr5rqeStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- prompt
- A detailed portrait of a fox guardian with a shield with 'Kung Fu' written on it, by victo ngai and justin gerard, digital art, realistic painting, very detailed, fantasy, high definition, cinematic light, dnd, trending on artstation
- sample_num
- "4"
- guidance_scale
- 7.5
- num_inference_steps
- 20
{ "prompt": "A detailed portrait of a fox guardian with a shield with 'Kung Fu' written on it, by victo ngai and justin gerard, digital art, realistic painting, very detailed, fantasy, high definition, cinematic light, dnd, trending on artstation", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 20 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", { input: { prompt: "A detailed portrait of a fox guardian with a shield with 'Kung Fu' written on it, by victo ngai and justin gerard, digital art, realistic painting, very detailed, fantasy, high definition, cinematic light, dnd, trending on artstation", sample_num: "4", guidance_scale: 7.5, num_inference_steps: 20 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", input={ "prompt": "A detailed portrait of a fox guardian with a shield with 'Kung Fu' written on it, by victo ngai and justin gerard, digital art, realistic painting, very detailed, fantasy, high definition, cinematic light, dnd, trending on artstation", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 20 } ) # 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.
Run cjwbw/textdiffuser 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": "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", "input": { "prompt": "A detailed portrait of a fox guardian with a shield with \'Kung Fu\' written on it, by victo ngai and justin gerard, digital art, realistic painting, very detailed, fantasy, high definition, cinematic light, dnd, trending on artstation", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 20 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-04T13:57:17.931204Z", "created_at": "2023-06-04T13:56:27.316718Z", "data_removed": false, "error": null, "id": "mhrxrxi32jcobihsddidnr5rqe", "input": { "prompt": "A detailed portrait of a fox guardian with a shield with 'Kung Fu' written on it, by victo ngai and justin gerard, digital art, realistic painting, very detailed, fantasy, high definition, cinematic light, dnd, trending on artstation", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 20 }, "logs": "Using seed: 7919\nencoder_hidden_states: torch.Size([4, 77, 768]).\nencoder_hidden_states_nocond: torch.Size([4, 77, 768]).\n[!] Detected keywords: ['Kung', 'Fu'] from prompt A detailed portrait of a fox guardian with a shield with 'Kung Fu' written on it, by victo ngai and justin gerard, digital art, realistic painting, very detailed, fantasy, high definition, cinematic light, dnd, trending on artstation\nadjust overlapping\nindex\tkeyword\tx_min\ty_min\tx_max\ty_max\n0\tKung\t109\t117\t308\t222\n1\tFu\t147\t235\t361\t334\n[√] Layout is successfully generated\ncharacter-level segmentation_mask: torch.Size([4, 256, 256]).\nfeature_mask: torch.Size([4, 1, 64, 64]).\nmasked_feature: torch.Size([4, 4, 64, 64]).\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:02<00:40, 2.15s/it]\n 10%|█ | 2/20 [00:04<00:37, 2.07s/it]\n 15%|█▌ | 3/20 [00:06<00:34, 2.05s/it]\n 20%|██ | 4/20 [00:08<00:32, 2.05s/it]\n 25%|██▌ | 5/20 [00:10<00:30, 2.06s/it]\n 30%|███ | 6/20 [00:12<00:28, 2.07s/it]\n 35%|███▌ | 7/20 [00:14<00:27, 2.08s/it]\n 40%|████ | 8/20 [00:16<00:25, 2.09s/it]\n 45%|████▌ | 9/20 [00:18<00:23, 2.09s/it]\n 50%|█████ | 10/20 [00:20<00:20, 2.10s/it]\n 55%|█████▌ | 11/20 [00:22<00:18, 2.11s/it]\n 60%|██████ | 12/20 [00:25<00:16, 2.12s/it]\n 65%|██████▌ | 13/20 [00:27<00:14, 2.13s/it]\n 70%|███████ | 14/20 [00:29<00:12, 2.15s/it]\n 75%|███████▌ | 15/20 [00:31<00:10, 2.17s/it]\n 80%|████████ | 16/20 [00:33<00:08, 2.18s/it]\n 85%|████████▌ | 17/20 [00:36<00:06, 2.20s/it]\n 90%|█████████ | 18/20 [00:38<00:04, 2.22s/it]\n 95%|█████████▌| 19/20 [00:40<00:02, 2.24s/it]\n100%|██████████| 20/20 [00:42<00:00, 2.25s/it]\n100%|██████████| 20/20 [00:42<00:00, 2.15s/it]", "metrics": { "predict_time": 50.642519, "total_time": 50.614486 }, "output": [ "https://replicate.delivery/pbxt/2AlqPjlD4CIyPtObrGx5a1jFGlm6PVNKt1xjyrcVSfhdUShIA/out_0.png", "https://replicate.delivery/pbxt/TfxShSw6i1XSGaiQU0BYKM7rFCeUPOPSlacz7aVAg237okCRA/out_1.png", "https://replicate.delivery/pbxt/ZsafVNcSCcRacSYAYZiXfnMsctt1ZyTugXnx4VJWi4E8okCRA/out_2.png", "https://replicate.delivery/pbxt/wo07yBgDuxaIO9WZaUgYMTFdnansvtlPmCFOSxmel59eokCRA/out_3.png" ], "started_at": "2023-06-04T13:56:27.288685Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/mhrxrxi32jcobihsddidnr5rqe", "cancel": "https://api.replicate.com/v1/predictions/mhrxrxi32jcobihsddidnr5rqe/cancel" }, "version": "7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c" }
Generated inUsing seed: 7919 encoder_hidden_states: torch.Size([4, 77, 768]). encoder_hidden_states_nocond: torch.Size([4, 77, 768]). [!] Detected keywords: ['Kung', 'Fu'] from prompt A detailed portrait of a fox guardian with a shield with 'Kung Fu' written on it, by victo ngai and justin gerard, digital art, realistic painting, very detailed, fantasy, high definition, cinematic light, dnd, trending on artstation adjust overlapping index keyword x_min y_min x_max y_max 0 Kung 109 117 308 222 1 Fu 147 235 361 334 [√] Layout is successfully generated character-level segmentation_mask: torch.Size([4, 256, 256]). feature_mask: torch.Size([4, 1, 64, 64]). masked_feature: torch.Size([4, 4, 64, 64]). 0%| | 0/20 [00:00<?, ?it/s] 5%|▌ | 1/20 [00:02<00:40, 2.15s/it] 10%|█ | 2/20 [00:04<00:37, 2.07s/it] 15%|█▌ | 3/20 [00:06<00:34, 2.05s/it] 20%|██ | 4/20 [00:08<00:32, 2.05s/it] 25%|██▌ | 5/20 [00:10<00:30, 2.06s/it] 30%|███ | 6/20 [00:12<00:28, 2.07s/it] 35%|███▌ | 7/20 [00:14<00:27, 2.08s/it] 40%|████ | 8/20 [00:16<00:25, 2.09s/it] 45%|████▌ | 9/20 [00:18<00:23, 2.09s/it] 50%|█████ | 10/20 [00:20<00:20, 2.10s/it] 55%|█████▌ | 11/20 [00:22<00:18, 2.11s/it] 60%|██████ | 12/20 [00:25<00:16, 2.12s/it] 65%|██████▌ | 13/20 [00:27<00:14, 2.13s/it] 70%|███████ | 14/20 [00:29<00:12, 2.15s/it] 75%|███████▌ | 15/20 [00:31<00:10, 2.17s/it] 80%|████████ | 16/20 [00:33<00:08, 2.18s/it] 85%|████████▌ | 17/20 [00:36<00:06, 2.20s/it] 90%|█████████ | 18/20 [00:38<00:04, 2.22s/it] 95%|█████████▌| 19/20 [00:40<00:02, 2.24s/it] 100%|██████████| 20/20 [00:42<00:00, 2.25s/it] 100%|██████████| 20/20 [00:42<00:00, 2.15s/it]
Prediction
cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858cID6d7j3a4jbjblrotszd6wfy3rzqStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- prompt
- A poster of 'Adventurer'. A beautiful so tall boy with big eyes and small nose is in the jungle, he wears normal clothes and shows his full length, which we see from the front, unreal engine, cozy indoor lighting, artstation, detailed
- sample_num
- "2"
- guidance_scale
- 7.5
- num_inference_steps
- 50
{ "prompt": "A poster of 'Adventurer'. A beautiful so tall boy with big eyes and small nose is in the jungle, he wears normal clothes and shows his full length, which we see from the front, unreal engine, cozy indoor lighting, artstation, detailed", "sample_num": "2", "guidance_scale": 7.5, "num_inference_steps": 50 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", { input: { prompt: "A poster of 'Adventurer'. A beautiful so tall boy with big eyes and small nose is in the jungle, he wears normal clothes and shows his full length, which we see from the front, unreal engine, cozy indoor lighting, artstation, detailed", sample_num: "2", guidance_scale: 7.5, num_inference_steps: 50 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", input={ "prompt": "A poster of 'Adventurer'. A beautiful so tall boy with big eyes and small nose is in the jungle, he wears normal clothes and shows his full length, which we see from the front, unreal engine, cozy indoor lighting, artstation, detailed", "sample_num": "2", "guidance_scale": 7.5, "num_inference_steps": 50 } ) # 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.
Run cjwbw/textdiffuser 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": "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", "input": { "prompt": "A poster of \'Adventurer\'. A beautiful so tall boy with big eyes and small nose is in the jungle, he wears normal clothes and shows his full length, which we see from the front, unreal engine, cozy indoor lighting, artstation, detailed", "sample_num": "2", "guidance_scale": 7.5, "num_inference_steps": 50 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-04T14:03:10.963054Z", "created_at": "2023-06-04T14:02:06.587302Z", "data_removed": false, "error": null, "id": "6d7j3a4jbjblrotszd6wfy3rzq", "input": { "prompt": "A poster of 'Adventurer'. A beautiful so tall boy with big eyes and small nose is in the jungle, he wears normal clothes and shows his full length, which we see from the front, unreal engine, cozy indoor lighting, artstation, detailed", "sample_num": "2", "guidance_scale": 7.5, "num_inference_steps": 50 }, "logs": "Using seed: 52385\nencoder_hidden_states: torch.Size([2, 77, 768]).\nencoder_hidden_states_nocond: torch.Size([2, 77, 768]).\n[!] Detected keywords: ['Adventurer'] from prompt A poster of 'Adventurer'. A beautiful so tall boy with big eyes and small nose is in the jungle, he wears normal clothes and shows his full length, which we see from the front, unreal engine, cozy indoor lighting, artstation, detailed\nindex\tkeyword\tx_min\ty_min\tx_max\ty_max\n0\tAdventurer\t101\t141\t398\t231\n[√] Layout is successfully generated\ncharacter-level segmentation_mask: torch.Size([2, 256, 256]).\nfeature_mask: torch.Size([2, 1, 64, 64]).\nmasked_feature: torch.Size([2, 4, 64, 64]).\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:01<00:59, 1.20s/it]\n 4%|▍ | 2/50 [00:02<00:56, 1.17s/it]\n 6%|▌ | 3/50 [00:03<00:54, 1.16s/it]\n 8%|▊ | 4/50 [00:04<00:53, 1.16s/it]\n 10%|█ | 5/50 [00:05<00:52, 1.17s/it]\n 12%|█▏ | 6/50 [00:07<00:51, 1.17s/it]\n 14%|█▍ | 7/50 [00:08<00:50, 1.17s/it]\n 16%|█▌ | 8/50 [00:09<00:49, 1.18s/it]\n 18%|█▊ | 9/50 [00:10<00:48, 1.18s/it]\n 20%|██ | 10/50 [00:11<00:47, 1.19s/it]\n 22%|██▏ | 11/50 [00:12<00:46, 1.19s/it]\n 24%|██▍ | 12/50 [00:14<00:45, 1.20s/it]\n 26%|██▌ | 13/50 [00:15<00:44, 1.21s/it]\n 28%|██▊ | 14/50 [00:16<00:43, 1.21s/it]\n 30%|███ | 15/50 [00:17<00:42, 1.22s/it]\n 32%|███▏ | 16/50 [00:19<00:41, 1.22s/it]\n 34%|███▍ | 17/50 [00:20<00:40, 1.23s/it]\n 36%|███▌ | 18/50 [00:21<00:39, 1.23s/it]\n 38%|███▊ | 19/50 [00:22<00:38, 1.23s/it]\n 40%|████ | 20/50 [00:24<00:37, 1.24s/it]\n 42%|████▏ | 21/50 [00:25<00:35, 1.24s/it]\n 44%|████▍ | 22/50 [00:26<00:34, 1.24s/it]\n 46%|████▌ | 23/50 [00:27<00:33, 1.24s/it]\n 48%|████▊ | 24/50 [00:29<00:32, 1.24s/it]\n 50%|█████ | 25/50 [00:30<00:30, 1.23s/it]\n 52%|█████▏ | 26/50 [00:31<00:29, 1.23s/it]\n 54%|█████▍ | 27/50 [00:32<00:28, 1.23s/it]\n 56%|█████▌ | 28/50 [00:33<00:26, 1.22s/it]\n 58%|█████▊ | 29/50 [00:35<00:25, 1.22s/it]\n 60%|██████ | 30/50 [00:36<00:24, 1.22s/it]\n 62%|██████▏ | 31/50 [00:37<00:23, 1.22s/it]\n 64%|██████▍ | 32/50 [00:38<00:21, 1.22s/it]\n 66%|██████▌ | 33/50 [00:39<00:20, 1.21s/it]\n 68%|██████▊ | 34/50 [00:41<00:19, 1.21s/it]\n 70%|███████ | 35/50 [00:42<00:18, 1.21s/it]\n 72%|███████▏ | 36/50 [00:43<00:16, 1.20s/it]\n 74%|███████▍ | 37/50 [00:44<00:15, 1.20s/it]\n 76%|███████▌ | 38/50 [00:45<00:14, 1.20s/it]\n 78%|███████▊ | 39/50 [00:47<00:13, 1.19s/it]\n 80%|████████ | 40/50 [00:48<00:11, 1.19s/it]\n 82%|████████▏ | 41/50 [00:49<00:10, 1.19s/it]\n 84%|████████▍ | 42/50 [00:50<00:09, 1.18s/it]\n 86%|████████▌ | 43/50 [00:51<00:08, 1.18s/it]\n 88%|████████▊ | 44/50 [00:53<00:07, 1.18s/it]\n 90%|█████████ | 45/50 [00:54<00:05, 1.18s/it]\n 92%|█████████▏| 46/50 [00:55<00:04, 1.18s/it]\n 94%|█████████▍| 47/50 [00:56<00:03, 1.18s/it]\n 96%|█████████▌| 48/50 [00:57<00:02, 1.17s/it]\n 98%|█████████▊| 49/50 [00:58<00:01, 1.17s/it]\n100%|██████████| 50/50 [01:00<00:00, 1.17s/it]\n100%|██████████| 50/50 [01:00<00:00, 1.20s/it]", "metrics": { "predict_time": 64.405749, "total_time": 64.375752 }, "output": [ "https://replicate.delivery/pbxt/96OtfFmNUdyoM6VjeXrQX2Kt2thYOIxuaAsNv8KfHMs7cJFiA/out_0.png", "https://replicate.delivery/pbxt/hct9OjTQfoX4Ui5XBi2e0ddX0Ulyhok2GeW2Z5OfjS845SKEB/out_1.png" ], "started_at": "2023-06-04T14:02:06.557305Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/6d7j3a4jbjblrotszd6wfy3rzq", "cancel": "https://api.replicate.com/v1/predictions/6d7j3a4jbjblrotszd6wfy3rzq/cancel" }, "version": "7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c" }
Generated inUsing seed: 52385 encoder_hidden_states: torch.Size([2, 77, 768]). encoder_hidden_states_nocond: torch.Size([2, 77, 768]). [!] Detected keywords: ['Adventurer'] from prompt A poster of 'Adventurer'. A beautiful so tall boy with big eyes and small nose is in the jungle, he wears normal clothes and shows his full length, which we see from the front, unreal engine, cozy indoor lighting, artstation, detailed index keyword x_min y_min x_max y_max 0 Adventurer 101 141 398 231 [√] Layout is successfully generated character-level segmentation_mask: torch.Size([2, 256, 256]). feature_mask: torch.Size([2, 1, 64, 64]). masked_feature: torch.Size([2, 4, 64, 64]). 0%| | 0/50 [00:00<?, ?it/s] 2%|▏ | 1/50 [00:01<00:59, 1.20s/it] 4%|▍ | 2/50 [00:02<00:56, 1.17s/it] 6%|▌ | 3/50 [00:03<00:54, 1.16s/it] 8%|▊ | 4/50 [00:04<00:53, 1.16s/it] 10%|█ | 5/50 [00:05<00:52, 1.17s/it] 12%|█▏ | 6/50 [00:07<00:51, 1.17s/it] 14%|█▍ | 7/50 [00:08<00:50, 1.17s/it] 16%|█▌ | 8/50 [00:09<00:49, 1.18s/it] 18%|█▊ | 9/50 [00:10<00:48, 1.18s/it] 20%|██ | 10/50 [00:11<00:47, 1.19s/it] 22%|██▏ | 11/50 [00:12<00:46, 1.19s/it] 24%|██▍ | 12/50 [00:14<00:45, 1.20s/it] 26%|██▌ | 13/50 [00:15<00:44, 1.21s/it] 28%|██▊ | 14/50 [00:16<00:43, 1.21s/it] 30%|███ | 15/50 [00:17<00:42, 1.22s/it] 32%|███▏ | 16/50 [00:19<00:41, 1.22s/it] 34%|███▍ | 17/50 [00:20<00:40, 1.23s/it] 36%|███▌ | 18/50 [00:21<00:39, 1.23s/it] 38%|███▊ | 19/50 [00:22<00:38, 1.23s/it] 40%|████ | 20/50 [00:24<00:37, 1.24s/it] 42%|████▏ | 21/50 [00:25<00:35, 1.24s/it] 44%|████▍ | 22/50 [00:26<00:34, 1.24s/it] 46%|████▌ | 23/50 [00:27<00:33, 1.24s/it] 48%|████▊ | 24/50 [00:29<00:32, 1.24s/it] 50%|█████ | 25/50 [00:30<00:30, 1.23s/it] 52%|█████▏ | 26/50 [00:31<00:29, 1.23s/it] 54%|█████▍ | 27/50 [00:32<00:28, 1.23s/it] 56%|█████▌ | 28/50 [00:33<00:26, 1.22s/it] 58%|█████▊ | 29/50 [00:35<00:25, 1.22s/it] 60%|██████ | 30/50 [00:36<00:24, 1.22s/it] 62%|██████▏ | 31/50 [00:37<00:23, 1.22s/it] 64%|██████▍ | 32/50 [00:38<00:21, 1.22s/it] 66%|██████▌ | 33/50 [00:39<00:20, 1.21s/it] 68%|██████▊ | 34/50 [00:41<00:19, 1.21s/it] 70%|███████ | 35/50 [00:42<00:18, 1.21s/it] 72%|███████▏ | 36/50 [00:43<00:16, 1.20s/it] 74%|███████▍ | 37/50 [00:44<00:15, 1.20s/it] 76%|███████▌ | 38/50 [00:45<00:14, 1.20s/it] 78%|███████▊ | 39/50 [00:47<00:13, 1.19s/it] 80%|████████ | 40/50 [00:48<00:11, 1.19s/it] 82%|████████▏ | 41/50 [00:49<00:10, 1.19s/it] 84%|████████▍ | 42/50 [00:50<00:09, 1.18s/it] 86%|████████▌ | 43/50 [00:51<00:08, 1.18s/it] 88%|████████▊ | 44/50 [00:53<00:07, 1.18s/it] 90%|█████████ | 45/50 [00:54<00:05, 1.18s/it] 92%|█████████▏| 46/50 [00:55<00:04, 1.18s/it] 94%|█████████▍| 47/50 [00:56<00:03, 1.18s/it] 96%|█████████▌| 48/50 [00:57<00:02, 1.17s/it] 98%|█████████▊| 49/50 [00:58<00:01, 1.17s/it] 100%|██████████| 50/50 [01:00<00:00, 1.17s/it] 100%|██████████| 50/50 [01:00<00:00, 1.20s/it]
Prediction
cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858cIDgwem4yosvrfshbe7ntz5tvluveStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- prompt
- epic digital art of a luxury yacht named 'Time Machine' driving through very dark hard edged city towers from tron movie, faint tall mountains in background, wlop, pixiv
- sample_num
- "4"
- guidance_scale
- 7.5
- num_inference_steps
- 50
{ "prompt": "epic digital art of a luxury yacht named 'Time Machine' driving through very dark hard edged city towers from tron movie, faint tall mountains in background, wlop, pixiv", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 50 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", { input: { prompt: "epic digital art of a luxury yacht named 'Time Machine' driving through very dark hard edged city towers from tron movie, faint tall mountains in background, wlop, pixiv", sample_num: "4", guidance_scale: 7.5, num_inference_steps: 50 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", input={ "prompt": "epic digital art of a luxury yacht named 'Time Machine' driving through very dark hard edged city towers from tron movie, faint tall mountains in background, wlop, pixiv", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 50 } ) # 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.
Run cjwbw/textdiffuser 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": "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", "input": { "prompt": "epic digital art of a luxury yacht named \'Time Machine\' driving through very dark hard edged city towers from tron movie, faint tall mountains in background, wlop, pixiv", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 50 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-04T14:05:55.864244Z", "created_at": "2023-06-04T14:03:53.503146Z", "data_removed": false, "error": null, "id": "gwem4yosvrfshbe7ntz5tvluve", "input": { "prompt": "epic digital art of a luxury yacht named 'Time Machine' driving through very dark hard edged city towers from tron movie, faint tall mountains in background, wlop, pixiv", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 50 }, "logs": "Using seed: 61611\nencoder_hidden_states: torch.Size([4, 77, 768]).\nencoder_hidden_states_nocond: torch.Size([4, 77, 768]).\n[!] Detected keywords: ['Time', 'Machine'] from prompt epic digital art of a luxury yacht named 'Time Machine' driving through very dark hard edged city towers from tron movie, faint tall mountains in background, wlop, pixiv\nadjust overlapping\nindex\tkeyword\tx_min\ty_min\tx_max\ty_max\n0\tTime\t83\t145\t286\t216\n1\tMachine\t207\t228\t437\t307\n[√] Layout is successfully generated\ncharacter-level segmentation_mask: torch.Size([4, 256, 256]).\nfeature_mask: torch.Size([4, 1, 64, 64]).\nmasked_feature: torch.Size([4, 4, 64, 64]).\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:02<01:53, 2.31s/it]\n 4%|▍ | 2/50 [00:04<01:49, 2.28s/it]\n 6%|▌ | 3/50 [00:06<01:45, 2.24s/it]\n 8%|▊ | 4/50 [00:08<01:42, 2.24s/it]\n 10%|█ | 5/50 [00:11<01:40, 2.24s/it]\n 12%|█▏ | 6/50 [00:13<01:39, 2.25s/it]\n 14%|█▍ | 7/50 [00:15<01:37, 2.27s/it]\n 16%|█▌ | 8/50 [00:18<01:35, 2.28s/it]\n 18%|█▊ | 9/50 [00:20<01:34, 2.30s/it]\n 20%|██ | 10/50 [00:22<01:32, 2.32s/it]\n 22%|██▏ | 11/50 [00:25<01:31, 2.34s/it]\n 24%|██▍ | 12/50 [00:27<01:29, 2.36s/it]\n 26%|██▌ | 13/50 [00:30<01:28, 2.38s/it]\n 28%|██▊ | 14/50 [00:32<01:26, 2.40s/it]\n 30%|███ | 15/50 [00:34<01:24, 2.41s/it]\n 32%|███▏ | 16/50 [00:37<01:22, 2.41s/it]\n 34%|███▍ | 17/50 [00:39<01:19, 2.41s/it]\n 36%|███▌ | 18/50 [00:42<01:16, 2.40s/it]\n 38%|███▊ | 19/50 [00:44<01:13, 2.39s/it]\n 40%|████ | 20/50 [00:46<01:11, 2.37s/it]\n 42%|████▏ | 21/50 [00:49<01:08, 2.35s/it]\n 44%|████▍ | 22/50 [00:51<01:05, 2.34s/it]\n 46%|████▌ | 23/50 [00:53<01:02, 2.32s/it]\n 48%|████▊ | 24/50 [00:56<00:59, 2.31s/it]\n 50%|█████ | 25/50 [00:58<00:57, 2.30s/it]\n 52%|█████▏ | 26/50 [01:00<00:54, 2.28s/it]\n 54%|█████▍ | 27/50 [01:02<00:52, 2.27s/it]\n 56%|█████▌ | 28/50 [01:04<00:49, 2.26s/it]\n 58%|█████▊ | 29/50 [01:07<00:47, 2.25s/it]\n 60%|██████ | 30/50 [01:09<00:44, 2.24s/it]\n 62%|██████▏ | 31/50 [01:11<00:42, 2.24s/it]\n 64%|██████▍ | 32/50 [01:13<00:40, 2.23s/it]\n 66%|██████▌ | 33/50 [01:16<00:37, 2.23s/it]\n 68%|██████▊ | 34/50 [01:18<00:35, 2.23s/it]\n 70%|███████ | 35/50 [01:20<00:33, 2.23s/it]\n 72%|███████▏ | 36/50 [01:22<00:31, 2.23s/it]\n 74%|███████▍ | 37/50 [01:25<00:28, 2.23s/it]\n 76%|███████▌ | 38/50 [01:27<00:26, 2.23s/it]\n 78%|███████▊ | 39/50 [01:29<00:24, 2.23s/it]\n 80%|████████ | 40/50 [01:31<00:22, 2.24s/it]\n 82%|████████▏ | 41/50 [01:34<00:20, 2.25s/it]\n 84%|████████▍ | 42/50 [01:36<00:18, 2.25s/it]\n 86%|████████▌ | 43/50 [01:38<00:15, 2.26s/it]\n 88%|████████▊ | 44/50 [01:40<00:13, 2.27s/it]\n 90%|█████████ | 45/50 [01:43<00:11, 2.28s/it]\n 92%|█████████▏| 46/50 [01:45<00:09, 2.29s/it]\n 94%|█████████▍| 47/50 [01:47<00:06, 2.29s/it]\n 96%|█████████▌| 48/50 [01:50<00:04, 2.30s/it]\n 98%|█████████▊| 49/50 [01:52<00:02, 2.31s/it]\n100%|██████████| 50/50 [01:54<00:00, 2.32s/it]\n100%|██████████| 50/50 [01:54<00:00, 2.30s/it]", "metrics": { "predict_time": 122.432313, "total_time": 122.361098 }, "output": [ "https://replicate.delivery/pbxt/kVBhtWPGgv57NZfks0PRp7m3ae56FxAQv09lo5YeiZgDiJFiA/out_0.png", "https://replicate.delivery/pbxt/RuYeCgFD7PWhNa8hmXwl7f1gsZlBQo3LfX53We6I0O1JETKEB/out_1.png", "https://replicate.delivery/pbxt/sTnvbH0ZVbrPNthw5qDTQkdxug71iYhTmv9NY2wIrEqQMpQE/out_2.png", "https://replicate.delivery/pbxt/5Bwwd872tb4JD5hGfm0Y3A9slKKPoVjkcdGbm6haCozhYShIA/out_3.png" ], "started_at": "2023-06-04T14:03:53.431931Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/gwem4yosvrfshbe7ntz5tvluve", "cancel": "https://api.replicate.com/v1/predictions/gwem4yosvrfshbe7ntz5tvluve/cancel" }, "version": "7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c" }
Generated inUsing seed: 61611 encoder_hidden_states: torch.Size([4, 77, 768]). encoder_hidden_states_nocond: torch.Size([4, 77, 768]). [!] Detected keywords: ['Time', 'Machine'] from prompt epic digital art of a luxury yacht named 'Time Machine' driving through very dark hard edged city towers from tron movie, faint tall mountains in background, wlop, pixiv adjust overlapping index keyword x_min y_min x_max y_max 0 Time 83 145 286 216 1 Machine 207 228 437 307 [√] Layout is successfully generated character-level segmentation_mask: torch.Size([4, 256, 256]). feature_mask: torch.Size([4, 1, 64, 64]). masked_feature: torch.Size([4, 4, 64, 64]). 0%| | 0/50 [00:00<?, ?it/s] 2%|▏ | 1/50 [00:02<01:53, 2.31s/it] 4%|▍ | 2/50 [00:04<01:49, 2.28s/it] 6%|▌ | 3/50 [00:06<01:45, 2.24s/it] 8%|▊ | 4/50 [00:08<01:42, 2.24s/it] 10%|█ | 5/50 [00:11<01:40, 2.24s/it] 12%|█▏ | 6/50 [00:13<01:39, 2.25s/it] 14%|█▍ | 7/50 [00:15<01:37, 2.27s/it] 16%|█▌ | 8/50 [00:18<01:35, 2.28s/it] 18%|█▊ | 9/50 [00:20<01:34, 2.30s/it] 20%|██ | 10/50 [00:22<01:32, 2.32s/it] 22%|██▏ | 11/50 [00:25<01:31, 2.34s/it] 24%|██▍ | 12/50 [00:27<01:29, 2.36s/it] 26%|██▌ | 13/50 [00:30<01:28, 2.38s/it] 28%|██▊ | 14/50 [00:32<01:26, 2.40s/it] 30%|███ | 15/50 [00:34<01:24, 2.41s/it] 32%|███▏ | 16/50 [00:37<01:22, 2.41s/it] 34%|███▍ | 17/50 [00:39<01:19, 2.41s/it] 36%|███▌ | 18/50 [00:42<01:16, 2.40s/it] 38%|███▊ | 19/50 [00:44<01:13, 2.39s/it] 40%|████ | 20/50 [00:46<01:11, 2.37s/it] 42%|████▏ | 21/50 [00:49<01:08, 2.35s/it] 44%|████▍ | 22/50 [00:51<01:05, 2.34s/it] 46%|████▌ | 23/50 [00:53<01:02, 2.32s/it] 48%|████▊ | 24/50 [00:56<00:59, 2.31s/it] 50%|█████ | 25/50 [00:58<00:57, 2.30s/it] 52%|█████▏ | 26/50 [01:00<00:54, 2.28s/it] 54%|█████▍ | 27/50 [01:02<00:52, 2.27s/it] 56%|█████▌ | 28/50 [01:04<00:49, 2.26s/it] 58%|█████▊ | 29/50 [01:07<00:47, 2.25s/it] 60%|██████ | 30/50 [01:09<00:44, 2.24s/it] 62%|██████▏ | 31/50 [01:11<00:42, 2.24s/it] 64%|██████▍ | 32/50 [01:13<00:40, 2.23s/it] 66%|██████▌ | 33/50 [01:16<00:37, 2.23s/it] 68%|██████▊ | 34/50 [01:18<00:35, 2.23s/it] 70%|███████ | 35/50 [01:20<00:33, 2.23s/it] 72%|███████▏ | 36/50 [01:22<00:31, 2.23s/it] 74%|███████▍ | 37/50 [01:25<00:28, 2.23s/it] 76%|███████▌ | 38/50 [01:27<00:26, 2.23s/it] 78%|███████▊ | 39/50 [01:29<00:24, 2.23s/it] 80%|████████ | 40/50 [01:31<00:22, 2.24s/it] 82%|████████▏ | 41/50 [01:34<00:20, 2.25s/it] 84%|████████▍ | 42/50 [01:36<00:18, 2.25s/it] 86%|████████▌ | 43/50 [01:38<00:15, 2.26s/it] 88%|████████▊ | 44/50 [01:40<00:13, 2.27s/it] 90%|█████████ | 45/50 [01:43<00:11, 2.28s/it] 92%|█████████▏| 46/50 [01:45<00:09, 2.29s/it] 94%|█████████▍| 47/50 [01:47<00:06, 2.29s/it] 96%|█████████▌| 48/50 [01:50<00:04, 2.30s/it] 98%|█████████▊| 49/50 [01:52<00:02, 2.31s/it] 100%|██████████| 50/50 [01:54<00:00, 2.32s/it] 100%|██████████| 50/50 [01:54<00:00, 2.30s/it]
Prediction
cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858cIDmeap6zvpjbad7klmqm3ddhtwfyStatusSucceededSourceWebHardwareT4Total durationCreatedInput
- prompt
- A cat holding up a sign saying 'Hello World'
- sample_num
- "4"
- guidance_scale
- 7.5
- num_inference_steps
- 50
{ "prompt": "A cat holding up a sign saying 'Hello World'", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 50 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", { input: { prompt: "A cat holding up a sign saying 'Hello World'", sample_num: "4", guidance_scale: 7.5, num_inference_steps: 50 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/textdiffuser using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", input={ "prompt": "A cat holding up a sign saying 'Hello World'", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 50 } ) # 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.
Run cjwbw/textdiffuser 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": "cjwbw/textdiffuser:7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c", "input": { "prompt": "A cat holding up a sign saying \'Hello World\'", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 50 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-06-05T19:07:56.587471Z", "created_at": "2023-06-05T19:06:05.716071Z", "data_removed": false, "error": null, "id": "meap6zvpjbad7klmqm3ddhtwfy", "input": { "prompt": "A cat holding up a sign saying 'Hello World'", "sample_num": "4", "guidance_scale": 7.5, "num_inference_steps": 50 }, "logs": "Using seed: 16309\nencoder_hidden_states: torch.Size([4, 77, 768]).\nencoder_hidden_states_nocond: torch.Size([4, 77, 768]).\n[!] Detected keywords: ['Hello', 'World'] from prompt A cat holding up a sign saying 'Hello World'\nadjust overlapping\nindex\tkeyword\tx_min\ty_min\tx_max\ty_max\n0\tHello\t94\t122\t337\t219\n1\tWorld\t102\t231\t391\t335\n[√] Layout is successfully generated\ncharacter-level segmentation_mask: torch.Size([4, 256, 256]).\nfeature_mask: torch.Size([4, 1, 64, 64]).\nmasked_feature: torch.Size([4, 4, 64, 64]).\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:02<01:42, 2.10s/it]\n 4%|▍ | 2/50 [00:04<01:36, 2.02s/it]\n 6%|▌ | 3/50 [00:06<01:33, 1.99s/it]\n 8%|▊ | 4/50 [00:08<01:31, 1.99s/it]\n 10%|█ | 5/50 [00:10<01:29, 1.99s/it]\n 12%|█▏ | 6/50 [00:11<01:27, 1.99s/it]\n 14%|█▍ | 7/50 [00:13<01:25, 1.98s/it]\n 16%|█▌ | 8/50 [00:15<01:23, 1.98s/it]\n 18%|█▊ | 9/50 [00:17<01:21, 1.98s/it]\n 20%|██ | 10/50 [00:19<01:19, 1.99s/it]\n 22%|██▏ | 11/50 [00:21<01:17, 1.99s/it]\n 24%|██▍ | 12/50 [00:23<01:15, 2.00s/it]\n 26%|██▌ | 13/50 [00:25<01:14, 2.00s/it]\n 28%|██▊ | 14/50 [00:27<01:12, 2.01s/it]\n 30%|███ | 15/50 [00:29<01:10, 2.01s/it]\n 32%|███▏ | 16/50 [00:32<01:08, 2.02s/it]\n 34%|███▍ | 17/50 [00:34<01:06, 2.02s/it]\n 36%|███▌ | 18/50 [00:36<01:04, 2.03s/it]\n 38%|███▊ | 19/50 [00:38<01:02, 2.03s/it]\n 40%|████ | 20/50 [00:40<01:01, 2.04s/it]\n 42%|████▏ | 21/50 [00:42<00:59, 2.05s/it]\n 44%|████▍ | 22/50 [00:44<00:57, 2.05s/it]\n 46%|████▌ | 23/50 [00:46<00:55, 2.06s/it]\n 48%|████▊ | 24/50 [00:48<00:53, 2.06s/it]\n 50%|█████ | 25/50 [00:50<00:51, 2.07s/it]\n 52%|█████▏ | 26/50 [00:52<00:49, 2.07s/it]\n 54%|█████▍ | 27/50 [00:54<00:47, 2.08s/it]\n 56%|█████▌ | 28/50 [00:56<00:45, 2.08s/it]\n 58%|█████▊ | 29/50 [00:58<00:43, 2.09s/it]\n 60%|██████ | 30/50 [01:01<00:41, 2.10s/it]\n 62%|██████▏ | 31/50 [01:03<00:39, 2.10s/it]\n 64%|██████▍ | 32/50 [01:05<00:38, 2.11s/it]\n 66%|██████▌ | 33/50 [01:07<00:36, 2.12s/it]\n 68%|██████▊ | 34/50 [01:09<00:33, 2.12s/it]\n 70%|███████ | 35/50 [01:11<00:31, 2.12s/it]\n 72%|███████▏ | 36/50 [01:13<00:29, 2.12s/it]\n 74%|███████▍ | 37/50 [01:15<00:27, 2.12s/it]\n 76%|███████▌ | 38/50 [01:18<00:25, 2.13s/it]\n 78%|███████▊ | 39/50 [01:20<00:23, 2.13s/it]\n 80%|████████ | 40/50 [01:22<00:21, 2.14s/it]\n 82%|████████▏ | 41/50 [01:24<00:19, 2.15s/it]\n 84%|████████▍ | 42/50 [01:26<00:17, 2.15s/it]\n 86%|████████▌ | 43/50 [01:28<00:15, 2.16s/it]\n 88%|████████▊ | 44/50 [01:31<00:12, 2.17s/it]\n 90%|█████████ | 45/50 [01:33<00:10, 2.17s/it]\n 92%|█████████▏| 46/50 [01:35<00:08, 2.17s/it]\n 94%|█████████▍| 47/50 [01:37<00:06, 2.18s/it]\n 96%|█████████▌| 48/50 [01:39<00:04, 2.18s/it]\n 98%|█████████▊| 49/50 [01:41<00:02, 2.18s/it]\n100%|██████████| 50/50 [01:44<00:00, 2.19s/it]\n100%|██████████| 50/50 [01:44<00:00, 2.08s/it]", "metrics": { "predict_time": 111.665141, "total_time": 110.8714 }, "output": [ "https://replicate.delivery/pbxt/RMdLjFqd7eTmM6R6lPIWJi1YYOGHcetBCeqxEssIceFoI5LEB/out_0.png", "https://replicate.delivery/pbxt/X3oQjHwHWwoaMVtn3l6fia4VgLZenaNey8aplvVG6yCWk8FiA/out_1.png", "https://replicate.delivery/pbxt/z3fT3LKNCr01Ii7z1eqVwe2jcuCVnX1yVBpi0AxPVpaXk8FiA/out_2.png", "https://replicate.delivery/pbxt/9yvL5Df68U1ObieH2tMqbrIkN2GeaTXtFAFhfLFVZ49uI5LEB/out_3.png" ], "started_at": "2023-06-05T19:06:04.922330Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/meap6zvpjbad7klmqm3ddhtwfy", "cancel": "https://api.replicate.com/v1/predictions/meap6zvpjbad7klmqm3ddhtwfy/cancel" }, "version": "7d7fdc0954e65ee53d61dde9bc342865e0fe1e45c6f491c10e05975439c6858c" }
Generated inUsing seed: 16309 encoder_hidden_states: torch.Size([4, 77, 768]). encoder_hidden_states_nocond: torch.Size([4, 77, 768]). [!] Detected keywords: ['Hello', 'World'] from prompt A cat holding up a sign saying 'Hello World' adjust overlapping index keyword x_min y_min x_max y_max 0 Hello 94 122 337 219 1 World 102 231 391 335 [√] Layout is successfully generated character-level segmentation_mask: torch.Size([4, 256, 256]). feature_mask: torch.Size([4, 1, 64, 64]). masked_feature: torch.Size([4, 4, 64, 64]). 0%| | 0/50 [00:00<?, ?it/s] 2%|▏ | 1/50 [00:02<01:42, 2.10s/it] 4%|▍ | 2/50 [00:04<01:36, 2.02s/it] 6%|▌ | 3/50 [00:06<01:33, 1.99s/it] 8%|▊ | 4/50 [00:08<01:31, 1.99s/it] 10%|█ | 5/50 [00:10<01:29, 1.99s/it] 12%|█▏ | 6/50 [00:11<01:27, 1.99s/it] 14%|█▍ | 7/50 [00:13<01:25, 1.98s/it] 16%|█▌ | 8/50 [00:15<01:23, 1.98s/it] 18%|█▊ | 9/50 [00:17<01:21, 1.98s/it] 20%|██ | 10/50 [00:19<01:19, 1.99s/it] 22%|██▏ | 11/50 [00:21<01:17, 1.99s/it] 24%|██▍ | 12/50 [00:23<01:15, 2.00s/it] 26%|██▌ | 13/50 [00:25<01:14, 2.00s/it] 28%|██▊ | 14/50 [00:27<01:12, 2.01s/it] 30%|███ | 15/50 [00:29<01:10, 2.01s/it] 32%|███▏ | 16/50 [00:32<01:08, 2.02s/it] 34%|███▍ | 17/50 [00:34<01:06, 2.02s/it] 36%|███▌ | 18/50 [00:36<01:04, 2.03s/it] 38%|███▊ | 19/50 [00:38<01:02, 2.03s/it] 40%|████ | 20/50 [00:40<01:01, 2.04s/it] 42%|████▏ | 21/50 [00:42<00:59, 2.05s/it] 44%|████▍ | 22/50 [00:44<00:57, 2.05s/it] 46%|████▌ | 23/50 [00:46<00:55, 2.06s/it] 48%|████▊ | 24/50 [00:48<00:53, 2.06s/it] 50%|█████ | 25/50 [00:50<00:51, 2.07s/it] 52%|█████▏ | 26/50 [00:52<00:49, 2.07s/it] 54%|█████▍ | 27/50 [00:54<00:47, 2.08s/it] 56%|█████▌ | 28/50 [00:56<00:45, 2.08s/it] 58%|█████▊ | 29/50 [00:58<00:43, 2.09s/it] 60%|██████ | 30/50 [01:01<00:41, 2.10s/it] 62%|██████▏ | 31/50 [01:03<00:39, 2.10s/it] 64%|██████▍ | 32/50 [01:05<00:38, 2.11s/it] 66%|██████▌ | 33/50 [01:07<00:36, 2.12s/it] 68%|██████▊ | 34/50 [01:09<00:33, 2.12s/it] 70%|███████ | 35/50 [01:11<00:31, 2.12s/it] 72%|███████▏ | 36/50 [01:13<00:29, 2.12s/it] 74%|███████▍ | 37/50 [01:15<00:27, 2.12s/it] 76%|███████▌ | 38/50 [01:18<00:25, 2.13s/it] 78%|███████▊ | 39/50 [01:20<00:23, 2.13s/it] 80%|████████ | 40/50 [01:22<00:21, 2.14s/it] 82%|████████▏ | 41/50 [01:24<00:19, 2.15s/it] 84%|████████▍ | 42/50 [01:26<00:17, 2.15s/it] 86%|████████▌ | 43/50 [01:28<00:15, 2.16s/it] 88%|████████▊ | 44/50 [01:31<00:12, 2.17s/it] 90%|█████████ | 45/50 [01:33<00:10, 2.17s/it] 92%|█████████▏| 46/50 [01:35<00:08, 2.17s/it] 94%|█████████▍| 47/50 [01:37<00:06, 2.18s/it] 96%|█████████▌| 48/50 [01:39<00:04, 2.18s/it] 98%|█████████▊| 49/50 [01:41<00:02, 2.18s/it] 100%|██████████| 50/50 [01:44<00:00, 2.19s/it] 100%|██████████| 50/50 [01:44<00:00, 2.08s/it]
Want to make some of these yourself?
Run this model