pixray / text2image
Uses pixray to generate an image from text prompt
Prediction
pixray/text2image:615c4370d428ca73e0a127147e29f336fbb44dde181f242315f5cfc33ff9ee44Input
- prompts
- a surreal album cover depicting a goose of eternal dread #pixelart
- settings
- vdiff_model: cc12m_1 size: [456, 256] vector_prompts: None clip_models: RN101,ViT-B/32,ViT-B/16
{ "prompts": "a surreal album cover depicting a goose of eternal dread #pixelart", "settings": "vdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\nclip_models: RN101,ViT-B/32,ViT-B/16" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:615c4370d428ca73e0a127147e29f336fbb44dde181f242315f5cfc33ff9ee44", { input: { prompts: "a surreal album cover depicting a goose of eternal dread #pixelart", settings: "vdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\nclip_models: RN101,ViT-B/32,ViT-B/16" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:615c4370d428ca73e0a127147e29f336fbb44dde181f242315f5cfc33ff9ee44", input={ "prompts": "a surreal album cover depicting a goose of eternal dread #pixelart", "settings": "vdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\nclip_models: RN101,ViT-B/32,ViT-B/16" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:615c4370d428ca73e0a127147e29f336fbb44dde181f242315f5cfc33ff9ee44", "input": { "prompts": "a surreal album cover depicting a goose of eternal dread #pixelart", "settings": "vdiff_model: cc12m_1\\nsize: [456, 256]\\nvector_prompts: None\\nclip_models: RN101,ViT-B/32,ViT-B/16" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-16T19:46:36.308463Z", "created_at": "2022-01-16T19:38:43.331325Z", "data_removed": false, "error": null, "id": "cn3qnnw2ovahhcgwtd54q4wgne", "input": { "prompts": "a surreal album cover depicting a goose of eternal dread #pixelart", "settings": "vdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\nclip_models: RN101,ViT-B/32,ViT-B/16" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n5967053139757546823\nLoaded CLIP RN101: 119.69M params\nLoaded CLIP ViT-B/32: 151.28M params\nLoaded CLIP ViT-B/16: 149.62M params\ndrawer <vdiff.VdiffDrawer object at 0x7fec07e6f160> needs ViT-B/16\nclip_embed for drawer <vdiff.VdiffDrawer object at 0x7fec07e6f160> is torch.Size([1, 512])\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['a surreal album cover depicting a goose of eternal dread #pixelart']\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 2.47, losses: 0.69, 0.886, 0.897 (-0=>2.472)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.33, losses: 0.633, 0.849, 0.847 (-0=>2.329)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.3, losses: 0.62, 0.844, 0.832 (-0=>2.297)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.23, losses: 0.601, 0.817, 0.808 (-0=>2.225)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.14, losses: 0.565, 0.787, 0.793 (-0=>2.144)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.11, losses: 0.567, 0.776, 0.768 (-1=>2.055)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.01, losses: 0.529, 0.746, 0.731 (-0=>2.007)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 1.96, losses: 0.52, 0.736, 0.708 (-1=>1.943)\n\n0it [00:01, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 1.89, losses: 0.5, 0.71, 0.678 (-0=>1.889)\n\n0it [00:01, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 1.85, losses: 0.478, 0.705, 0.665 (-1=>1.833)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 1.82, losses: 0.466, 0.697, 0.659 (-3=>1.812)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 1.81, losses: 0.464, 0.689, 0.656 (-0=>1.808)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 1.8, losses: 0.465, 0.681, 0.654 (-3=>1.785)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 1.8, losses: 0.468, 0.685, 0.646 (-13=>1.785)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 1.79, losses: 0.461, 0.68, 0.648 (-2=>1.763)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 1.8, losses: 0.467, 0.678, 0.654 (-12=>1.763)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 1.8, losses: 0.466, 0.683, 0.65 (-22=>1.763)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 1.79, losses: 0.467, 0.678, 0.651 (-32=>1.763)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 1.78, losses: 0.458, 0.675, 0.642 (-42=>1.763)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 1.77, losses: 0.463, 0.671, 0.64 (-52=>1.763)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 1.8, losses: 0.47, 0.679, 0.65 (-62=>1.763)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 1.82, losses: 0.476, 0.681, 0.659 (-72=>1.763)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 1.8, losses: 0.473, 0.678, 0.651 (-82=>1.763)\n\n0it [00:01, ?it/s]\nDropping learning rate\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 1.82, losses: 0.477, 0.683, 0.658 (-1=>1.789)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 1.8, losses: 0.468, 0.678, 0.655 (-11=>1.789)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 1.8, losses: 0.468, 0.675, 0.652 (-21=>1.789)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 1.82, losses: 0.476, 0.682, 0.66 (-31=>1.789)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 1.81, losses: 0.477, 0.679, 0.656 (-41=>1.789)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 1.81, losses: 0.473, 0.68, 0.659 (-51=>1.789)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 1.83, losses: 0.483, 0.683, 0.668 (-61=>1.789)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-71=>1.789)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 472.718694, "total_time": 472.977138 }, "output": [ { "file": "https://replicate.delivery/mgxm/ce535828-7eec-4f43-835b-0007fce53421/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7837912d-f42c-41a9-83fd-1c24ff127248/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/32b8182f-136e-40ea-91e1-b687cf0b3e5f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c872a004-3031-4a04-a128-4811e7d73b57/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9b76d1b6-0468-4828-927d-97e0ab55436e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d004a598-f683-4243-8b75-636f438cf627/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a1884c9f-28a9-423d-a098-ebc9ff13e6de/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2c73b40d-a80b-4f3a-af29-5ed74e22bc7b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b7b14f32-a3c6-43d2-b385-ffea84f002e3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c8a1d950-c1db-40b4-947d-0cd996474600/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/cf55b65b-6874-498c-9ad6-cf5747fe7075/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e223617f-681f-46f1-9da2-13ff339ce8f5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3831434e-ed09-486f-aa8b-0d98a30b0675/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0911fa7e-c8a5-44a1-b108-54bd481f67e0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/16b80a15-6745-4eab-8ca7-11295958731f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/57a726dc-b8a2-4233-8eb0-0019d3d50232/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/bdce31d1-17fb-45a1-9c48-0513adc3918b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d5456cec-087c-40c3-8e5d-229ffe35d8be/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0318886e-650d-4f4e-bce8-ac96226645fe/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b8c2e5a7-89c5-4dc3-974b-80c0a8b1fbe3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b135665f-a828-4a21-88ff-cc5e779d5ff4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/468e277f-c31b-4b4a-80b8-1c1b6694df76/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/12204d27-bb14-47a4-b51b-852ba29ec3dc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f10e8642-abae-488b-8830-d8d29d85ab6e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2cbfe66c-49c7-4da0-a8ba-8f00aa0e65bd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ff2c654e-6cd1-46df-a600-5d357f9c43fa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/35052c7b-52d8-4d34-8f80-9b087c0b2e61/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/96647e42-00a7-4b1f-b4d3-31857b18792e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fa3becc6-6e0b-40f3-989b-44fec32eb7f8/tempfile.png" } ], "started_at": "2022-01-16T19:38:43.589769Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/cn3qnnw2ovahhcgwtd54q4wgne", "cancel": "https://api.replicate.com/v1/predictions/cn3qnnw2ovahhcgwtd54q4wgne/cancel" }, "version": "615c4370d428ca73e0a127147e29f336fbb44dde181f242315f5cfc33ff9ee44" }
Generated in---> BasePixrayPredictor Predict Using seed: 5967053139757546823 Loaded CLIP RN101: 119.69M params Loaded CLIP ViT-B/32: 151.28M params Loaded CLIP ViT-B/16: 149.62M params drawer <vdiff.VdiffDrawer object at 0x7fec07e6f160> needs ViT-B/16 clip_embed for drawer <vdiff.VdiffDrawer object at 0x7fec07e6f160> is torch.Size([1, 512]) Using device: cuda:0 Optimising using: Adam Using text prompts: ['a surreal album cover depicting a goose of eternal dread #pixelart'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 2.47, losses: 0.69, 0.886, 0.897 (-0=>2.472) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.33, losses: 0.633, 0.849, 0.847 (-0=>2.329) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.3, losses: 0.62, 0.844, 0.832 (-0=>2.297) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.23, losses: 0.601, 0.817, 0.808 (-0=>2.225) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.14, losses: 0.565, 0.787, 0.793 (-0=>2.144) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.11, losses: 0.567, 0.776, 0.768 (-1=>2.055) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.01, losses: 0.529, 0.746, 0.731 (-0=>2.007) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 1.96, losses: 0.52, 0.736, 0.708 (-1=>1.943) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 1.89, losses: 0.5, 0.71, 0.678 (-0=>1.889) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 1.85, losses: 0.478, 0.705, 0.665 (-1=>1.833) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 1.82, losses: 0.466, 0.697, 0.659 (-3=>1.812) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 1.81, losses: 0.464, 0.689, 0.656 (-0=>1.808) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 1.8, losses: 0.465, 0.681, 0.654 (-3=>1.785) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 1.8, losses: 0.468, 0.685, 0.646 (-13=>1.785) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 1.79, losses: 0.461, 0.68, 0.648 (-2=>1.763) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 1.8, losses: 0.467, 0.678, 0.654 (-12=>1.763) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 1.8, losses: 0.466, 0.683, 0.65 (-22=>1.763) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 1.79, losses: 0.467, 0.678, 0.651 (-32=>1.763) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 1.78, losses: 0.458, 0.675, 0.642 (-42=>1.763) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 1.77, losses: 0.463, 0.671, 0.64 (-52=>1.763) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 1.8, losses: 0.47, 0.679, 0.65 (-62=>1.763) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 1.82, losses: 0.476, 0.681, 0.659 (-72=>1.763) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 1.8, losses: 0.473, 0.678, 0.651 (-82=>1.763) 0it [00:01, ?it/s] Dropping learning rate 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 1.82, losses: 0.477, 0.683, 0.658 (-1=>1.789) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 1.8, losses: 0.468, 0.678, 0.655 (-11=>1.789) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 1.8, losses: 0.468, 0.675, 0.652 (-21=>1.789) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 1.82, losses: 0.476, 0.682, 0.66 (-31=>1.789) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 1.81, losses: 0.477, 0.679, 0.656 (-41=>1.789) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 1.81, losses: 0.473, 0.68, 0.659 (-51=>1.789) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 1.83, losses: 0.483, 0.683, 0.668 (-61=>1.789) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-71=>1.789) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9Input
- prompts
- Manhattan skyline at sunset. #artstation 🌇
- settings
- vdiff_model: cc12m_1_cfg scale: 2.35
{ "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "vdiff_model: cc12m_1_cfg\nscale: 2.35" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", { input: { prompts: "Manhattan skyline at sunset. #artstation 🌇", settings: "vdiff_model: cc12m_1_cfg\nscale: 2.35" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", input={ "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "vdiff_model: cc12m_1_cfg\nscale: 2.35" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", "input": { "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "vdiff_model: cc12m_1_cfg\\nscale: 2.35" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-16T22:53:55.192069Z", "created_at": "2022-01-16T22:46:29.771471Z", "data_removed": false, "error": null, "id": "ncfpq35bmzctjd7bdcrsr4poze", "input": { "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "vdiff_model: cc12m_1_cfg\nscale: 2.35" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n12402482836808719594\nAll CLIP models already loaded:\n['RN50', 'ViT-B/32', 'ViT-B/16']\ndrawer <vdiff.VdiffDrawer object at 0x7f61ec7cd160> needs ViT-B/16\nclip_embed for drawer <vdiff.VdiffDrawer object at 0x7f61ec7cd160> is torch.Size([1, 512])\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['Manhattan skyline at sunset. #artstation 🌇']\n\n0it [00:00, ?it/s]\niter: 0, loss: 3.01, losses: 0.997, 0.0862, 0.911, 0.0606, 0.892, 0.0631 (-0=>3.01)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.93, losses: 0.971, 0.0903, 0.882, 0.0628, 0.864, 0.0632 (-3=>2.921)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.86, losses: 0.948, 0.0933, 0.848, 0.0634, 0.844, 0.0637 (-1=>2.854)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.77, losses: 0.914, 0.0968, 0.821, 0.0649, 0.811, 0.0647 (-3=>2.753)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.69, losses: 0.889, 0.0939, 0.796, 0.0661, 0.778, 0.0646 (-0=>2.688)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.63, losses: 0.85, 0.0961, 0.786, 0.0684, 0.762, 0.0649 (-0=>2.628)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.62, losses: 0.848, 0.0992, 0.777, 0.0687, 0.759, 0.0649 (-6=>2.602)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.6, losses: 0.842, 0.0969, 0.774, 0.0686, 0.757, 0.0639 (-3=>2.597)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.57, losses: 0.835, 0.0963, 0.761, 0.0693, 0.739, 0.0654 (-0=>2.566)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.55, losses: 0.826, 0.0976, 0.751, 0.0682, 0.743, 0.0644 (-1=>2.526)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.53, losses: 0.82, 0.0981, 0.747, 0.0686, 0.735, 0.0646 (-1=>2.517)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.51, losses: 0.805, 0.0976, 0.741, 0.068, 0.73, 0.0649 (-9=>2.502)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.5, losses: 0.803, 0.0979, 0.737, 0.0672, 0.732, 0.0648 (-6=>2.482)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.48, losses: 0.789, 0.0984, 0.735, 0.0672, 0.727, 0.0649 (-0=>2.482)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.48, losses: 0.786, 0.0988, 0.737, 0.0679, 0.725, 0.0649 (-5=>2.477)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.47, losses: 0.786, 0.098, 0.73, 0.0668, 0.726, 0.0645 (-0=>2.471)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.48, losses: 0.784, 0.0973, 0.733, 0.0679, 0.731, 0.0646 (-10=>2.471)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.48, losses: 0.791, 0.0985, 0.73, 0.0677, 0.728, 0.0641 (-8=>2.468)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.48, losses: 0.794, 0.097, 0.734, 0.0667, 0.725, 0.0648 (-3=>2.467)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.48, losses: 0.787, 0.0976, 0.733, 0.0676, 0.729, 0.0639 (-7=>2.46)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.48, losses: 0.79, 0.0959, 0.734, 0.0686, 0.722, 0.0656 (-17=>2.46)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.48, losses: 0.789, 0.0975, 0.732, 0.0678, 0.726, 0.0647 (-27=>2.46)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.48, losses: 0.787, 0.0968, 0.738, 0.0684, 0.73, 0.065 (-37=>2.46)\n\n0it [00:01, ?it/s]\nDropping learning rate\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.47, losses: 0.783, 0.0974, 0.732, 0.0683, 0.726, 0.0651 (-4=>2.468)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.47, losses: 0.784, 0.0981, 0.733, 0.0686, 0.723, 0.0651 (-14=>2.468)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.47, losses: 0.782, 0.0984, 0.731, 0.0679, 0.724, 0.065 (-4=>2.465)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.49, losses: 0.791, 0.0978, 0.739, 0.0685, 0.727, 0.065 (-14=>2.465)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.49, losses: 0.793, 0.098, 0.734, 0.0689, 0.728, 0.0656 (-24=>2.465)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.48, losses: 0.79, 0.0979, 0.737, 0.0685, 0.726, 0.0649 (-34=>2.465)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.5, losses: 0.798, 0.0973, 0.736, 0.0689, 0.73, 0.0659 (-44=>2.465)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-54=>2.465)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 445.197711, "total_time": 445.420598 }, "output": [ { "file": "https://replicate.delivery/mgxm/81b52e77-bb90-41c4-935a-f5a9de3008e7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b0ba85d7-f70d-4ad3-9254-b21e2c7abd93/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c27d0a96-ebe8-478f-ac2b-a7b1a74355ad/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a86f18c5-e677-4789-9ac1-5e79edde22ad/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/60651eee-cc12-4f87-8c7c-363aabacb0b1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8fd128e8-c59c-411e-bf87-d375c1d9c2cf/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8b888317-6e25-4071-a1a6-63bb9b0422a5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/47a4efcc-b7a2-461d-a0d1-3a9647d8cd15/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/54cf88b7-ea81-4102-a836-9ca10a15766e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c2e7ecd7-ea23-4a83-ba04-ffdb2bafa731/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3c6a7d9c-d374-4f54-b59e-8d53e26f7ffe/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/015da5f2-d41c-41ae-96d8-62f328bc7575/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1521edf7-5818-4771-8697-e142ca942b8d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5c38825f-c7dc-4056-a810-a2f3d875e110/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/49833616-ca8a-4cf6-82c5-5ee4892926df/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9108afd2-df7f-44e1-820f-07e48ed36397/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d22bebb7-d9f7-443f-a06b-0ffec40f12eb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/27aece08-3b9a-4759-b185-e6855f23daec/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/129dd1c3-da79-4e6e-8507-b23789bbc183/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d87554bd-1bca-43cc-a1c5-5068d7a15fd8/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b3cf0459-b227-4685-bb9f-4b8246bd8ba1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/04f7be8f-f9fe-4fa4-b5b4-70427f689a46/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fb7f9611-0df0-479d-8e79-3abce65481b4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/854a9702-ae9a-410f-8680-a43df8880765/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3aac3d4b-677a-4f66-ae64-1c54dc44a674/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fb1b10cd-863d-4e9a-b40b-62a00018d611/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ed4bf6ea-389d-4e26-ac15-1434e885769c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b4c0f89d-f312-4eb8-a7ab-7256fd8dcb39/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/571ec78d-0e2f-4c93-bd14-cf3405d8c638/tempfile.png" } ], "started_at": "2022-01-16T22:46:29.994358Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ncfpq35bmzctjd7bdcrsr4poze", "cancel": "https://api.replicate.com/v1/predictions/ncfpq35bmzctjd7bdcrsr4poze/cancel" }, "version": "6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9" }
Generated in---> BasePixrayPredictor Predict Using seed: 12402482836808719594 All CLIP models already loaded: ['RN50', 'ViT-B/32', 'ViT-B/16'] drawer <vdiff.VdiffDrawer object at 0x7f61ec7cd160> needs ViT-B/16 clip_embed for drawer <vdiff.VdiffDrawer object at 0x7f61ec7cd160> is torch.Size([1, 512]) Using device: cuda:0 Optimising using: Adam Using text prompts: ['Manhattan skyline at sunset. #artstation 🌇'] 0it [00:00, ?it/s] iter: 0, loss: 3.01, losses: 0.997, 0.0862, 0.911, 0.0606, 0.892, 0.0631 (-0=>3.01) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.93, losses: 0.971, 0.0903, 0.882, 0.0628, 0.864, 0.0632 (-3=>2.921) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.86, losses: 0.948, 0.0933, 0.848, 0.0634, 0.844, 0.0637 (-1=>2.854) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.77, losses: 0.914, 0.0968, 0.821, 0.0649, 0.811, 0.0647 (-3=>2.753) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.69, losses: 0.889, 0.0939, 0.796, 0.0661, 0.778, 0.0646 (-0=>2.688) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.63, losses: 0.85, 0.0961, 0.786, 0.0684, 0.762, 0.0649 (-0=>2.628) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.62, losses: 0.848, 0.0992, 0.777, 0.0687, 0.759, 0.0649 (-6=>2.602) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.6, losses: 0.842, 0.0969, 0.774, 0.0686, 0.757, 0.0639 (-3=>2.597) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.57, losses: 0.835, 0.0963, 0.761, 0.0693, 0.739, 0.0654 (-0=>2.566) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.55, losses: 0.826, 0.0976, 0.751, 0.0682, 0.743, 0.0644 (-1=>2.526) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.53, losses: 0.82, 0.0981, 0.747, 0.0686, 0.735, 0.0646 (-1=>2.517) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.51, losses: 0.805, 0.0976, 0.741, 0.068, 0.73, 0.0649 (-9=>2.502) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.5, losses: 0.803, 0.0979, 0.737, 0.0672, 0.732, 0.0648 (-6=>2.482) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.48, losses: 0.789, 0.0984, 0.735, 0.0672, 0.727, 0.0649 (-0=>2.482) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.48, losses: 0.786, 0.0988, 0.737, 0.0679, 0.725, 0.0649 (-5=>2.477) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.47, losses: 0.786, 0.098, 0.73, 0.0668, 0.726, 0.0645 (-0=>2.471) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.48, losses: 0.784, 0.0973, 0.733, 0.0679, 0.731, 0.0646 (-10=>2.471) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.48, losses: 0.791, 0.0985, 0.73, 0.0677, 0.728, 0.0641 (-8=>2.468) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.48, losses: 0.794, 0.097, 0.734, 0.0667, 0.725, 0.0648 (-3=>2.467) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.48, losses: 0.787, 0.0976, 0.733, 0.0676, 0.729, 0.0639 (-7=>2.46) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.48, losses: 0.79, 0.0959, 0.734, 0.0686, 0.722, 0.0656 (-17=>2.46) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.48, losses: 0.789, 0.0975, 0.732, 0.0678, 0.726, 0.0647 (-27=>2.46) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.48, losses: 0.787, 0.0968, 0.738, 0.0684, 0.73, 0.065 (-37=>2.46) 0it [00:01, ?it/s] Dropping learning rate 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.47, losses: 0.783, 0.0974, 0.732, 0.0683, 0.726, 0.0651 (-4=>2.468) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.47, losses: 0.784, 0.0981, 0.733, 0.0686, 0.723, 0.0651 (-14=>2.468) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.47, losses: 0.782, 0.0984, 0.731, 0.0679, 0.724, 0.065 (-4=>2.465) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.49, losses: 0.791, 0.0978, 0.739, 0.0685, 0.727, 0.065 (-14=>2.465) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.49, losses: 0.793, 0.098, 0.734, 0.0689, 0.728, 0.0656 (-24=>2.465) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.48, losses: 0.79, 0.0979, 0.737, 0.0685, 0.726, 0.0649 (-34=>2.465) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.5, losses: 0.798, 0.0973, 0.736, 0.0689, 0.73, 0.0659 (-44=>2.465) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-54=>2.465) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9IDxajb7g26njfudco6pxtpilxngaStatusSucceededSourceWebHardware–Total durationCreatedInput
- prompts
- folk horror movie teaser poster
- settings
- aspect: portrait
{ "prompts": "folk horror movie teaser poster", "settings": "aspect: portrait\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", { input: { prompts: "folk horror movie teaser poster", settings: "aspect: portrait\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", input={ "prompts": "folk horror movie teaser poster", "settings": "aspect: portrait\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", "input": { "prompts": "folk horror movie teaser poster", "settings": "aspect: portrait\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-17T06:20:21.502188Z", "created_at": "2022-01-17T06:15:00.531949Z", "data_removed": false, "error": null, "id": "xajb7g26njfudco6pxtpilxnga", "input": { "prompts": "folk horror movie teaser poster", "settings": "aspect: portrait\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n12001014979277237198\nLoaded CLIP RN50: 102.01M params\nLoaded CLIP ViT-B/32: 151.28M params\nLoaded CLIP ViT-B/16: 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['folk horror movie teaser poster']\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 2.93, losses: 0.961, 0.0836, 0.881, 0.0621, 0.881, 0.0635 (-0=>2.933)\n\n0it [00:00, ?it/s]\n\n0it [00:08, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.79, losses: 0.922, 0.0902, 0.835, 0.0613, 0.817, 0.0613 (-0=>2.787)\n\n0it [00:00, ?it/s]\n\n0it [00:08, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.78, losses: 0.917, 0.0917, 0.825, 0.0629, 0.816, 0.0636 (-3=>2.768)\n\n0it [00:00, ?it/s]\n\n0it [00:08, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.73, losses: 0.901, 0.0927, 0.812, 0.0651, 0.796, 0.0657 (-2=>2.726)\n\n0it [00:00, ?it/s]\n\n0it [00:08, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.71, losses: 0.892, 0.0937, 0.804, 0.0638, 0.787, 0.0641 (-0=>2.705)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.69, losses: 0.89, 0.0908, 0.794, 0.0658, 0.783, 0.0657 (-2=>2.685)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.68, losses: 0.884, 0.0918, 0.794, 0.0655, 0.781, 0.067 (-6=>2.658)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.66, losses: 0.876, 0.0928, 0.78, 0.0667, 0.775, 0.0655 (-1=>2.648)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.62, losses: 0.864, 0.0945, 0.767, 0.0686, 0.757, 0.0693 (-0=>2.621)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.62, losses: 0.848, 0.1, 0.773, 0.0707, 0.757, 0.0705 (-0=>2.619)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.61, losses: 0.845, 0.0995, 0.773, 0.0697, 0.755, 0.07 (-8=>2.611)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.61, losses: 0.85, 0.098, 0.771, 0.0704, 0.753, 0.0702 (-18=>2.611)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.62, losses: 0.846, 0.104, 0.774, 0.0701, 0.754, 0.0711 (-6=>2.605)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.62, losses: 0.843, 0.103, 0.776, 0.0691, 0.757, 0.0698 (-16=>2.605)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.61, losses: 0.843, 0.103, 0.776, 0.0705, 0.752, 0.0707 (-26=>2.605)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.61, losses: 0.844, 0.102, 0.772, 0.0701, 0.751, 0.0693 (-36=>2.605)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.62, losses: 0.846, 0.1, 0.778, 0.0692, 0.753, 0.0696 (-6=>2.598)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.61, losses: 0.846, 0.102, 0.773, 0.0699, 0.751, 0.0696 (-16=>2.598)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.6, losses: 0.841, 0.0997, 0.771, 0.0697, 0.747, 0.0705 (-8=>2.597)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.61, losses: 0.846, 0.0991, 0.771, 0.0696, 0.752, 0.0696 (-18=>2.597)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.63, losses: 0.858, 0.0971, 0.776, 0.07, 0.756, 0.0699 (-28=>2.597)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.6, losses: 0.844, 0.0995, 0.766, 0.0711, 0.747, 0.0705 (-38=>2.597)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.62, losses: 0.85, 0.102, 0.771, 0.0703, 0.752, 0.0699 (-48=>2.597)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.61, losses: 0.847, 0.102, 0.774, 0.0697, 0.749, 0.0708 (-0=>2.613)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.61, losses: 0.85, 0.103, 0.769, 0.0712, 0.748, 0.0706 (-8=>2.611)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.62, losses: 0.848, 0.1, 0.776, 0.0704, 0.752, 0.0706 (-18=>2.611)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.61, losses: 0.848, 0.101, 0.77, 0.0697, 0.75, 0.0698 (-0=>2.609)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.62, losses: 0.847, 0.103, 0.773, 0.0703, 0.752, 0.0707 (-10=>2.609)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.62, losses: 0.851, 0.101, 0.777, 0.0699, 0.751, 0.0709 (-20=>2.609)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.63, losses: 0.854, 0.0991, 0.779, 0.0703, 0.756, 0.0702 (-30=>2.609)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-40=>2.609)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 288.690214, "total_time": 320.970239 }, "output": [ { "file": "https://replicate.delivery/mgxm/da600178-aadb-48a7-8f4b-62fd5cfa158e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9d9a976a-3cd1-441e-be16-3c349af44d78/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/aa99a915-c84d-4a2c-881a-77894ff91a3f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/dbb355c4-5a94-4c2b-b85e-562ba78eb880/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ee0ad1c6-1273-4e6e-949a-605835f862aa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/036a38b1-0c37-463a-8f9b-0a3facaf229f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ba03b1dd-c5c7-4724-b463-ec310e2ce0c6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/389f51a4-4b4d-4eab-a7a4-db468abd6d7c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/82194199-e9b9-4825-9d31-f2bac91f9e4a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f0686f28-7784-402d-a945-934eba6a7a1b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/99d9a969-748a-4cf9-864d-412dbc7965e4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/599329e1-7fe9-4881-8e8d-88e47398647c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d69c0558-6acc-4257-b98e-ef28bf977f5a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/41a20483-7314-468f-b52f-cbb322711a58/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/db836120-0df5-4644-a71e-8e0bef16fa9f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d3ce1ab7-c71e-4c8b-9ff5-2741d9a41f21/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b846476e-2eb8-43fa-a240-1e70d6bdc390/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/477a40a4-27ad-48cb-96b8-ccfeb3514374/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0be73bd6-e6ea-4ad7-a5e7-39adb38ab2b1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ad512406-650b-43d1-add1-9098bddd9eb2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8d67559c-dbfc-45b1-80ae-682a003ac6e9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6c4c8ae5-6394-4410-8b96-e740e07f5ede/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fd6a6931-fc06-47ef-8af1-cac290cbee60/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/56025c6c-42ba-42b7-8faa-2f77a278d5ba/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/875fa165-3aed-4113-84fd-72e47087ba28/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c04dd94e-0ade-45ba-8b0c-7460f5125e2c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f9168556-8169-4578-895d-3623fd60f261/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/296c4053-9d72-46d6-ba24-7a024f7cb823/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2aa277fd-fc35-4b1d-9729-1be77070cb8a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/db40f079-1736-45ff-a7f3-b45ed737a0fc/tempfile.png" } ], "started_at": "2022-01-17T06:15:32.811974Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/xajb7g26njfudco6pxtpilxnga", "cancel": "https://api.replicate.com/v1/predictions/xajb7g26njfudco6pxtpilxnga/cancel" }, "version": "6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9" }
Generated in---> BasePixrayPredictor Predict Using seed: 12001014979277237198 Loaded CLIP RN50: 102.01M params Loaded CLIP ViT-B/32: 151.28M params Loaded CLIP ViT-B/16: 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['folk horror movie teaser poster'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 2.93, losses: 0.961, 0.0836, 0.881, 0.0621, 0.881, 0.0635 (-0=>2.933) 0it [00:00, ?it/s] 0it [00:08, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.79, losses: 0.922, 0.0902, 0.835, 0.0613, 0.817, 0.0613 (-0=>2.787) 0it [00:00, ?it/s] 0it [00:08, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.78, losses: 0.917, 0.0917, 0.825, 0.0629, 0.816, 0.0636 (-3=>2.768) 0it [00:00, ?it/s] 0it [00:08, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.73, losses: 0.901, 0.0927, 0.812, 0.0651, 0.796, 0.0657 (-2=>2.726) 0it [00:00, ?it/s] 0it [00:08, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.71, losses: 0.892, 0.0937, 0.804, 0.0638, 0.787, 0.0641 (-0=>2.705) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.69, losses: 0.89, 0.0908, 0.794, 0.0658, 0.783, 0.0657 (-2=>2.685) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.68, losses: 0.884, 0.0918, 0.794, 0.0655, 0.781, 0.067 (-6=>2.658) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.66, losses: 0.876, 0.0928, 0.78, 0.0667, 0.775, 0.0655 (-1=>2.648) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.62, losses: 0.864, 0.0945, 0.767, 0.0686, 0.757, 0.0693 (-0=>2.621) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.62, losses: 0.848, 0.1, 0.773, 0.0707, 0.757, 0.0705 (-0=>2.619) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.61, losses: 0.845, 0.0995, 0.773, 0.0697, 0.755, 0.07 (-8=>2.611) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.61, losses: 0.85, 0.098, 0.771, 0.0704, 0.753, 0.0702 (-18=>2.611) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.62, losses: 0.846, 0.104, 0.774, 0.0701, 0.754, 0.0711 (-6=>2.605) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.62, losses: 0.843, 0.103, 0.776, 0.0691, 0.757, 0.0698 (-16=>2.605) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.61, losses: 0.843, 0.103, 0.776, 0.0705, 0.752, 0.0707 (-26=>2.605) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.61, losses: 0.844, 0.102, 0.772, 0.0701, 0.751, 0.0693 (-36=>2.605) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.62, losses: 0.846, 0.1, 0.778, 0.0692, 0.753, 0.0696 (-6=>2.598) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.61, losses: 0.846, 0.102, 0.773, 0.0699, 0.751, 0.0696 (-16=>2.598) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.6, losses: 0.841, 0.0997, 0.771, 0.0697, 0.747, 0.0705 (-8=>2.597) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.61, losses: 0.846, 0.0991, 0.771, 0.0696, 0.752, 0.0696 (-18=>2.597) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.63, losses: 0.858, 0.0971, 0.776, 0.07, 0.756, 0.0699 (-28=>2.597) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.6, losses: 0.844, 0.0995, 0.766, 0.0711, 0.747, 0.0705 (-38=>2.597) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.62, losses: 0.85, 0.102, 0.771, 0.0703, 0.752, 0.0699 (-48=>2.597) 0it [00:00, ?it/s] Dropping learning rate 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.61, losses: 0.847, 0.102, 0.774, 0.0697, 0.749, 0.0708 (-0=>2.613) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.61, losses: 0.85, 0.103, 0.769, 0.0712, 0.748, 0.0706 (-8=>2.611) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.62, losses: 0.848, 0.1, 0.776, 0.0704, 0.752, 0.0706 (-18=>2.611) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.61, losses: 0.848, 0.101, 0.77, 0.0697, 0.75, 0.0698 (-0=>2.609) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.62, losses: 0.847, 0.103, 0.773, 0.0703, 0.752, 0.0707 (-10=>2.609) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.62, losses: 0.851, 0.101, 0.777, 0.0699, 0.751, 0.0709 (-20=>2.609) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.63, losses: 0.854, 0.0991, 0.779, 0.0703, 0.756, 0.0702 (-30=>2.609) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-40=>2.609) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9Input
- prompts
- a charcoal sketch portrait of a cyberpunk empress, by Yasutomo Oka.
- settings
- drawer: vqgan vqgan_model: wikiart_16384 quality: best
{ "prompts": "a charcoal sketch portrait of a cyberpunk empress, by Yasutomo Oka.", "settings": "drawer: vqgan\nvqgan_model: wikiart_16384\nquality: best\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", { input: { prompts: "a charcoal sketch portrait of a cyberpunk empress, by Yasutomo Oka.", settings: "drawer: vqgan\nvqgan_model: wikiart_16384\nquality: best\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", input={ "prompts": "a charcoal sketch portrait of a cyberpunk empress, by Yasutomo Oka.", "settings": "drawer: vqgan\nvqgan_model: wikiart_16384\nquality: best\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", "input": { "prompts": "a charcoal sketch portrait of a cyberpunk empress, by Yasutomo Oka.", "settings": "drawer: vqgan\\nvqgan_model: wikiart_16384\\nquality: best\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-19T11:17:55.803923Z", "created_at": "2022-01-19T11:10:03.114287Z", "data_removed": false, "error": null, "id": "fuaaw2dz2zbwbk6v4uxddvja24", "input": { "prompts": "a charcoal sketch portrait of a cyberpunk empress, by Yasutomo Oka.", "settings": "drawer: vqgan\nvqgan_model: wikiart_16384\nquality: best\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n14000999644040843582\nWorking with z of shape (1, 256, 16, 16) = 65536 dimensions.\nloaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth\nVQLPIPSWithDiscriminator running with hinge loss.\nRestored from models/vqgan_wikiart_16384.ckpt\nLoaded CLIP RN50x4: 178.30M params\nLoaded CLIP ViT-B/32: 151.28M params\nLoaded CLIP ViT-B/16: 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['a charcoal sketch portrait of a cyberpunk empress, by Yasutomo Oka.']\n\n0it [00:00, ?it/s]\niter: 0, loss: 3.32, losses: 0.937, 0.0809, 1.09, 0.062, 1.08, 0.0642 (-0=>3.315)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.67, losses: 0.745, 0.0888, 0.869, 0.0642, 0.836, 0.0614 (-0=>2.665)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.4, losses: 0.649, 0.0904, 0.783, 0.0686, 0.746, 0.0658 (-0=>2.402)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.29, losses: 0.599, 0.0908, 0.74, 0.0707, 0.727, 0.0659 (-2=>2.281)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.2, losses: 0.559, 0.0907, 0.714, 0.0731, 0.693, 0.0684 (-2=>2.196)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.09, losses: 0.525, 0.0933, 0.676, 0.0745, 0.652, 0.0695 (-0=>2.09)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.1, losses: 0.53, 0.0909, 0.673, 0.0753, 0.66, 0.0706 (-10=>2.09)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.13, losses: 0.529, 0.0913, 0.699, 0.0724, 0.674, 0.0673 (-5=>2.069)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.06, losses: 0.509, 0.0916, 0.68, 0.074, 0.638, 0.0705 (-2=>2.029)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.04, losses: 0.494, 0.0927, 0.668, 0.0735, 0.644, 0.07 (-1=>1.996)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.03, losses: 0.497, 0.0921, 0.663, 0.0729, 0.634, 0.0702 (-11=>1.996)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 1.99, losses: 0.483, 0.0927, 0.649, 0.0744, 0.618, 0.0707 (-2=>1.976)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 1.98, losses: 0.478, 0.0934, 0.647, 0.0753, 0.608, 0.0726 (-4=>1.969)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2, losses: 0.496, 0.0928, 0.65, 0.0743, 0.611, 0.0716 (-4=>1.965)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.01, losses: 0.484, 0.0929, 0.658, 0.0726, 0.631, 0.0708 (-3=>1.96)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 1.97, losses: 0.482, 0.0945, 0.638, 0.0752, 0.602, 0.0732 (-6=>1.953)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 1.97, losses: 0.475, 0.0938, 0.642, 0.0758, 0.61, 0.0739 (-5=>1.938)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2, losses: 0.458, 0.0938, 0.677, 0.0723, 0.634, 0.0695 (-15=>1.938)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 1.94, losses: 0.473, 0.0927, 0.632, 0.0745, 0.6, 0.0726 (-25=>1.938)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 1.96, losses: 0.466, 0.0938, 0.643, 0.0762, 0.612, 0.074 (-35=>1.938)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 1.96, losses: 0.475, 0.093, 0.641, 0.0759, 0.604, 0.0729 (-45=>1.938)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 1.94, losses: 0.46, 0.0946, 0.631, 0.0743, 0.608, 0.072 (-8=>1.923)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 1.93, losses: 0.473, 0.0927, 0.622, 0.075, 0.591, 0.073 (-18=>1.923)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 1.98, losses: 0.481, 0.0934, 0.648, 0.0759, 0.606, 0.0739 (-28=>1.923)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 1.94, losses: 0.471, 0.0937, 0.633, 0.0738, 0.598, 0.0713 (-38=>1.923)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 1.94, losses: 0.47, 0.0938, 0.63, 0.0769, 0.597, 0.0733 (-48=>1.923)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 1.97, losses: 0.49, 0.0934, 0.638, 0.0745, 0.597, 0.074 (-58=>1.923)\n\n0it [00:01, ?it/s]\nDropping learning rate\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 1.96, losses: 0.481, 0.0939, 0.64, 0.0757, 0.597, 0.0743 (-1=>1.926)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 1.97, losses: 0.473, 0.0921, 0.645, 0.0752, 0.609, 0.0734 (-1=>1.894)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 1.94, losses: 0.476, 0.0916, 0.633, 0.0747, 0.589, 0.0731 (-11=>1.894)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, loss: 1.93, losses: 0.468, 0.0947, 0.626, 0.0754, 0.596, 0.0745 (-2=>1.886)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 310, loss: 1.91, losses: 0.472, 0.0921, 0.617, 0.0768, 0.577, 0.0742 (-12=>1.886)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 320, loss: 1.91, losses: 0.455, 0.0931, 0.629, 0.0743, 0.59, 0.0722 (-22=>1.886)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 330, loss: 1.92, losses: 0.466, 0.0936, 0.624, 0.0756, 0.584, 0.0739 (-32=>1.886)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 340, loss: 1.91, losses: 0.464, 0.0918, 0.623, 0.0741, 0.582, 0.0739 (-2=>1.876)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 350, finished (-12=>1.876)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 472.448438, "total_time": 472.689636 }, "output": [ { "file": "https://replicate.delivery/mgxm/15a45a71-1c73-490b-854e-6e5ec87638c3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/69ca3ef2-0792-4015-b669-420c11f3b162/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/49244699-674a-4384-a008-32e3b5ddda46/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/395cdfb6-ac53-4cfb-9c24-bc338deb44e2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/174218b8-cdd7-43f8-acc7-ec1333addc31/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ab8a6099-2f60-4aae-afe0-6181a088f933/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/32861724-a79e-4e33-8049-82afcc66dd39/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ffd2d7b0-26c1-4717-a88f-b74624e494e4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f7c66374-2ad2-4e8e-b509-1c1af3911012/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/bbf5094a-0b27-4bd0-b807-5196ff69da88/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/529f60cd-d5f9-4608-a60b-2425df8e50fa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/548a51e1-3b58-446c-a694-5426837ffa3a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/302cdab4-f797-408e-b2d6-8c96432018fa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b42ec32e-ca50-4c20-bd3b-bcbe75282dbb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a7fc9579-055f-455b-ad0e-b79a6ed375b0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ffb33b06-4a8b-4ca8-b704-f28d8623cba1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2113c17c-b678-40bc-bad8-c6b2c041ab92/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6dc1987e-8c72-494f-a51b-60eeeaf12b6a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ce160a9f-2d67-4496-9079-a21e3683647c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4860f1ee-ffad-48c0-bf7b-e768abb32a4b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2bdd1e67-53ce-4c40-acd9-ffd5e1511445/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/871efff7-8913-477e-bf8a-1baeb0d14b7d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ee39980a-77ce-4697-b503-9c5bad174c0f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d0c0b9db-d62e-44b6-abf0-beb9a8c5640f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5b2d676c-862c-41be-8224-67ebf89581f2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/865ca839-7176-4754-a761-a7cba6ad3133/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a520b41d-11a6-4452-baec-8ae87bbfb0b8/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d1443761-5aa5-4182-b41c-a3245bf77975/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e8ed08cc-37e5-4594-b2d0-ef3c6198ebcd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6d6923c7-eedd-45cc-8b5d-b13476ebf67e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7e7df048-b9ce-4164-a789-08c3478c4640/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f4f504f8-1640-4a8c-94bf-1d5747f78260/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2ad937fd-f855-4ea1-9ddf-74016d90f61e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/39bb5b5c-0c0c-44d5-812a-9872c71ddc66/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/039a1385-1acc-430d-9c4e-20015241bfe0/tempfile.png" } ], "started_at": "2022-01-19T11:10:03.355485Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/fuaaw2dz2zbwbk6v4uxddvja24", "cancel": "https://api.replicate.com/v1/predictions/fuaaw2dz2zbwbk6v4uxddvja24/cancel" }, "version": "6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9" }
Generated in---> BasePixrayPredictor Predict Using seed: 14000999644040843582 Working with z of shape (1, 256, 16, 16) = 65536 dimensions. loaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth VQLPIPSWithDiscriminator running with hinge loss. Restored from models/vqgan_wikiart_16384.ckpt Loaded CLIP RN50x4: 178.30M params Loaded CLIP ViT-B/32: 151.28M params Loaded CLIP ViT-B/16: 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['a charcoal sketch portrait of a cyberpunk empress, by Yasutomo Oka.'] 0it [00:00, ?it/s] iter: 0, loss: 3.32, losses: 0.937, 0.0809, 1.09, 0.062, 1.08, 0.0642 (-0=>3.315) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.67, losses: 0.745, 0.0888, 0.869, 0.0642, 0.836, 0.0614 (-0=>2.665) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.4, losses: 0.649, 0.0904, 0.783, 0.0686, 0.746, 0.0658 (-0=>2.402) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.29, losses: 0.599, 0.0908, 0.74, 0.0707, 0.727, 0.0659 (-2=>2.281) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.2, losses: 0.559, 0.0907, 0.714, 0.0731, 0.693, 0.0684 (-2=>2.196) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.09, losses: 0.525, 0.0933, 0.676, 0.0745, 0.652, 0.0695 (-0=>2.09) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.1, losses: 0.53, 0.0909, 0.673, 0.0753, 0.66, 0.0706 (-10=>2.09) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.13, losses: 0.529, 0.0913, 0.699, 0.0724, 0.674, 0.0673 (-5=>2.069) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.06, losses: 0.509, 0.0916, 0.68, 0.074, 0.638, 0.0705 (-2=>2.029) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.04, losses: 0.494, 0.0927, 0.668, 0.0735, 0.644, 0.07 (-1=>1.996) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.03, losses: 0.497, 0.0921, 0.663, 0.0729, 0.634, 0.0702 (-11=>1.996) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 1.99, losses: 0.483, 0.0927, 0.649, 0.0744, 0.618, 0.0707 (-2=>1.976) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 1.98, losses: 0.478, 0.0934, 0.647, 0.0753, 0.608, 0.0726 (-4=>1.969) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2, losses: 0.496, 0.0928, 0.65, 0.0743, 0.611, 0.0716 (-4=>1.965) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.01, losses: 0.484, 0.0929, 0.658, 0.0726, 0.631, 0.0708 (-3=>1.96) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 1.97, losses: 0.482, 0.0945, 0.638, 0.0752, 0.602, 0.0732 (-6=>1.953) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 1.97, losses: 0.475, 0.0938, 0.642, 0.0758, 0.61, 0.0739 (-5=>1.938) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2, losses: 0.458, 0.0938, 0.677, 0.0723, 0.634, 0.0695 (-15=>1.938) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 1.94, losses: 0.473, 0.0927, 0.632, 0.0745, 0.6, 0.0726 (-25=>1.938) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 1.96, losses: 0.466, 0.0938, 0.643, 0.0762, 0.612, 0.074 (-35=>1.938) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 1.96, losses: 0.475, 0.093, 0.641, 0.0759, 0.604, 0.0729 (-45=>1.938) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 1.94, losses: 0.46, 0.0946, 0.631, 0.0743, 0.608, 0.072 (-8=>1.923) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 1.93, losses: 0.473, 0.0927, 0.622, 0.075, 0.591, 0.073 (-18=>1.923) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 1.98, losses: 0.481, 0.0934, 0.648, 0.0759, 0.606, 0.0739 (-28=>1.923) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 1.94, losses: 0.471, 0.0937, 0.633, 0.0738, 0.598, 0.0713 (-38=>1.923) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 1.94, losses: 0.47, 0.0938, 0.63, 0.0769, 0.597, 0.0733 (-48=>1.923) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 1.97, losses: 0.49, 0.0934, 0.638, 0.0745, 0.597, 0.074 (-58=>1.923) 0it [00:01, ?it/s] Dropping learning rate 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 1.96, losses: 0.481, 0.0939, 0.64, 0.0757, 0.597, 0.0743 (-1=>1.926) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 1.97, losses: 0.473, 0.0921, 0.645, 0.0752, 0.609, 0.0734 (-1=>1.894) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 1.94, losses: 0.476, 0.0916, 0.633, 0.0747, 0.589, 0.0731 (-11=>1.894) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 300, loss: 1.93, losses: 0.468, 0.0947, 0.626, 0.0754, 0.596, 0.0745 (-2=>1.886) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 310, loss: 1.91, losses: 0.472, 0.0921, 0.617, 0.0768, 0.577, 0.0742 (-12=>1.886) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 320, loss: 1.91, losses: 0.455, 0.0931, 0.629, 0.0743, 0.59, 0.0722 (-22=>1.886) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 330, loss: 1.92, losses: 0.466, 0.0936, 0.624, 0.0756, 0.584, 0.0739 (-32=>1.886) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 340, loss: 1.91, losses: 0.464, 0.0918, 0.623, 0.0741, 0.582, 0.0739 (-2=>1.876) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 350, finished (-12=>1.876) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092Input
- prompts
- Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)
- settings
{ "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", { input: { prompts: "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", settings: "\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", input={ "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", "input": { "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-23T04:11:49.144273Z", "created_at": "2022-01-23T03:58:45.487200Z", "data_removed": false, "error": null, "id": "s4pasue4lvbldopl4eolqyoiee", "input": { "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n6555919756984463465\nLoaded CLIP RN50: 102.01M params\nLoaded CLIP ViT-B/32: 151.28M params\nLoaded CLIP ViT-B/16: 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)']\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 2.98, losses: 0.969, 0.0885, 0.909, 0.0641, 0.887, 0.0655 (-0=>2.984)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.91, losses: 0.949, 0.0894, 0.883, 0.0632, 0.864, 0.0634 (-0=>2.912)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.91, losses: 0.944, 0.0899, 0.882, 0.0637, 0.865, 0.0627 (-1=>2.901)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.89, losses: 0.94, 0.0885, 0.878, 0.0634, 0.861, 0.0632 (-0=>2.894)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.89, losses: 0.938, 0.09, 0.878, 0.064, 0.856, 0.0629 (-1=>2.884)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.87, losses: 0.928, 0.0929, 0.872, 0.0645, 0.85, 0.0624 (-0=>2.87)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.85, losses: 0.926, 0.0901, 0.863, 0.064, 0.841, 0.0624 (-0=>2.847)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.82, losses: 0.921, 0.0893, 0.854, 0.0648, 0.831, 0.0618 (-0=>2.821)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.76, losses: 0.903, 0.089, 0.836, 0.0658, 0.808, 0.0623 (-0=>2.765)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.75, losses: 0.899, 0.0893, 0.829, 0.0663, 0.803, 0.0649 (-2=>2.741)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.72, losses: 0.891, 0.0893, 0.816, 0.0684, 0.788, 0.0658 (-0=>2.719)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.72, losses: 0.891, 0.0902, 0.812, 0.0685, 0.788, 0.0661 (-4=>2.71)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.71, losses: 0.89, 0.0892, 0.814, 0.0677, 0.785, 0.0659 (-6=>2.7)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.72, losses: 0.891, 0.0899, 0.819, 0.0678, 0.789, 0.0658 (-7=>2.698)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.71, losses: 0.885, 0.0912, 0.812, 0.0688, 0.784, 0.0656 (-17=>2.698)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.71, losses: 0.887, 0.0903, 0.813, 0.0681, 0.785, 0.0658 (-1=>2.692)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.71, losses: 0.89, 0.0894, 0.815, 0.0669, 0.787, 0.0656 (-11=>2.692)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.7, losses: 0.884, 0.0897, 0.81, 0.0683, 0.784, 0.0661 (-4=>2.689)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.71, losses: 0.886, 0.09, 0.815, 0.0682, 0.782, 0.0658 (-14=>2.689)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.7, losses: 0.885, 0.0898, 0.814, 0.0677, 0.782, 0.0662 (-24=>2.689)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.71, losses: 0.887, 0.0897, 0.815, 0.068, 0.785, 0.0661 (-34=>2.689)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.71, losses: 0.884, 0.0899, 0.814, 0.0687, 0.784, 0.0664 (-44=>2.689)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.71, losses: 0.886, 0.0895, 0.815, 0.0678, 0.781, 0.0662 (-54=>2.689)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.7, losses: 0.885, 0.0884, 0.816, 0.0674, 0.782, 0.0659 (-2=>2.7)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.71, losses: 0.886, 0.0911, 0.817, 0.069, 0.785, 0.0664 (-3=>2.696)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.71, losses: 0.884, 0.0911, 0.818, 0.0684, 0.787, 0.0662 (-13=>2.696)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.73, losses: 0.888, 0.0895, 0.824, 0.0676, 0.791, 0.0656 (-23=>2.696)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.7, losses: 0.883, 0.0916, 0.812, 0.0688, 0.781, 0.0666 (-33=>2.696)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.73, losses: 0.892, 0.0889, 0.82, 0.0673, 0.792, 0.0653 (-43=>2.696)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.72, losses: 0.891, 0.0888, 0.819, 0.0675, 0.79, 0.0655 (-53=>2.696)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-63=>2.696)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 326.76229, "total_time": 783.657073 }, "output": [ { "file": "https://replicate.delivery/mgxm/6befcecd-1767-4580-9f4a-7f75634baccb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8c9444d6-2c46-4df0-a778-47b2a0c7a450/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ca2b1cdc-070a-457a-bcbc-b2ac4e5ed037/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9faa48d1-3e6a-4a6f-ab1b-62d89eaaacb9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7d2a1f60-3b83-45d6-92d7-8de844871151/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3a13c12b-d36b-4155-8b8b-fb656ca5d2d9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/212e805e-df53-4792-aad1-661210593c73/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d10210d1-cf8e-4645-b088-31c811228910/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a302cb5a-c1af-4b85-aba8-8582cc97ac46/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/962a182a-6347-4af2-a7bc-4abc4f6ca217/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/eee8ab02-1e4c-4a5d-8293-7f859bf93500/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e08d7dd7-1d38-48fa-9f8b-6d9fa1db9ade/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3578fd13-53d0-430c-8eb9-972314bc9b91/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d47bf5bb-f8d2-4c63-a5b7-65f967824e92/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ae89f627-3dd8-4c8d-b25d-a73a7f5c5d6d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f92d704d-7949-4537-b1c1-828435a67738/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0d7989e2-eda9-40d6-b312-0370c1b0a54e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e7ad16fd-9410-4f11-8196-53d5c93a2f8e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8efdf5d2-abbf-43c3-8acf-586d37518dec/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e3a57beb-aafd-4503-9182-d36c19244cfe/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/37f2c254-8726-4493-a52e-d787c165099a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7ff85bca-8791-4332-bfc2-22f2c930d319/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/70ddfe5b-f0ff-45d9-ae7f-752ca62387e7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d28bc34b-ae3a-482e-896d-1b6fea039162/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a966a3a9-5ae7-4978-bd84-9164b37b2e10/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5169317f-b645-484d-8004-7c13aec9a68b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/18ccb055-45ee-41c2-a7a4-6054d7dab463/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/229e8064-ca3f-4a53-bb6c-c6bcb9583806/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6f7fe288-d550-4016-a9ae-c06ee1051d49/tempfile.png" } ], "started_at": "2022-01-23T04:06:22.381983Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/s4pasue4lvbldopl4eolqyoiee", "cancel": "https://api.replicate.com/v1/predictions/s4pasue4lvbldopl4eolqyoiee/cancel" }, "version": "3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092" }
Generated in---> BasePixrayPredictor Predict Using seed: 6555919756984463465 Loaded CLIP RN50: 102.01M params Loaded CLIP ViT-B/32: 151.28M params Loaded CLIP ViT-B/16: 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 2.98, losses: 0.969, 0.0885, 0.909, 0.0641, 0.887, 0.0655 (-0=>2.984) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.91, losses: 0.949, 0.0894, 0.883, 0.0632, 0.864, 0.0634 (-0=>2.912) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.91, losses: 0.944, 0.0899, 0.882, 0.0637, 0.865, 0.0627 (-1=>2.901) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.89, losses: 0.94, 0.0885, 0.878, 0.0634, 0.861, 0.0632 (-0=>2.894) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.89, losses: 0.938, 0.09, 0.878, 0.064, 0.856, 0.0629 (-1=>2.884) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.87, losses: 0.928, 0.0929, 0.872, 0.0645, 0.85, 0.0624 (-0=>2.87) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.85, losses: 0.926, 0.0901, 0.863, 0.064, 0.841, 0.0624 (-0=>2.847) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.82, losses: 0.921, 0.0893, 0.854, 0.0648, 0.831, 0.0618 (-0=>2.821) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.76, losses: 0.903, 0.089, 0.836, 0.0658, 0.808, 0.0623 (-0=>2.765) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.75, losses: 0.899, 0.0893, 0.829, 0.0663, 0.803, 0.0649 (-2=>2.741) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.72, losses: 0.891, 0.0893, 0.816, 0.0684, 0.788, 0.0658 (-0=>2.719) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.72, losses: 0.891, 0.0902, 0.812, 0.0685, 0.788, 0.0661 (-4=>2.71) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.71, losses: 0.89, 0.0892, 0.814, 0.0677, 0.785, 0.0659 (-6=>2.7) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.72, losses: 0.891, 0.0899, 0.819, 0.0678, 0.789, 0.0658 (-7=>2.698) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.71, losses: 0.885, 0.0912, 0.812, 0.0688, 0.784, 0.0656 (-17=>2.698) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.71, losses: 0.887, 0.0903, 0.813, 0.0681, 0.785, 0.0658 (-1=>2.692) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.71, losses: 0.89, 0.0894, 0.815, 0.0669, 0.787, 0.0656 (-11=>2.692) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.7, losses: 0.884, 0.0897, 0.81, 0.0683, 0.784, 0.0661 (-4=>2.689) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.71, losses: 0.886, 0.09, 0.815, 0.0682, 0.782, 0.0658 (-14=>2.689) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.7, losses: 0.885, 0.0898, 0.814, 0.0677, 0.782, 0.0662 (-24=>2.689) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.71, losses: 0.887, 0.0897, 0.815, 0.068, 0.785, 0.0661 (-34=>2.689) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.71, losses: 0.884, 0.0899, 0.814, 0.0687, 0.784, 0.0664 (-44=>2.689) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.71, losses: 0.886, 0.0895, 0.815, 0.0678, 0.781, 0.0662 (-54=>2.689) 0it [00:00, ?it/s] Dropping learning rate 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.7, losses: 0.885, 0.0884, 0.816, 0.0674, 0.782, 0.0659 (-2=>2.7) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.71, losses: 0.886, 0.0911, 0.817, 0.069, 0.785, 0.0664 (-3=>2.696) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.71, losses: 0.884, 0.0911, 0.818, 0.0684, 0.787, 0.0662 (-13=>2.696) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.73, losses: 0.888, 0.0895, 0.824, 0.0676, 0.791, 0.0656 (-23=>2.696) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.7, losses: 0.883, 0.0916, 0.812, 0.0688, 0.781, 0.0666 (-33=>2.696) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.73, losses: 0.892, 0.0889, 0.82, 0.0673, 0.792, 0.0653 (-43=>2.696) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.72, losses: 0.891, 0.0888, 0.819, 0.0675, 0.79, 0.0655 (-53=>2.696) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-63=>2.696) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26Input
- prompts
- nine inch nails downward spiral by M.C. Escher
- settings
- custom_loss: edge edge_color: white edge_thickness: 1
{ "prompts": "nine inch nails downward spiral by M.C. Escher", "settings": "custom_loss: edge\nedge_color: white\nedge_thickness: 1\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26", { input: { prompts: "nine inch nails downward spiral by M.C. Escher", settings: "custom_loss: edge\nedge_color: white\nedge_thickness: 1\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26", input={ "prompts": "nine inch nails downward spiral by M.C. Escher", "settings": "custom_loss: edge\nedge_color: white\nedge_thickness: 1\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26", "input": { "prompts": "nine inch nails downward spiral by M.C. Escher", "settings": "custom_loss: edge\\nedge_color: white\\nedge_thickness: 1\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-07T14:32:25.691968Z", "created_at": "2022-01-07T14:26:17.957576Z", "data_removed": false, "error": null, "id": "tkm2ap3sjjfy3d3dziwwrzhpoi", "input": { "prompts": "nine inch nails downward spiral by M.C. Escher", "settings": "custom_loss: edge\nedge_color: white\nedge_thickness: 1\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n3050717298625909284\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['nine inch nails downward spiral by M.C. Escher']\nusing custom losses: edge\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 3.23, losses: 1.04, 0.0815, 0.923, 0.0483, 0.95, 0.0488, 0.142 (-0=>3.231)\n\n0it [00:01, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 3.07, losses: 1.03, 0.0754, 0.936, 0.045, 0.931, 0.0464, 0.00729 (-6=>3.073)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 3.09, losses: 1.04, 0.0763, 0.931, 0.0452, 0.934, 0.0464, 0.0163 (-3=>3.046)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 3.06, losses: 1.03, 0.0763, 0.928, 0.0465, 0.917, 0.0466, 0.0155 (-1=>3.039)\n\n0it [00:00, ?it/s]\n\n0it [00:09, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 3, losses: 1.02, 0.0762, 0.91, 0.0472, 0.89, 0.0474, 0.0126 (-0=> 3)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.91, losses: 0.995, 0.0746, 0.869, 0.0469, 0.87, 0.0479, 0.00623 (-0=>2.91)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.78, losses: 0.952, 0.0791, 0.833, 0.0504, 0.813, 0.0489, 0.00453 (-0=>2.78)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.74, losses: 0.938, 0.081, 0.81, 0.0515, 0.808, 0.0501, 0.00502 (-1=>2.619)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.61, losses: 0.888, 0.0809, 0.771, 0.0508, 0.766, 0.0495, 0.0054 (-3=>2.581)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.49, losses: 0.838, 0.0766, 0.744, 0.0507, 0.728, 0.0501, 0.00462 (-0=>2.492)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.55, losses: 0.862, 0.0779, 0.759, 0.0498, 0.745, 0.049, 0.00408 (-1=>2.476)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.5, losses: 0.849, 0.0801, 0.745, 0.0506, 0.726, 0.0501, 0.00432 (-4=>2.432)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.54, losses: 0.863, 0.0805, 0.753, 0.0509, 0.741, 0.051, 0.00397 (-14=>2.432)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.51, losses: 0.85, 0.0785, 0.749, 0.0509, 0.73, 0.0507, 0.00384 (-24=>2.432)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.51, losses: 0.848, 0.0789, 0.743, 0.0518, 0.731, 0.0506, 0.00378 (-4=>2.414)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.43, losses: 0.816, 0.0785, 0.723, 0.0525, 0.703, 0.0511, 0.00392 (-14=>2.414)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.52, losses: 0.853, 0.0773, 0.747, 0.051, 0.732, 0.051, 0.00405 (-24=>2.414)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.51, losses: 0.851, 0.0786, 0.745, 0.0518, 0.726, 0.0507, 0.00409 (-3=>2.401)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.51, losses: 0.854, 0.0797, 0.742, 0.0514, 0.725, 0.0514, 0.004 (-13=>2.401)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.43, losses: 0.821, 0.0792, 0.723, 0.0527, 0.696, 0.0511, 0.00404 (-23=>2.401)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.44, losses: 0.817, 0.0792, 0.728, 0.0523, 0.708, 0.0513, 0.00406 (-33=>2.401)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.51, losses: 0.855, 0.0803, 0.743, 0.0523, 0.727, 0.0526, 0.00405 (-43=>2.401)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.43, losses: 0.819, 0.0786, 0.72, 0.0536, 0.7, 0.0525, 0.00409 (-53=>2.401)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.53, losses: 0.854, 0.0789, 0.754, 0.0512, 0.739, 0.0516, 0.00412 (-2=>2.446)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.51, losses: 0.849, 0.0779, 0.75, 0.0513, 0.731, 0.0513, 0.00409 (-6=>2.433)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.58, losses: 0.871, 0.078, 0.766, 0.0492, 0.757, 0.0506, 0.00409 (-16=>2.433)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.54, losses: 0.86, 0.0781, 0.757, 0.0512, 0.734, 0.0513, 0.00406 (-26=>2.433)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.45, losses: 0.827, 0.0785, 0.73, 0.0528, 0.705, 0.0522, 0.00409 (-36=>2.433)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.46, losses: 0.83, 0.0783, 0.732, 0.0519, 0.71, 0.0523, 0.00414 (-46=>2.433)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.55, losses: 0.865, 0.0775, 0.76, 0.0511, 0.737, 0.0519, 0.00417 (-56=>2.433)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-66=>2.433)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 336.476741, "total_time": 367.734392 }, "output": [ { "file": "https://replicate.delivery/mgxm/21036f58-d246-4580-9f02-d9cf75ca3b89/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0ae5a249-fcd1-49f9-bb1a-56a3de0f5cf8/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7169df91-732e-4828-8737-aeef4b1e9e11/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4ed606ff-3c6f-4163-b208-5743cc1453e2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9299dd35-b5a6-49bf-8418-ec24a16edcbd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ea6b80d0-fcf4-4856-b75d-65db2d1dba84/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/33c92322-b192-4793-b345-7c46951bc370/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/78f20319-0d6d-4c35-a5df-a5054b797cfb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d51248a6-8ad8-47c2-aeb4-d582e9e736fa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/eece6121-e189-4002-ac99-1f552085730a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/af933feb-b650-4ab2-8263-0293864038e6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ed811dfb-f80a-4696-85c0-bd6760dca248/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f36ca532-65e8-41c4-8057-2ca3955694fb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0d3cccfd-e312-4d97-ab72-2c8c50f6d9bb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f363128d-3b28-4b82-bfd4-cfa0bef77eea/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7b612055-5a27-466d-824f-61805e7d56d0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/352f7b31-df3c-4045-bf29-4466ede87e8b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b910aadf-c651-43a4-b18d-6d5adb4770c2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9e86174b-3f1b-4e91-8409-816f1e9f14c6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1d3fd393-83ba-47a8-ba7e-6d1ecc80de1f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c1873480-497c-48f9-8eee-e3c2ef9fbbac/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/de384a24-5863-476e-a846-42e4543c370e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f9e52c2a-9d0c-4458-83bc-faf90c3c7e41/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a490324d-633e-4100-ad6c-f2e912182643/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ea7cfe3f-7052-44f0-8603-844609ba6f3d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/43dbc8e0-b4e5-45a8-ac92-3093f65c90b1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/452517fa-c95a-4bc7-85d5-6f5205dc0d9b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/36d1f370-bf0a-4e71-81a8-3bdc16675748/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/607af5d1-e7c1-41a8-b5f1-52cbaf1ec6d1/tempfile.png" } ], "started_at": "2022-01-07T14:26:49.215227Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/tkm2ap3sjjfy3d3dziwwrzhpoi", "cancel": "https://api.replicate.com/v1/predictions/tkm2ap3sjjfy3d3dziwwrzhpoi/cancel" }, "version": "1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26" }
Generated in---> BasePixrayPredictor Predict Using seed: 3050717298625909284 Using device: cuda:0 Optimising using: Adam Using text prompts: ['nine inch nails downward spiral by M.C. Escher'] using custom losses: edge 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 3.23, losses: 1.04, 0.0815, 0.923, 0.0483, 0.95, 0.0488, 0.142 (-0=>3.231) 0it [00:01, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 3.07, losses: 1.03, 0.0754, 0.936, 0.045, 0.931, 0.0464, 0.00729 (-6=>3.073) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 3.09, losses: 1.04, 0.0763, 0.931, 0.0452, 0.934, 0.0464, 0.0163 (-3=>3.046) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 3.06, losses: 1.03, 0.0763, 0.928, 0.0465, 0.917, 0.0466, 0.0155 (-1=>3.039) 0it [00:00, ?it/s] 0it [00:09, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 3, losses: 1.02, 0.0762, 0.91, 0.0472, 0.89, 0.0474, 0.0126 (-0=> 3) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.91, losses: 0.995, 0.0746, 0.869, 0.0469, 0.87, 0.0479, 0.00623 (-0=>2.91) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.78, losses: 0.952, 0.0791, 0.833, 0.0504, 0.813, 0.0489, 0.00453 (-0=>2.78) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.74, losses: 0.938, 0.081, 0.81, 0.0515, 0.808, 0.0501, 0.00502 (-1=>2.619) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.61, losses: 0.888, 0.0809, 0.771, 0.0508, 0.766, 0.0495, 0.0054 (-3=>2.581) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.49, losses: 0.838, 0.0766, 0.744, 0.0507, 0.728, 0.0501, 0.00462 (-0=>2.492) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.55, losses: 0.862, 0.0779, 0.759, 0.0498, 0.745, 0.049, 0.00408 (-1=>2.476) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.5, losses: 0.849, 0.0801, 0.745, 0.0506, 0.726, 0.0501, 0.00432 (-4=>2.432) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.54, losses: 0.863, 0.0805, 0.753, 0.0509, 0.741, 0.051, 0.00397 (-14=>2.432) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.51, losses: 0.85, 0.0785, 0.749, 0.0509, 0.73, 0.0507, 0.00384 (-24=>2.432) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.51, losses: 0.848, 0.0789, 0.743, 0.0518, 0.731, 0.0506, 0.00378 (-4=>2.414) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.43, losses: 0.816, 0.0785, 0.723, 0.0525, 0.703, 0.0511, 0.00392 (-14=>2.414) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.52, losses: 0.853, 0.0773, 0.747, 0.051, 0.732, 0.051, 0.00405 (-24=>2.414) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.51, losses: 0.851, 0.0786, 0.745, 0.0518, 0.726, 0.0507, 0.00409 (-3=>2.401) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.51, losses: 0.854, 0.0797, 0.742, 0.0514, 0.725, 0.0514, 0.004 (-13=>2.401) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.43, losses: 0.821, 0.0792, 0.723, 0.0527, 0.696, 0.0511, 0.00404 (-23=>2.401) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.44, losses: 0.817, 0.0792, 0.728, 0.0523, 0.708, 0.0513, 0.00406 (-33=>2.401) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.51, losses: 0.855, 0.0803, 0.743, 0.0523, 0.727, 0.0526, 0.00405 (-43=>2.401) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.43, losses: 0.819, 0.0786, 0.72, 0.0536, 0.7, 0.0525, 0.00409 (-53=>2.401) 0it [00:00, ?it/s] Dropping learning rate 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.53, losses: 0.854, 0.0789, 0.754, 0.0512, 0.739, 0.0516, 0.00412 (-2=>2.446) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.51, losses: 0.849, 0.0779, 0.75, 0.0513, 0.731, 0.0513, 0.00409 (-6=>2.433) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.58, losses: 0.871, 0.078, 0.766, 0.0492, 0.757, 0.0506, 0.00409 (-16=>2.433) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.54, losses: 0.86, 0.0781, 0.757, 0.0512, 0.734, 0.0513, 0.00406 (-26=>2.433) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.45, losses: 0.827, 0.0785, 0.73, 0.0528, 0.705, 0.0522, 0.00409 (-36=>2.433) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.46, losses: 0.83, 0.0783, 0.732, 0.0519, 0.71, 0.0523, 0.00414 (-46=>2.433) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.55, losses: 0.865, 0.0775, 0.76, 0.0511, 0.737, 0.0519, 0.00417 (-56=>2.433) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-66=>2.433) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26IDqa7hfnfskvbuvgmlcrcenz7mfmStatusSucceededSourceWebHardware–Total durationCreatedInput
- prompts
- Buffalo Bills stampede the Patriots in freezing weather
- settings
- aspect: square #custom_loss: symmetry scale: 4
{ "prompts": "Buffalo Bills stampede the Patriots in freezing weather", "settings": "aspect: square\n#custom_loss: symmetry\nscale: 4" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26", { input: { prompts: "Buffalo Bills stampede the Patriots in freezing weather", settings: "aspect: square\n#custom_loss: symmetry\nscale: 4" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26", input={ "prompts": "Buffalo Bills stampede the Patriots in freezing weather", "settings": "aspect: square\n#custom_loss: symmetry\nscale: 4" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26", "input": { "prompts": "Buffalo Bills stampede the Patriots in freezing weather", "settings": "aspect: square\\n#custom_loss: symmetry\\nscale: 4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-16T03:56:41.022338Z", "created_at": "2022-01-16T03:34:59.992010Z", "data_removed": false, "error": null, "id": "qa7hfnfskvbuvgmlcrcenz7mfm", "input": { "prompts": "Buffalo Bills stampede the Patriots in freezing weather", "settings": "aspect: square\n#custom_loss: symmetry\nscale: 4" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n17108406091106670002\nAll CLIP models already loaded:\n['RN50', 'ViT-B/32', 'ViT-B/16']\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['Buffalo Bills stampede the Patriots in freezing weather']\n\n0it [00:00, ?it/s]\niter: 0, loss: 3.13, losses: 1.03, 0.0768, 0.99, 0.0474, 0.937, 0.0482 (-0=>3.129)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.88, losses: 0.985, 0.0838, 0.861, 0.0523, 0.852, 0.0505 (-0=>2.885)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.9, losses: 0.986, 0.0819, 0.872, 0.0529, 0.86, 0.0514 (-4=>2.824)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.84, losses: 0.961, 0.0831, 0.847, 0.0551, 0.836, 0.0545 (-6=>2.744)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.75, losses: 0.927, 0.087, 0.821, 0.0549, 0.811, 0.0544 (-2=>2.705)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.58, losses: 0.84, 0.101, 0.756, 0.0678, 0.749, 0.0648 (-0=>2.578)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.53, losses: 0.828, 0.0989, 0.738, 0.0682, 0.73, 0.0627 (-4=>2.522)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.5, losses: 0.814, 0.0978, 0.73, 0.0692, 0.73, 0.0609 (-1=>2.427)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.39, losses: 0.761, 0.105, 0.696, 0.0755, 0.69, 0.0673 (-0=>2.395)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.44, losses: 0.793, 0.0987, 0.708, 0.0723, 0.698, 0.0664 (-8=>2.374)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.35, losses: 0.755, 0.103, 0.68, 0.0749, 0.672, 0.0696 (-2=>2.336)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.39, losses: 0.773, 0.103, 0.696, 0.0724, 0.679, 0.0672 (-12=>2.336)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.34, losses: 0.749, 0.103, 0.684, 0.0744, 0.662, 0.0698 (-6=>2.324)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.37, losses: 0.763, 0.1, 0.69, 0.0725, 0.676, 0.068 (-16=>2.324)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.32, losses: 0.734, 0.103, 0.684, 0.0739, 0.654, 0.0714 (-0=>2.32)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.35, losses: 0.753, 0.101, 0.688, 0.0733, 0.667, 0.0678 (-4=>2.311)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.36, losses: 0.76, 0.101, 0.694, 0.0728, 0.669, 0.0687 (-14=>2.311)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.36, losses: 0.764, 0.101, 0.691, 0.0734, 0.668, 0.0684 (-24=>2.311)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.38, losses: 0.766, 0.101, 0.698, 0.0734, 0.673, 0.068 (-34=>2.311)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.39, losses: 0.774, 0.0996, 0.7, 0.0717, 0.675, 0.0681 (-44=>2.311)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.36, losses: 0.762, 0.101, 0.69, 0.0728, 0.664, 0.068 (-54=>2.311)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.33, losses: 0.748, 0.103, 0.687, 0.0738, 0.651, 0.0712 (-64=>2.311)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.37, losses: 0.768, 0.101, 0.693, 0.0729, 0.665, 0.0685 (-74=>2.311)\n\n0it [00:01, ?it/s]\nDropping learning rate\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.33, losses: 0.749, 0.103, 0.685, 0.0728, 0.652, 0.0708 (-0=>2.333)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.38, losses: 0.773, 0.1, 0.697, 0.0727, 0.669, 0.0679 (-4=>2.324)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.38, losses: 0.775, 0.1, 0.699, 0.0721, 0.671, 0.0669 (-14=>2.324)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.34, losses: 0.751, 0.102, 0.684, 0.0732, 0.653, 0.0709 (-24=>2.324)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.34, losses: 0.754, 0.102, 0.692, 0.0722, 0.654, 0.0703 (-34=>2.324)\n\n0it [00:00, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.39, losses: 0.78, 0.1, 0.699, 0.072, 0.67, 0.0675 (-44=>2.324)\n\n0it [00:00, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.38, losses: 0.77, 0.101, 0.695, 0.0723, 0.671, 0.0673 (-54=>2.324)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-64=>2.324)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 392.909453, "total_time": 1301.030328 }, "output": [ { "file": "https://replicate.delivery/mgxm/1fa21346-4f52-4475-ae00-bf107e168857/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/dce67910-e01d-4ee1-a411-0f1f2639d16f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8e20e82c-5fa1-45d9-b8f5-d35cc9124307/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5da91fe7-bce9-404d-9048-d8e3dd296fdc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e465773f-477a-4354-b518-0985fb5b179d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fa0ca304-7646-417f-83c8-9e961fd4b5cc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2e03d984-a22e-40bf-bc31-7bcaa677b15e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e077cec5-4228-4248-8dd5-58ea1f21badb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a0ee6aff-d8c8-40b8-bde1-9ea127f9484e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c523a15a-dd0e-4a73-b50c-2beef123bf4d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ac699810-bc1d-469a-bba2-f752e8890004/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c6f1c60f-6880-40b6-9dd5-f9d9a093a326/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f2e26c41-588b-4e08-9c6a-bcad266c36f1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c0656555-bc1b-498c-b284-feb599180f23/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/07832e09-a8cd-413b-94f2-61f509928401/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0177f984-256a-4391-a517-fd2e2dae0702/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1b2798e6-32a4-4cba-81aa-38a38d41ace9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b5aa9f6c-a0c0-4ad7-ab2a-01b73742b5c6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/abc83320-fa9a-4e66-812d-1b974f7b2323/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/55521c9b-1369-47c0-ac52-5e2acac315c1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2fc60fd7-0d0c-4018-8149-7cef3232fd57/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f98e9989-6eda-4242-8b87-3db5b769bb49/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/263acff9-4c0c-4b63-b450-37725c0b313e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7b175b22-7f45-4b18-a9f3-709ae654b08d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/cee3fa54-a6f5-471c-9a7b-cfa820c5e91f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7ab87a92-57a8-4a85-abcc-88d11997a055/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/bf3d00c0-f824-4bd2-8b4b-f8cfead697d5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9b7286a1-ee16-4f6d-8c5f-4deadbd69699/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0b1941b9-be7c-4b73-9e10-aa807c72bab8/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9ef0e3ff-3323-4ef6-914b-758ee2898aeb/tempfile.png" } ], "started_at": "2022-01-16T03:50:08.112885Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/qa7hfnfskvbuvgmlcrcenz7mfm", "cancel": "https://api.replicate.com/v1/predictions/qa7hfnfskvbuvgmlcrcenz7mfm/cancel" }, "version": "1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26" }
Generated in---> BasePixrayPredictor Predict Using seed: 17108406091106670002 All CLIP models already loaded: ['RN50', 'ViT-B/32', 'ViT-B/16'] Using device: cuda:0 Optimising using: Adam Using text prompts: ['Buffalo Bills stampede the Patriots in freezing weather'] 0it [00:00, ?it/s] iter: 0, loss: 3.13, losses: 1.03, 0.0768, 0.99, 0.0474, 0.937, 0.0482 (-0=>3.129) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.88, losses: 0.985, 0.0838, 0.861, 0.0523, 0.852, 0.0505 (-0=>2.885) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.9, losses: 0.986, 0.0819, 0.872, 0.0529, 0.86, 0.0514 (-4=>2.824) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.84, losses: 0.961, 0.0831, 0.847, 0.0551, 0.836, 0.0545 (-6=>2.744) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.75, losses: 0.927, 0.087, 0.821, 0.0549, 0.811, 0.0544 (-2=>2.705) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.58, losses: 0.84, 0.101, 0.756, 0.0678, 0.749, 0.0648 (-0=>2.578) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.53, losses: 0.828, 0.0989, 0.738, 0.0682, 0.73, 0.0627 (-4=>2.522) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.5, losses: 0.814, 0.0978, 0.73, 0.0692, 0.73, 0.0609 (-1=>2.427) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.39, losses: 0.761, 0.105, 0.696, 0.0755, 0.69, 0.0673 (-0=>2.395) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.44, losses: 0.793, 0.0987, 0.708, 0.0723, 0.698, 0.0664 (-8=>2.374) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.35, losses: 0.755, 0.103, 0.68, 0.0749, 0.672, 0.0696 (-2=>2.336) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.39, losses: 0.773, 0.103, 0.696, 0.0724, 0.679, 0.0672 (-12=>2.336) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.34, losses: 0.749, 0.103, 0.684, 0.0744, 0.662, 0.0698 (-6=>2.324) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.37, losses: 0.763, 0.1, 0.69, 0.0725, 0.676, 0.068 (-16=>2.324) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.32, losses: 0.734, 0.103, 0.684, 0.0739, 0.654, 0.0714 (-0=>2.32) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.35, losses: 0.753, 0.101, 0.688, 0.0733, 0.667, 0.0678 (-4=>2.311) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.36, losses: 0.76, 0.101, 0.694, 0.0728, 0.669, 0.0687 (-14=>2.311) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.36, losses: 0.764, 0.101, 0.691, 0.0734, 0.668, 0.0684 (-24=>2.311) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.38, losses: 0.766, 0.101, 0.698, 0.0734, 0.673, 0.068 (-34=>2.311) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.39, losses: 0.774, 0.0996, 0.7, 0.0717, 0.675, 0.0681 (-44=>2.311) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.36, losses: 0.762, 0.101, 0.69, 0.0728, 0.664, 0.068 (-54=>2.311) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.33, losses: 0.748, 0.103, 0.687, 0.0738, 0.651, 0.0712 (-64=>2.311) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.37, losses: 0.768, 0.101, 0.693, 0.0729, 0.665, 0.0685 (-74=>2.311) 0it [00:01, ?it/s] Dropping learning rate 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.33, losses: 0.749, 0.103, 0.685, 0.0728, 0.652, 0.0708 (-0=>2.333) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.38, losses: 0.773, 0.1, 0.697, 0.0727, 0.669, 0.0679 (-4=>2.324) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.38, losses: 0.775, 0.1, 0.699, 0.0721, 0.671, 0.0669 (-14=>2.324) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.34, losses: 0.751, 0.102, 0.684, 0.0732, 0.653, 0.0709 (-24=>2.324) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.34, losses: 0.754, 0.102, 0.692, 0.0722, 0.654, 0.0703 (-34=>2.324) 0it [00:00, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.39, losses: 0.78, 0.1, 0.699, 0.072, 0.67, 0.0675 (-44=>2.324) 0it [00:00, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.38, losses: 0.77, 0.101, 0.695, 0.0723, 0.671, 0.0673 (-54=>2.324) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-64=>2.324) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9Input
- prompts
- a violent explosion of love.
- settings
- custom_loss: edge edge_color: white edge_thickness: 1 vdiff_model: cc12m_1 size: [456, 256] vector_prompts: None
{ "prompts": "a violent explosion of love.", "settings": "custom_loss: edge\nedge_color: white\nedge_thickness: 1\nvdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", { input: { prompts: "a violent explosion of love.", settings: "custom_loss: edge\nedge_color: white\nedge_thickness: 1\nvdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", input={ "prompts": "a violent explosion of love.", "settings": "custom_loss: edge\nedge_color: white\nedge_thickness: 1\nvdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9", "input": { "prompts": "a violent explosion of love.", "settings": "custom_loss: edge\\nedge_color: white\\nedge_thickness: 1\\nvdiff_model: cc12m_1\\nsize: [456, 256]\\nvector_prompts: None\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-16T22:20:00.534695Z", "created_at": "2022-01-16T22:12:26.377781Z", "data_removed": false, "error": null, "id": "hwua74wmlzd7tceb7hzoifiizy", "input": { "prompts": "a violent explosion of love.", "settings": "custom_loss: edge\nedge_color: white\nedge_thickness: 1\nvdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n200605493936251862\nAll CLIP models already loaded:\n['RN50', 'ViT-B/32', 'ViT-B/16']\ndrawer <vdiff.VdiffDrawer object at 0x7fe6e6d3e7f0> needs ViT-B/16\nclip_embed for drawer <vdiff.VdiffDrawer object at 0x7fe6e6d3e7f0> is torch.Size([1, 512])\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['a violent explosion of love.']\nusing custom losses: edge\n\n0it [00:00, ?it/s]\niter: 0, loss: 2.91, losses: 0.989, 0.914, 0.918, 0.0923 (-0=>2.914)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.79, losses: 0.991, 0.9, 0.901, 0.000283 (-3=>2.782)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.72, losses: 0.971, 0.879, 0.864, 0.00102 (-0=>2.715)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.59, losses: 0.929, 0.832, 0.817, 0.00912 (-0=>2.587)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.56, losses: 0.918, 0.824, 0.809, 0.00434 (-5=>2.53)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.51, losses: 0.906, 0.802, 0.782, 0.0149 (-0=>2.506)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.49, losses: 0.906, 0.804, 0.773, 0.00589 (-8=>2.475)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.47, losses: 0.894, 0.799, 0.771, 0.00266 (-1=>2.429)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.44, losses: 0.886, 0.786, 0.762, 0.00131 (-7=>2.41)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.4, losses: 0.868, 0.782, 0.752, 0.00137 (-4=>2.403)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.41, losses: 0.872, 0.781, 0.754, 0.00128 (-4=>2.398)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.42, losses: 0.874, 0.784, 0.757, 0.00115 (-5=>2.389)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.4, losses: 0.87, 0.779, 0.751, 0.00155 (-9=>2.379)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.4, losses: 0.871, 0.777, 0.747, 0.00116 (-19=>2.379)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.41, losses: 0.873, 0.781, 0.752, 0.00108 (-9=>2.378)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.38, losses: 0.863, 0.774, 0.745, 0.00103 (-19=>2.378)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.39, losses: 0.866, 0.775, 0.744, 0.00101 (-29=>2.378)\n\n0it [00:01, ?it/s]\nCaught SIGTERM, exiting...\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.41, losses: 0.871, 0.779, 0.755, 0.00103 (-39=>2.378)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.39, losses: 0.867, 0.775, 0.748, 0.00103 (-49=>2.378)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.4, losses: 0.869, 0.778, 0.749, 0.00103 (-5=>2.376)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.42, losses: 0.877, 0.786, 0.758, 0.00105 (-15=>2.376)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.4, losses: 0.869, 0.78, 0.751, 0.00108 (-25=>2.376)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.4, losses: 0.87, 0.779, 0.751, 0.00113 (-35=>2.376)\n\n0it [00:01, ?it/s]\nDropping learning rate\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.4, losses: 0.868, 0.779, 0.752, 0.00114 (-5=>2.391)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.4, losses: 0.869, 0.775, 0.753, 0.00118 (-2=>2.383)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.41, losses: 0.872, 0.779, 0.754, 0.00121 (-12=>2.383)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.39, losses: 0.866, 0.772, 0.75, 0.00122 (-6=>2.382)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.4, losses: 0.873, 0.779, 0.749, 0.00122 (-9=>2.378)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.43, losses: 0.882, 0.789, 0.761, 0.00121 (-19=>2.378)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.42, losses: 0.876, 0.782, 0.759, 0.00121 (-29=>2.378)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-39=>2.378)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 453.964939, "total_time": 454.156914 }, "output": [ { "file": "https://replicate.delivery/mgxm/59ccf8f7-6a32-4c2a-9cfc-9915629d14c3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e88b96a4-cbdb-468c-8c84-c8b838eb9da5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e2ba7da3-ee55-4da9-9567-1a951031cab1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/543fd7ef-541a-4e75-a882-f85bb936399c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/90933c06-f91b-43fd-b2c8-cc68cce5cf27/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/482e6c6b-c71e-4e9c-aa3e-c3fb113ea4ae/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8dbdb82e-866c-4491-9808-4b552d677061/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/686af495-86ac-45a9-b7ca-ed3b98e007e6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e0cd9037-ee0c-4341-aa67-7b92ba6746f9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2518362a-8fcc-443f-9d16-289593ba5ac0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2d2cef6a-c454-438f-885f-2f46d461b366/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f130c6f0-ea07-4579-8529-7c49d0e57c30/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9b4684c7-d43a-422a-9056-7a94a39a8703/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/bd8917e0-6199-49b0-985e-5a564a217fea/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b7aae1d2-4c66-4290-9de5-06fcdaf90cfb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/50fb8952-cd32-4883-a498-05d8c72938ab/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fd33e6db-c364-4372-a835-af289cb886b5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8145910c-dc6f-43c6-a89a-8c73d3661a8c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/482ff972-12a3-48b2-83d7-74df5bd7e670/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b8bc1b70-8991-4146-8d7d-08c0ad1db7e7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/03467c19-2dff-4553-856a-21b75d3a7811/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4b0bd705-a6a9-47ab-9e93-c720ae9f3345/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/21dbbf63-2cd7-4300-83ac-d2f66e3a4b93/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9dd7d585-ea8a-4665-9f5f-f76a457ca682/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4a1b014d-8a2b-4416-ad06-77dd4f997db0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e025648d-0872-4698-bdae-e41fc89d2c98/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a91697a3-90c7-4092-9df3-81d8c695f034/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2edde7f5-9903-4456-b4ea-7e2cb968b1ed/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1b3364b4-a59b-4037-a9af-26f140902b7e/tempfile.png" } ], "started_at": "2022-01-16T22:12:26.569756Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/hwua74wmlzd7tceb7hzoifiizy", "cancel": "https://api.replicate.com/v1/predictions/hwua74wmlzd7tceb7hzoifiizy/cancel" }, "version": "6de93c83c5050b233f6529b6eab69f945e10ecbcbdde759f13102abdecb7f4b9" }
Generated in---> BasePixrayPredictor Predict Using seed: 200605493936251862 All CLIP models already loaded: ['RN50', 'ViT-B/32', 'ViT-B/16'] drawer <vdiff.VdiffDrawer object at 0x7fe6e6d3e7f0> needs ViT-B/16 clip_embed for drawer <vdiff.VdiffDrawer object at 0x7fe6e6d3e7f0> is torch.Size([1, 512]) Using device: cuda:0 Optimising using: Adam Using text prompts: ['a violent explosion of love.'] using custom losses: edge 0it [00:00, ?it/s] iter: 0, loss: 2.91, losses: 0.989, 0.914, 0.918, 0.0923 (-0=>2.914) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.79, losses: 0.991, 0.9, 0.901, 0.000283 (-3=>2.782) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.72, losses: 0.971, 0.879, 0.864, 0.00102 (-0=>2.715) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.59, losses: 0.929, 0.832, 0.817, 0.00912 (-0=>2.587) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.56, losses: 0.918, 0.824, 0.809, 0.00434 (-5=>2.53) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.51, losses: 0.906, 0.802, 0.782, 0.0149 (-0=>2.506) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.49, losses: 0.906, 0.804, 0.773, 0.00589 (-8=>2.475) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.47, losses: 0.894, 0.799, 0.771, 0.00266 (-1=>2.429) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.44, losses: 0.886, 0.786, 0.762, 0.00131 (-7=>2.41) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.4, losses: 0.868, 0.782, 0.752, 0.00137 (-4=>2.403) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.41, losses: 0.872, 0.781, 0.754, 0.00128 (-4=>2.398) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.42, losses: 0.874, 0.784, 0.757, 0.00115 (-5=>2.389) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.4, losses: 0.87, 0.779, 0.751, 0.00155 (-9=>2.379) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.4, losses: 0.871, 0.777, 0.747, 0.00116 (-19=>2.379) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.41, losses: 0.873, 0.781, 0.752, 0.00108 (-9=>2.378) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.38, losses: 0.863, 0.774, 0.745, 0.00103 (-19=>2.378) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.39, losses: 0.866, 0.775, 0.744, 0.00101 (-29=>2.378) 0it [00:01, ?it/s] Caught SIGTERM, exiting... 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.41, losses: 0.871, 0.779, 0.755, 0.00103 (-39=>2.378) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.39, losses: 0.867, 0.775, 0.748, 0.00103 (-49=>2.378) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.4, losses: 0.869, 0.778, 0.749, 0.00103 (-5=>2.376) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.42, losses: 0.877, 0.786, 0.758, 0.00105 (-15=>2.376) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.4, losses: 0.869, 0.78, 0.751, 0.00108 (-25=>2.376) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.4, losses: 0.87, 0.779, 0.751, 0.00113 (-35=>2.376) 0it [00:01, ?it/s] Dropping learning rate 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.4, losses: 0.868, 0.779, 0.752, 0.00114 (-5=>2.391) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.4, losses: 0.869, 0.775, 0.753, 0.00118 (-2=>2.383) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.41, losses: 0.872, 0.779, 0.754, 0.00121 (-12=>2.383) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.39, losses: 0.866, 0.772, 0.75, 0.00122 (-6=>2.382) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.4, losses: 0.873, 0.779, 0.749, 0.00122 (-9=>2.378) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.43, losses: 0.882, 0.789, 0.761, 0.00121 (-19=>2.378) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.42, losses: 0.876, 0.782, 0.759, 0.00121 (-29=>2.378) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-39=>2.378) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092ID6yvmwxrxafbutlbd42qco6ja34StatusSucceededSourceWebHardware–Total durationCreatedInput
- prompts
- Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)
- settings
- target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg/440px-Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg
{ "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg/440px-Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", { input: { prompts: "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", settings: "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg/440px-Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", input={ "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg/440px-Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", "input": { "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg/440px-Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-23T04:47:50.696898Z", "created_at": "2022-01-23T04:39:01.731996Z", "data_removed": false, "error": null, "id": "6yvmwxrxafbutlbd42qco6ja34", "input": { "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg/440px-Sam_Altman_TechCrunch_SF_2019_Day_2_Oct_3_%28cropped%29.jpg" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n3376271365201852464\nLoaded CLIP RN50: 102.01M params\nLoaded CLIP ViT-B/32: 151.28M params\nLoaded CLIP ViT-B/16: 149.62M params\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torchvision/transforms/transforms.py:280: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.\n warnings.warn(\n[<http.client.HTTPResponse object at 0x7f79140f7520>]\n[<http.client.HTTPResponse object at 0x7f79140f7550>]\n[<http.client.HTTPResponse object at 0x7f79140f7520>]\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)']\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 5.04, losses: 0.686, 0.968, 0.0887, 0.684, 0.914, 0.0649, 0.683, 0.89, 0.0649 (-0=>5.043)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 4.85, losses: 0.593, 0.97, 0.0931, 0.629, 0.913, 0.0644, 0.637, 0.887, 0.0639 (-1=>4.842)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 4.8, losses: 0.567, 0.973, 0.0941, 0.631, 0.909, 0.0647, 0.611, 0.884, 0.063 (-3=>4.79)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 4.75, losses: 0.569, 0.965, 0.0939, 0.598, 0.907, 0.0656, 0.602, 0.883, 0.0644 (-5=>4.736)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 4.67, losses: 0.546, 0.964, 0.0942, 0.578, 0.909, 0.066, 0.563, 0.886, 0.0646 (-3=>4.649)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 4.58, losses: 0.528, 0.972, 0.095, 0.519, 0.915, 0.0689, 0.53, 0.888, 0.0677 (-1=>4.567)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 4.5, losses: 0.515, 0.976, 0.0972, 0.473, 0.915, 0.0702, 0.496, 0.894, 0.0676 (-2=>4.446)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 4.33, losses: 0.457, 0.978, 0.0972, 0.429, 0.912, 0.0712, 0.425, 0.886, 0.0716 (-2=>4.271)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 4.09, losses: 0.381, 0.976, 0.099, 0.341, 0.911, 0.0752, 0.343, 0.886, 0.0742 (-0=>4.086)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 3.98, losses: 0.35, 0.975, 0.101, 0.312, 0.903, 0.0759, 0.311, 0.873, 0.0755 (-6=>3.87)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 3.92, losses: 0.319, 0.975, 0.102, 0.302, 0.905, 0.0775, 0.289, 0.876, 0.0764 (-2=>3.807)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 3.85, losses: 0.288, 0.978, 0.103, 0.282, 0.905, 0.0771, 0.262, 0.879, 0.0769 (-2=>3.79)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 3.87, losses: 0.311, 0.98, 0.103, 0.274, 0.905, 0.0774, 0.267, 0.876, 0.0771 (-6=>3.752)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 3.8, losses: 0.278, 0.973, 0.103, 0.259, 0.903, 0.0787, 0.258, 0.869, 0.0774 (-2=>3.69)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 3.76, losses: 0.256, 0.975, 0.104, 0.251, 0.902, 0.0783, 0.241, 0.871, 0.0779 (-12=>3.69)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 3.77, losses: 0.259, 0.974, 0.105, 0.254, 0.906, 0.0791, 0.244, 0.868, 0.0783 (-22=>3.69)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 3.82, losses: 0.271, 0.972, 0.103, 0.28, 0.9, 0.0768, 0.277, 0.865, 0.0767 (-32=>3.69)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 3.81, losses: 0.281, 0.973, 0.104, 0.271, 0.9, 0.0783, 0.262, 0.867, 0.078 (-42=>3.69)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 3.79, losses: 0.271, 0.974, 0.103, 0.255, 0.907, 0.0789, 0.253, 0.869, 0.0782 (-52=>3.69)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 3.87, losses: 0.305, 0.972, 0.102, 0.284, 0.902, 0.0775, 0.277, 0.872, 0.0775 (-62=>3.69)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 3.74, losses: 0.252, 0.976, 0.104, 0.243, 0.903, 0.0788, 0.235, 0.868, 0.0788 (-72=>3.69)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 3.75, losses: 0.258, 0.974, 0.104, 0.25, 0.9, 0.0779, 0.239, 0.864, 0.0782 (-82=>3.69)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 3.83, losses: 0.294, 0.974, 0.104, 0.274, 0.898, 0.0775, 0.266, 0.864, 0.0778 (-92=>3.69)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 3.79, losses: 0.273, 0.973, 0.103, 0.264, 0.897, 0.0776, 0.265, 0.865, 0.0765 (-3=>3.66)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 3.87, losses: 0.308, 0.972, 0.101, 0.293, 0.898, 0.0762, 0.284, 0.864, 0.0763 (-13=>3.66)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 3.77, losses: 0.273, 0.969, 0.105, 0.248, 0.897, 0.0776, 0.261, 0.864, 0.0772 (-23=>3.66)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 3.79, losses: 0.28, 0.971, 0.103, 0.253, 0.901, 0.0782, 0.267, 0.864, 0.0769 (-33=>3.66)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 3.8, losses: 0.281, 0.968, 0.103, 0.265, 0.896, 0.0774, 0.271, 0.863, 0.0768 (-43=>3.66)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 3.84, losses: 0.295, 0.974, 0.103, 0.272, 0.901, 0.0774, 0.274, 0.866, 0.0761 (-53=>3.66)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 3.81, losses: 0.287, 0.969, 0.102, 0.266, 0.895, 0.077, 0.276, 0.865, 0.0769 (-63=>3.66)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-73=>3.66)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 343.874558, "total_time": 528.964902 }, "output": [ { "file": "https://replicate.delivery/mgxm/afceba40-177d-42f9-a242-76ad2d8a06bb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0322fd07-a4b3-44bf-ab4b-7226ebfa4c10/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d01e8917-839f-40fb-a4be-c5a400754ce0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/25d3a7b7-225c-4be6-8ba5-3f93b094a696/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/17e739b5-6633-4c90-b820-810874bfa50d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/142d0750-0344-4e03-89f3-dc18a7994d93/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/faa871b3-ddd4-41bf-8094-312f4283dee6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5ab7cf2a-508f-4bd3-be43-36b1e71246c9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/10a41a2b-568c-48f5-9672-0da40f997103/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f8921283-a9ae-4bad-9892-7a3fc57d1835/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a5f4d030-7021-44b1-8de6-0ff64bebc739/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0971816e-1c17-4311-b71a-80b15e580a96/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e99e9deb-92cc-41dd-b6bf-dda24a79d477/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6eb6dbe0-2b3b-4607-bf25-97b900ce4cd7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a48a6374-3b22-4c6a-aab0-91db74ac8a73/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9b0e3431-591d-4780-9944-49e92135cc1a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/30a40eb6-1a46-423e-a036-a086b8548511/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a8e334b3-7b8d-4318-9305-9a34bbf5a8a3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/edf3c363-b095-42bf-9bd2-31ebe2e07efe/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0a10ec68-aa74-40f3-bb28-1660d456ad42/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7ad495cf-d35a-4692-9e76-1a022c260179/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/05617609-c2a6-4026-8f09-c9bcbc1734b4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/738cfff5-ea53-4a40-8216-b54b0559973c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ffdc252e-4a4d-4611-84c8-65aa5790df26/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/cc85e8ec-c1fd-4545-9cbd-e3be4756880a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fd3ecef2-69bb-43be-84ec-9215298f8540/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1e462d24-639e-4b61-8f7e-8fc36cc77d1d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9f09c43a-65ed-47ea-8232-e7b78f851f75/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d7d29680-8a0b-43b8-b2fd-17138f186c61/tempfile.png" } ], "started_at": "2022-01-23T04:42:06.822340Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/6yvmwxrxafbutlbd42qco6ja34", "cancel": "https://api.replicate.com/v1/predictions/6yvmwxrxafbutlbd42qco6ja34/cancel" }, "version": "3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092" }
Generated in---> BasePixrayPredictor Predict Using seed: 3376271365201852464 Loaded CLIP RN50: 102.01M params Loaded CLIP ViT-B/32: 151.28M params Loaded CLIP ViT-B/16: 149.62M params /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torchvision/transforms/transforms.py:280: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum. warnings.warn( [<http.client.HTTPResponse object at 0x7f79140f7520>] [<http.client.HTTPResponse object at 0x7f79140f7550>] [<http.client.HTTPResponse object at 0x7f79140f7520>] Using device: cuda:0 Optimising using: Adam Using text prompts: ['Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 5.04, losses: 0.686, 0.968, 0.0887, 0.684, 0.914, 0.0649, 0.683, 0.89, 0.0649 (-0=>5.043) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 4.85, losses: 0.593, 0.97, 0.0931, 0.629, 0.913, 0.0644, 0.637, 0.887, 0.0639 (-1=>4.842) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 4.8, losses: 0.567, 0.973, 0.0941, 0.631, 0.909, 0.0647, 0.611, 0.884, 0.063 (-3=>4.79) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 4.75, losses: 0.569, 0.965, 0.0939, 0.598, 0.907, 0.0656, 0.602, 0.883, 0.0644 (-5=>4.736) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 4.67, losses: 0.546, 0.964, 0.0942, 0.578, 0.909, 0.066, 0.563, 0.886, 0.0646 (-3=>4.649) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 4.58, losses: 0.528, 0.972, 0.095, 0.519, 0.915, 0.0689, 0.53, 0.888, 0.0677 (-1=>4.567) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 4.5, losses: 0.515, 0.976, 0.0972, 0.473, 0.915, 0.0702, 0.496, 0.894, 0.0676 (-2=>4.446) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 4.33, losses: 0.457, 0.978, 0.0972, 0.429, 0.912, 0.0712, 0.425, 0.886, 0.0716 (-2=>4.271) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 4.09, losses: 0.381, 0.976, 0.099, 0.341, 0.911, 0.0752, 0.343, 0.886, 0.0742 (-0=>4.086) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 3.98, losses: 0.35, 0.975, 0.101, 0.312, 0.903, 0.0759, 0.311, 0.873, 0.0755 (-6=>3.87) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 3.92, losses: 0.319, 0.975, 0.102, 0.302, 0.905, 0.0775, 0.289, 0.876, 0.0764 (-2=>3.807) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 3.85, losses: 0.288, 0.978, 0.103, 0.282, 0.905, 0.0771, 0.262, 0.879, 0.0769 (-2=>3.79) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 3.87, losses: 0.311, 0.98, 0.103, 0.274, 0.905, 0.0774, 0.267, 0.876, 0.0771 (-6=>3.752) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 3.8, losses: 0.278, 0.973, 0.103, 0.259, 0.903, 0.0787, 0.258, 0.869, 0.0774 (-2=>3.69) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 3.76, losses: 0.256, 0.975, 0.104, 0.251, 0.902, 0.0783, 0.241, 0.871, 0.0779 (-12=>3.69) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 3.77, losses: 0.259, 0.974, 0.105, 0.254, 0.906, 0.0791, 0.244, 0.868, 0.0783 (-22=>3.69) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 3.82, losses: 0.271, 0.972, 0.103, 0.28, 0.9, 0.0768, 0.277, 0.865, 0.0767 (-32=>3.69) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 3.81, losses: 0.281, 0.973, 0.104, 0.271, 0.9, 0.0783, 0.262, 0.867, 0.078 (-42=>3.69) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 3.79, losses: 0.271, 0.974, 0.103, 0.255, 0.907, 0.0789, 0.253, 0.869, 0.0782 (-52=>3.69) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 3.87, losses: 0.305, 0.972, 0.102, 0.284, 0.902, 0.0775, 0.277, 0.872, 0.0775 (-62=>3.69) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 3.74, losses: 0.252, 0.976, 0.104, 0.243, 0.903, 0.0788, 0.235, 0.868, 0.0788 (-72=>3.69) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 3.75, losses: 0.258, 0.974, 0.104, 0.25, 0.9, 0.0779, 0.239, 0.864, 0.0782 (-82=>3.69) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 3.83, losses: 0.294, 0.974, 0.104, 0.274, 0.898, 0.0775, 0.266, 0.864, 0.0778 (-92=>3.69) 0it [00:00, ?it/s] Dropping learning rate 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 3.79, losses: 0.273, 0.973, 0.103, 0.264, 0.897, 0.0776, 0.265, 0.865, 0.0765 (-3=>3.66) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 3.87, losses: 0.308, 0.972, 0.101, 0.293, 0.898, 0.0762, 0.284, 0.864, 0.0763 (-13=>3.66) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 3.77, losses: 0.273, 0.969, 0.105, 0.248, 0.897, 0.0776, 0.261, 0.864, 0.0772 (-23=>3.66) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 3.79, losses: 0.28, 0.971, 0.103, 0.253, 0.901, 0.0782, 0.267, 0.864, 0.0769 (-33=>3.66) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 3.8, losses: 0.281, 0.968, 0.103, 0.265, 0.896, 0.0774, 0.271, 0.863, 0.0768 (-43=>3.66) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 3.84, losses: 0.295, 0.974, 0.103, 0.272, 0.901, 0.0774, 0.274, 0.866, 0.0761 (-53=>3.66) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 3.81, losses: 0.287, 0.969, 0.102, 0.266, 0.895, 0.077, 0.276, 0.865, 0.0769 (-63=>3.66) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-73=>3.66) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092IDi6sdzuzsazf2tbww4rrzl6le3eStatusSucceededSourceWebHardware–Total durationCreatedInput
- prompts
- panic attack during a CT scan 🤘💀🤘
- settings
{ "prompts": "panic attack during a CT scan 🤘💀🤘", "settings": "\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", { input: { prompts: "panic attack during a CT scan 🤘💀🤘", settings: "\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", input={ "prompts": "panic attack during a CT scan 🤘💀🤘", "settings": "\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", "input": { "prompts": "panic attack during a CT scan 🤘💀🤘", "settings": "\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-24T06:51:14.886482Z", "created_at": "2022-01-24T06:27:56.987250Z", "data_removed": false, "error": null, "id": "i6sdzuzsazf2tbww4rrzl6le3e", "input": { "prompts": "panic attack during a CT scan 🤘💀🤘", "settings": "\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n6667787375960191909\nLoaded CLIP RN50: 102.01M params\nLoaded CLIP ViT-B/32: 151.28M params\nLoaded CLIP ViT-B/16: 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['panic attack during a CT scan 🤘💀🤘']\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 3.13, losses: 1.03, 0.0861, 0.962, 0.0647, 0.931, 0.065 (-0=>3.135)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 3, losses: 0.974, 0.0822, 0.928, 0.0632, 0.887, 0.063 (-0=>2.998)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.96, losses: 0.977, 0.0861, 0.913, 0.0635, 0.851, 0.0656 (-0=>2.956)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.95, losses: 0.97, 0.0841, 0.904, 0.0633, 0.863, 0.0657 (-4=>2.943)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.91, losses: 0.976, 0.0863, 0.879, 0.0643, 0.839, 0.0653 (-3=>2.904)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.83, losses: 0.952, 0.0838, 0.846, 0.0665, 0.814, 0.0687 (-1=>2.823)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.79, losses: 0.938, 0.0851, 0.831, 0.0697, 0.798, 0.0711 (-0=>2.793)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.75, losses: 0.927, 0.0863, 0.81, 0.0705, 0.786, 0.0702 (-0=>2.75)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.71, losses: 0.922, 0.0869, 0.781, 0.073, 0.774, 0.0712 (-0=>2.708)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.68, losses: 0.915, 0.0875, 0.775, 0.0709, 0.765, 0.0697 (-2=>2.679)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.66, losses: 0.893, 0.0876, 0.777, 0.0705, 0.759, 0.0702 (-4=>2.644)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.64, losses: 0.899, 0.0885, 0.757, 0.0718, 0.753, 0.0683 (-2=>2.612)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.64, losses: 0.899, 0.09, 0.758, 0.0726, 0.751, 0.0684 (-12=>2.612)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.62, losses: 0.894, 0.0886, 0.751, 0.0722, 0.745, 0.0689 (-22=>2.612)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.61, losses: 0.887, 0.0905, 0.747, 0.0724, 0.743, 0.0686 (-0=>2.608)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.62, losses: 0.906, 0.0869, 0.746, 0.073, 0.737, 0.0691 (-5=>2.605)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.63, losses: 0.897, 0.0869, 0.758, 0.071, 0.747, 0.0697 (-2=>2.603)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.62, losses: 0.895, 0.089, 0.756, 0.0724, 0.741, 0.0688 (-12=>2.603)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.62, losses: 0.903, 0.0889, 0.745, 0.0721, 0.744, 0.0681 (-22=>2.603)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.62, losses: 0.899, 0.0871, 0.751, 0.0711, 0.746, 0.0683 (-32=>2.603)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.63, losses: 0.905, 0.0875, 0.751, 0.0727, 0.747, 0.0685 (-42=>2.603)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.61, losses: 0.895, 0.0894, 0.75, 0.0725, 0.738, 0.0691 (-52=>2.603)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.6, losses: 0.891, 0.0873, 0.739, 0.0721, 0.74, 0.0687 (-0=>2.597)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.64, losses: 0.899, 0.0882, 0.76, 0.0716, 0.748, 0.0689 (-2=>2.614)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.63, losses: 0.901, 0.088, 0.756, 0.0722, 0.745, 0.0689 (-12=>2.614)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.62, losses: 0.899, 0.0875, 0.748, 0.0722, 0.741, 0.0688 (-22=>2.614)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.63, losses: 0.897, 0.0883, 0.755, 0.0717, 0.745, 0.0678 (-32=>2.614)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.63, losses: 0.898, 0.0882, 0.754, 0.0709, 0.748, 0.0688 (-42=>2.614)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.64, losses: 0.904, 0.0875, 0.757, 0.0716, 0.751, 0.0681 (-52=>2.614)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.65, losses: 0.902, 0.0885, 0.761, 0.0712, 0.757, 0.0689 (-4=>2.612)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-14=>2.612)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 365.805736, "total_time": 1397.899232 }, "output": [ { "file": "https://replicate.delivery/mgxm/820431a7-e8d2-4417-bce6-753b4bcbca07/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b1782f4c-e9d5-45db-9571-fa5d82f0d8e2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d16d97cf-b028-44f2-9fd2-0bf0ad1b6c4c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/88127b05-b776-40d0-8c5d-18e7ec07d3d6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8defc6a6-fb57-480b-bfb5-d19dfa30ab03/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f194ca31-e054-4899-88db-de61abb1330a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/71e8fcd4-b28b-486a-bd92-e8973879c27c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/057c7f8c-8638-43b7-acfb-6a863cd749e7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/33c3af51-595d-4be3-a66f-f6fc3fa648cb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0032b920-eb68-4da8-aa70-6b7f977ac6e5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/876ad2a0-1b9e-4c17-bd34-2fa6483e6457/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e611a9a7-405b-4d95-8e00-b7b3c7d75f89/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/84ff47ea-892c-4d87-a831-68be84cc4535/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/23a64e72-0c89-4e77-8a20-5674bb88fb88/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fac1d4bd-9ed5-441c-b270-cbf395121d6a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8936bfe6-4dc0-4c28-a3aa-bb2717aeac4d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f99eac44-63c7-4efc-b905-eae1be128ad1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b7dc34ac-9f6c-4670-ab53-c58845152efc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8dba6304-a677-49f8-bb5f-0e177d461608/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9ccbf88e-46db-45f0-94c9-e9f1b6f052a5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b3092a07-270e-4c20-8c37-b6c67064c37f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d991a3d7-2f9b-4459-81f2-7bb7d97c03cf/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2bf37659-e1d0-40b0-ae42-895d149efd14/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4151bd14-bb11-421e-b64a-5cdf07601e04/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f62f2246-53e6-49d4-a86d-4fa30cf9df27/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3672a3fc-510a-4971-a421-867c70b44d78/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/923a4f91-e8a4-4c88-b3d9-cd0d6a5d16ba/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/35bf2c29-a31d-42a1-b419-6c671bca083f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/86e3ad17-0d46-40b8-a7de-4739ea548ae5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3761d0d3-7d17-43ee-a44c-df3b6b51fe43/tempfile.png" } ], "started_at": "2022-01-24T06:45:09.080746Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/i6sdzuzsazf2tbww4rrzl6le3e", "cancel": "https://api.replicate.com/v1/predictions/i6sdzuzsazf2tbww4rrzl6le3e/cancel" }, "version": "3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092" }
Generated in---> BasePixrayPredictor Predict Using seed: 6667787375960191909 Loaded CLIP RN50: 102.01M params Loaded CLIP ViT-B/32: 151.28M params Loaded CLIP ViT-B/16: 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['panic attack during a CT scan 🤘💀🤘'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 3.13, losses: 1.03, 0.0861, 0.962, 0.0647, 0.931, 0.065 (-0=>3.135) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 3, losses: 0.974, 0.0822, 0.928, 0.0632, 0.887, 0.063 (-0=>2.998) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.96, losses: 0.977, 0.0861, 0.913, 0.0635, 0.851, 0.0656 (-0=>2.956) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.95, losses: 0.97, 0.0841, 0.904, 0.0633, 0.863, 0.0657 (-4=>2.943) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.91, losses: 0.976, 0.0863, 0.879, 0.0643, 0.839, 0.0653 (-3=>2.904) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.83, losses: 0.952, 0.0838, 0.846, 0.0665, 0.814, 0.0687 (-1=>2.823) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.79, losses: 0.938, 0.0851, 0.831, 0.0697, 0.798, 0.0711 (-0=>2.793) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.75, losses: 0.927, 0.0863, 0.81, 0.0705, 0.786, 0.0702 (-0=>2.75) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.71, losses: 0.922, 0.0869, 0.781, 0.073, 0.774, 0.0712 (-0=>2.708) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.68, losses: 0.915, 0.0875, 0.775, 0.0709, 0.765, 0.0697 (-2=>2.679) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.66, losses: 0.893, 0.0876, 0.777, 0.0705, 0.759, 0.0702 (-4=>2.644) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.64, losses: 0.899, 0.0885, 0.757, 0.0718, 0.753, 0.0683 (-2=>2.612) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.64, losses: 0.899, 0.09, 0.758, 0.0726, 0.751, 0.0684 (-12=>2.612) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.62, losses: 0.894, 0.0886, 0.751, 0.0722, 0.745, 0.0689 (-22=>2.612) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.61, losses: 0.887, 0.0905, 0.747, 0.0724, 0.743, 0.0686 (-0=>2.608) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.62, losses: 0.906, 0.0869, 0.746, 0.073, 0.737, 0.0691 (-5=>2.605) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.63, losses: 0.897, 0.0869, 0.758, 0.071, 0.747, 0.0697 (-2=>2.603) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.62, losses: 0.895, 0.089, 0.756, 0.0724, 0.741, 0.0688 (-12=>2.603) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.62, losses: 0.903, 0.0889, 0.745, 0.0721, 0.744, 0.0681 (-22=>2.603) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.62, losses: 0.899, 0.0871, 0.751, 0.0711, 0.746, 0.0683 (-32=>2.603) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.63, losses: 0.905, 0.0875, 0.751, 0.0727, 0.747, 0.0685 (-42=>2.603) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.61, losses: 0.895, 0.0894, 0.75, 0.0725, 0.738, 0.0691 (-52=>2.603) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.6, losses: 0.891, 0.0873, 0.739, 0.0721, 0.74, 0.0687 (-0=>2.597) 0it [00:00, ?it/s] Dropping learning rate 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.64, losses: 0.899, 0.0882, 0.76, 0.0716, 0.748, 0.0689 (-2=>2.614) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.63, losses: 0.901, 0.088, 0.756, 0.0722, 0.745, 0.0689 (-12=>2.614) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.62, losses: 0.899, 0.0875, 0.748, 0.0722, 0.741, 0.0688 (-22=>2.614) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.63, losses: 0.897, 0.0883, 0.755, 0.0717, 0.745, 0.0678 (-32=>2.614) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.63, losses: 0.898, 0.0882, 0.754, 0.0709, 0.748, 0.0688 (-42=>2.614) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.64, losses: 0.904, 0.0875, 0.757, 0.0716, 0.751, 0.0681 (-52=>2.614) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.65, losses: 0.902, 0.0885, 0.761, 0.0712, 0.757, 0.0689 (-4=>2.612) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-14=>2.612) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092Input
- prompts
- a living room from the 1970s
- settings
- # restrict output to 8 rectangles for a quick color palette drawer: pixel pixel_size: [8, 1]
{ "prompts": "a living room from the 1970s", "settings": "# restrict output to 8 rectangles for a quick color palette\ndrawer: pixel\npixel_size: [8, 1]" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", { input: { prompts: "a living room from the 1970s", settings: "# restrict output to 8 rectangles for a quick color palette\ndrawer: pixel\npixel_size: [8, 1]" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", input={ "prompts": "a living room from the 1970s", "settings": "# restrict output to 8 rectangles for a quick color palette\ndrawer: pixel\npixel_size: [8, 1]" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", "input": { "prompts": "a living room from the 1970s", "settings": "# restrict output to 8 rectangles for a quick color palette\\ndrawer: pixel\\npixel_size: [8, 1]" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-27T02:27:33.389552Z", "created_at": "2022-01-27T02:23:55.273265Z", "data_removed": false, "error": null, "id": "fu6s7q3inbgmzorwdlx54vk4sa", "input": { "prompts": "a living room from the 1970s", "settings": "# restrict output to 8 rectangles for a quick color palette\ndrawer: pixel\npixel_size: [8, 1]" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n14211672867398076359\nRunning pixeldrawer with 8x1 grid\nAll CLIP models already loaded:\n['RN50', 'ViT-B/32', 'ViT-B/16']\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['a living room from the 1970s']\n\n0it [00:00, ?it/s]\niter: 0, loss: 3.09, losses: 1, 0.0874, 0.932, 0.0622, 0.945, 0.0638 (-0=>3.09)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 3.01, losses: 0.979, 0.0892, 0.901, 0.0645, 0.911, 0.0653 (-3=>3.006)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 3, losses: 0.975, 0.0905, 0.898, 0.0655, 0.903, 0.0659 (-4=>2.985)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.99, losses: 0.973, 0.0906, 0.893, 0.066, 0.902, 0.0666 (-14=>2.985)\n\n0it [00:00, ?it/s]\n\n0it [00:07, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.99, losses: 0.974, 0.0904, 0.895, 0.0662, 0.9, 0.0664 (-6=>2.982)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.98, losses: 0.97, 0.0907, 0.89, 0.0663, 0.901, 0.0669 (-16=>2.982)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.99, losses: 0.974, 0.0908, 0.893, 0.0653, 0.903, 0.0663 (-3=>2.98)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.99, losses: 0.971, 0.0918, 0.893, 0.066, 0.904, 0.0661 (-13=>2.98)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.99, losses: 0.97, 0.0907, 0.887, 0.0672, 0.905, 0.0668 (-23=>2.98)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.97, losses: 0.964, 0.091, 0.888, 0.0655, 0.897, 0.0663 (-0=>2.972)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 3, losses: 0.974, 0.0921, 0.894, 0.0678, 0.905, 0.0676 (-2=>2.971)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.98, losses: 0.969, 0.0898, 0.892, 0.0659, 0.896, 0.0671 (-12=>2.971)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.99, losses: 0.972, 0.0903, 0.891, 0.066, 0.901, 0.0666 (-22=>2.971)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.97, losses: 0.968, 0.091, 0.885, 0.0669, 0.897, 0.0661 (-32=>2.971)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 3, losses: 0.976, 0.0897, 0.896, 0.066, 0.902, 0.0669 (-42=>2.971)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.98, losses: 0.968, 0.0905, 0.889, 0.0669, 0.895, 0.0671 (-52=>2.971)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.98, losses: 0.97, 0.0901, 0.891, 0.0656, 0.899, 0.0668 (-62=>2.971)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.98, losses: 0.969, 0.0907, 0.886, 0.0655, 0.9, 0.0664 (-8=>2.968)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.98, losses: 0.964, 0.0903, 0.89, 0.0659, 0.904, 0.0658 (-18=>2.968)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.99, losses: 0.975, 0.0907, 0.895, 0.0655, 0.901, 0.0664 (-28=>2.968)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 3, losses: 0.974, 0.0905, 0.901, 0.0659, 0.905, 0.0668 (-38=>2.968)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.99, losses: 0.972, 0.0903, 0.89, 0.0663, 0.902, 0.0669 (-48=>2.968)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.98, losses: 0.968, 0.0894, 0.889, 0.065, 0.898, 0.0668 (-58=>2.968)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 3, losses: 0.975, 0.0913, 0.898, 0.0655, 0.901, 0.0671 (-1=>2.97)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.98, losses: 0.969, 0.0907, 0.891, 0.0661, 0.9, 0.0675 (-11=>2.97)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.98, losses: 0.97, 0.0913, 0.887, 0.0667, 0.899, 0.0665 (-21=>2.97)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.98, losses: 0.969, 0.0904, 0.888, 0.067, 0.904, 0.0666 (-31=>2.97)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.99, losses: 0.971, 0.0911, 0.894, 0.0662, 0.9, 0.0666 (-41=>2.97)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 3, losses: 0.975, 0.0907, 0.899, 0.0659, 0.901, 0.0675 (-2=>2.969)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.99, losses: 0.972, 0.0904, 0.893, 0.0665, 0.899, 0.0674 (-12=>2.969)\n\n0it [00:00, ?it/s]\n\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-4=>2.965)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 217.93673, "total_time": 218.116287 }, "output": [ { "file": "https://replicate.delivery/mgxm/39b505fd-8239-47c4-aaad-32748e7a4eca/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/15121822-9626-48d9-9ab7-c55861939bf4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/06089153-a1d7-4c33-8fdb-450e2dfbbae2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9317f8df-c33d-4b34-83a9-4f0122dde15a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/85482108-d9bc-4e4e-89a8-138fe9f2987b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/77031a17-2b46-40f4-984d-85178ad2b882/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c2a36b8d-d778-4df1-80ef-37c992a809fe/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/cd369d7f-e5e3-4b6c-b84f-6ca9e54a8588/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6d4638f0-6154-413e-be7d-26f032013444/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c5003219-cd72-4917-9bfb-6eb370d16c15/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/356af13f-5907-4d1e-b117-3e0824620b57/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/301519be-f4f9-4bcf-b859-6ccc2ea0f69b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/adb82e07-468b-4c4c-a1cb-34087fa80de2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/008f7419-c578-4943-9cb9-95f2197697dd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/337578f4-b6c5-45d5-930d-7ac0d5095607/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9815ad95-70bb-4c8d-9316-53a41b5dcf51/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/370f9ade-ed94-43fb-9cad-e3f495b632e4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6b398c97-9174-40be-af52-3c21d0133914/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/783c11c2-6d5b-42d5-9b91-490dd7aad707/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e04441ed-163f-4fe1-8bed-f9839d38e382/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6536eb5f-4fb4-44a2-a945-5eec1fb2626b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/06a7a64a-83b7-4357-9835-8dc9c3734471/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/25f51f34-f15b-4e61-b998-1c8bc27c6995/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9a3d12db-075d-4408-8d1b-5b09998b1911/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/db1578fc-bd4a-4afd-a41e-cad07d03f4c1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0be9a5a8-61f4-459b-a0b3-2161fd2e4df2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/64bc804d-7bf2-4724-8967-d5a51216034c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1225c7e8-cc8e-4b03-bcd3-79e19db9a1bb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d5f6a4e7-1e1c-454c-bd1b-05fc8a2ea3ac/tempfile.png" } ], "started_at": "2022-01-27T02:23:55.452822Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/fu6s7q3inbgmzorwdlx54vk4sa", "cancel": "https://api.replicate.com/v1/predictions/fu6s7q3inbgmzorwdlx54vk4sa/cancel" }, "version": "3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092" }
Generated in---> BasePixrayPredictor Predict Using seed: 14211672867398076359 Running pixeldrawer with 8x1 grid All CLIP models already loaded: ['RN50', 'ViT-B/32', 'ViT-B/16'] Using device: cuda:0 Optimising using: Adam Using text prompts: ['a living room from the 1970s'] 0it [00:00, ?it/s] iter: 0, loss: 3.09, losses: 1, 0.0874, 0.932, 0.0622, 0.945, 0.0638 (-0=>3.09) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 3.01, losses: 0.979, 0.0892, 0.901, 0.0645, 0.911, 0.0653 (-3=>3.006) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 3, losses: 0.975, 0.0905, 0.898, 0.0655, 0.903, 0.0659 (-4=>2.985) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.99, losses: 0.973, 0.0906, 0.893, 0.066, 0.902, 0.0666 (-14=>2.985) 0it [00:00, ?it/s] 0it [00:07, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.99, losses: 0.974, 0.0904, 0.895, 0.0662, 0.9, 0.0664 (-6=>2.982) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.98, losses: 0.97, 0.0907, 0.89, 0.0663, 0.901, 0.0669 (-16=>2.982) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.99, losses: 0.974, 0.0908, 0.893, 0.0653, 0.903, 0.0663 (-3=>2.98) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.99, losses: 0.971, 0.0918, 0.893, 0.066, 0.904, 0.0661 (-13=>2.98) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.99, losses: 0.97, 0.0907, 0.887, 0.0672, 0.905, 0.0668 (-23=>2.98) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.97, losses: 0.964, 0.091, 0.888, 0.0655, 0.897, 0.0663 (-0=>2.972) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 3, losses: 0.974, 0.0921, 0.894, 0.0678, 0.905, 0.0676 (-2=>2.971) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.98, losses: 0.969, 0.0898, 0.892, 0.0659, 0.896, 0.0671 (-12=>2.971) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.99, losses: 0.972, 0.0903, 0.891, 0.066, 0.901, 0.0666 (-22=>2.971) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.97, losses: 0.968, 0.091, 0.885, 0.0669, 0.897, 0.0661 (-32=>2.971) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 3, losses: 0.976, 0.0897, 0.896, 0.066, 0.902, 0.0669 (-42=>2.971) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.98, losses: 0.968, 0.0905, 0.889, 0.0669, 0.895, 0.0671 (-52=>2.971) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.98, losses: 0.97, 0.0901, 0.891, 0.0656, 0.899, 0.0668 (-62=>2.971) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.98, losses: 0.969, 0.0907, 0.886, 0.0655, 0.9, 0.0664 (-8=>2.968) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.98, losses: 0.964, 0.0903, 0.89, 0.0659, 0.904, 0.0658 (-18=>2.968) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.99, losses: 0.975, 0.0907, 0.895, 0.0655, 0.901, 0.0664 (-28=>2.968) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 3, losses: 0.974, 0.0905, 0.901, 0.0659, 0.905, 0.0668 (-38=>2.968) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.99, losses: 0.972, 0.0903, 0.89, 0.0663, 0.902, 0.0669 (-48=>2.968) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.98, losses: 0.968, 0.0894, 0.889, 0.065, 0.898, 0.0668 (-58=>2.968) 0it [00:00, ?it/s] Dropping learning rate 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 3, losses: 0.975, 0.0913, 0.898, 0.0655, 0.901, 0.0671 (-1=>2.97) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.98, losses: 0.969, 0.0907, 0.891, 0.0661, 0.9, 0.0675 (-11=>2.97) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.98, losses: 0.97, 0.0913, 0.887, 0.0667, 0.899, 0.0665 (-21=>2.97) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.98, losses: 0.969, 0.0904, 0.888, 0.067, 0.904, 0.0666 (-31=>2.97) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.99, losses: 0.971, 0.0911, 0.894, 0.0662, 0.9, 0.0666 (-41=>2.97) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 3, losses: 0.975, 0.0907, 0.899, 0.0659, 0.901, 0.0675 (-2=>2.969) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.99, losses: 0.972, 0.0904, 0.893, 0.0665, 0.899, 0.0674 (-12=>2.969) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-4=>2.965) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092Input
- prompts
- sunset at sea (© 1942 The Museum of Modern Art)
- settings
- vdiff_model: cc12m_1_cfg scale: 2.2
{ "prompts": "sunset at sea (© 1942 The Museum of Modern Art)", "settings": "vdiff_model: cc12m_1_cfg\nscale: 2.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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", { input: { prompts: "sunset at sea (© 1942 The Museum of Modern Art)", settings: "vdiff_model: cc12m_1_cfg\nscale: 2.2" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", input={ "prompts": "sunset at sea (© 1942 The Museum of Modern Art)", "settings": "vdiff_model: cc12m_1_cfg\nscale: 2.2" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", "input": { "prompts": "sunset at sea (© 1942 The Museum of Modern Art)", "settings": "vdiff_model: cc12m_1_cfg\\nscale: 2.2" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-27T05:52:39.739965Z", "created_at": "2022-01-27T05:45:20.647221Z", "data_removed": false, "error": null, "id": "m6inpdxjpjajdllmhxw5viella", "input": { "prompts": "sunset at sea (© 1942 The Museum of Modern Art)", "settings": "vdiff_model: cc12m_1_cfg\nscale: 2.2" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n9112289271662660981\nAll CLIP models already loaded:\n['RN50', 'ViT-B/32', 'ViT-B/16']\ndrawer <vdiff.VdiffDrawer object at 0x7f4d8875a280> needs ViT-B/16\nclip_embed for drawer <vdiff.VdiffDrawer object at 0x7f4d8875a280> is torch.Size([1, 512])\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['sunset at sea (© 1942 The Museum of Modern Art)']\n\n0it [00:00, ?it/s]\niter: 0, loss: 3.07, losses: 0.991, 0.0863, 0.958, 0.0619, 0.913, 0.064 (-0=>3.073)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.78, losses: 0.9, 0.0873, 0.851, 0.0621, 0.817, 0.0634 (-0=>2.781)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.71, losses: 0.872, 0.0872, 0.83, 0.0645, 0.796, 0.0638 (-0=>2.713)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.67, losses: 0.856, 0.0895, 0.815, 0.0656, 0.778, 0.0646 (-2=>2.66)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.61, losses: 0.835, 0.0904, 0.795, 0.0664, 0.758, 0.0655 (-0=>2.61)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.6, losses: 0.84, 0.09, 0.791, 0.0662, 0.75, 0.0665 (-1=>2.571)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.52, losses: 0.797, 0.0915, 0.767, 0.0678, 0.727, 0.0686 (-0=>2.519)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.52, losses: 0.812, 0.0905, 0.762, 0.0675, 0.722, 0.0686 (-1=>2.512)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.48, losses: 0.792, 0.0972, 0.748, 0.0681, 0.707, 0.0693 (-0=>2.482)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.46, losses: 0.788, 0.0928, 0.737, 0.0698, 0.697, 0.0711 (-3=>2.44)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.45, losses: 0.787, 0.0911, 0.737, 0.07, 0.691, 0.0723 (-13=>2.44)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.45, losses: 0.781, 0.0932, 0.738, 0.0701, 0.691, 0.0722 (-7=>2.431)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.41, losses: 0.772, 0.0917, 0.728, 0.0707, 0.676, 0.0748 (-0=>2.413)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.43, losses: 0.782, 0.0923, 0.734, 0.0708, 0.681, 0.074 (-10=>2.413)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.44, losses: 0.784, 0.0911, 0.731, 0.0708, 0.69, 0.073 (-20=>2.413)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.42, losses: 0.774, 0.092, 0.728, 0.0699, 0.679, 0.074 (-4=>2.407)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.42, losses: 0.775, 0.0921, 0.727, 0.0709, 0.679, 0.0737 (-2=>2.406)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.42, losses: 0.778, 0.0903, 0.728, 0.0706, 0.681, 0.0746 (-12=>2.406)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.42, losses: 0.776, 0.0915, 0.726, 0.0714, 0.679, 0.0741 (-22=>2.406)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.43, losses: 0.779, 0.0902, 0.727, 0.072, 0.684, 0.0751 (-32=>2.406)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.43, losses: 0.778, 0.0909, 0.73, 0.0715, 0.688, 0.0736 (-42=>2.406)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.42, losses: 0.773, 0.0908, 0.729, 0.0721, 0.678, 0.0753 (-52=>2.406)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.43, losses: 0.778, 0.0916, 0.731, 0.0714, 0.682, 0.0743 (-62=>2.406)\n\n0it [00:01, ?it/s]\nDropping learning rate\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.45, losses: 0.783, 0.0915, 0.737, 0.0718, 0.691, 0.0735 (-4=>2.421)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.45, losses: 0.784, 0.091, 0.738, 0.0726, 0.693, 0.0732 (-14=>2.421)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.45, losses: 0.786, 0.0915, 0.737, 0.0717, 0.69, 0.0744 (-24=>2.421)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.45, losses: 0.786, 0.0938, 0.733, 0.0725, 0.687, 0.074 (-34=>2.421)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.47, losses: 0.789, 0.0904, 0.744, 0.0718, 0.699, 0.0725 (-44=>2.421)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.45, losses: 0.784, 0.0927, 0.734, 0.0728, 0.688, 0.0745 (-54=>2.421)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.46, losses: 0.787, 0.0904, 0.74, 0.0715, 0.693, 0.0732 (-64=>2.421)\n\n0it [00:01, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-74=>2.421)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 438.904692, "total_time": 439.092744 }, "output": [ { "file": "https://replicate.delivery/mgxm/af75ddc1-794e-481e-b396-77aec5fbd9e3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/be8a6583-610e-413b-b1c3-ba527a3f78f6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f227de49-04ae-4e2c-ae00-1a2fa6241c99/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3eb366ad-bf32-4b59-ae52-ebee2f22b54d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/27229101-5d2e-4dc2-b57a-4bc346464ef1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/43692c91-eb48-4127-84b6-0a1ef2686105/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/79d37b88-2f94-46e2-a3d2-b8263c465d3f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/79155a13-abe6-4d1b-82ca-c4724731b210/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/64dfd375-9727-4717-b724-e0746d55886e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3b6edd46-825c-4af7-8f0c-52efb255a4c0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7631af39-9ac5-41ec-8fd9-7541d5fac16b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fd0a1543-a6e2-4a71-a7bc-63275f8dc18c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a09d23b6-2bd4-4d1e-9e9c-9254f27a6d5c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/40c585e8-01a9-408c-83d5-305764c5a322/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2cbff637-510c-493a-bbe2-6c60268aec40/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9262751a-42c3-43cd-98fd-8c3209af972b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c5555c3e-9e10-4d55-961c-5d14725c8bf0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b5853f40-74c2-4c6b-9682-467b60fc393a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ce2ccc96-8c7f-4cff-ab8b-1feb6762c76b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/687c9e5f-e96f-4051-9c75-97533b1db007/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/cdde0340-3d89-49b1-b335-4f6fdfc21edc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/626c7b82-b0d8-488a-a401-c3a3469501f9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7a5b3e4d-f53c-4ecb-a1a9-f1a2a84fad60/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2967f7dd-0471-4132-8752-ea64ce970a57/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/47daf65f-0da9-45e4-b2b5-600b5e599e4e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/88a340f8-1a9a-415e-9b61-6439c0a70373/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4dc0b485-121a-4776-b96c-cd5fc132fcae/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/74e94be4-024d-4c72-ad00-290e7568c020/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f374c103-070c-43b8-9cff-52ee813eb143/tempfile.png" } ], "started_at": "2022-01-27T05:45:20.835273Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/m6inpdxjpjajdllmhxw5viella", "cancel": "https://api.replicate.com/v1/predictions/m6inpdxjpjajdllmhxw5viella/cancel" }, "version": "3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092" }
Generated in---> BasePixrayPredictor Predict Using seed: 9112289271662660981 All CLIP models already loaded: ['RN50', 'ViT-B/32', 'ViT-B/16'] drawer <vdiff.VdiffDrawer object at 0x7f4d8875a280> needs ViT-B/16 clip_embed for drawer <vdiff.VdiffDrawer object at 0x7f4d8875a280> is torch.Size([1, 512]) Using device: cuda:0 Optimising using: Adam Using text prompts: ['sunset at sea (© 1942 The Museum of Modern Art)'] 0it [00:00, ?it/s] iter: 0, loss: 3.07, losses: 0.991, 0.0863, 0.958, 0.0619, 0.913, 0.064 (-0=>3.073) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.78, losses: 0.9, 0.0873, 0.851, 0.0621, 0.817, 0.0634 (-0=>2.781) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.71, losses: 0.872, 0.0872, 0.83, 0.0645, 0.796, 0.0638 (-0=>2.713) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.67, losses: 0.856, 0.0895, 0.815, 0.0656, 0.778, 0.0646 (-2=>2.66) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.61, losses: 0.835, 0.0904, 0.795, 0.0664, 0.758, 0.0655 (-0=>2.61) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.6, losses: 0.84, 0.09, 0.791, 0.0662, 0.75, 0.0665 (-1=>2.571) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.52, losses: 0.797, 0.0915, 0.767, 0.0678, 0.727, 0.0686 (-0=>2.519) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.52, losses: 0.812, 0.0905, 0.762, 0.0675, 0.722, 0.0686 (-1=>2.512) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.48, losses: 0.792, 0.0972, 0.748, 0.0681, 0.707, 0.0693 (-0=>2.482) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.46, losses: 0.788, 0.0928, 0.737, 0.0698, 0.697, 0.0711 (-3=>2.44) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.45, losses: 0.787, 0.0911, 0.737, 0.07, 0.691, 0.0723 (-13=>2.44) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.45, losses: 0.781, 0.0932, 0.738, 0.0701, 0.691, 0.0722 (-7=>2.431) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.41, losses: 0.772, 0.0917, 0.728, 0.0707, 0.676, 0.0748 (-0=>2.413) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.43, losses: 0.782, 0.0923, 0.734, 0.0708, 0.681, 0.074 (-10=>2.413) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.44, losses: 0.784, 0.0911, 0.731, 0.0708, 0.69, 0.073 (-20=>2.413) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.42, losses: 0.774, 0.092, 0.728, 0.0699, 0.679, 0.074 (-4=>2.407) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.42, losses: 0.775, 0.0921, 0.727, 0.0709, 0.679, 0.0737 (-2=>2.406) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.42, losses: 0.778, 0.0903, 0.728, 0.0706, 0.681, 0.0746 (-12=>2.406) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.42, losses: 0.776, 0.0915, 0.726, 0.0714, 0.679, 0.0741 (-22=>2.406) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.43, losses: 0.779, 0.0902, 0.727, 0.072, 0.684, 0.0751 (-32=>2.406) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.43, losses: 0.778, 0.0909, 0.73, 0.0715, 0.688, 0.0736 (-42=>2.406) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.42, losses: 0.773, 0.0908, 0.729, 0.0721, 0.678, 0.0753 (-52=>2.406) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.43, losses: 0.778, 0.0916, 0.731, 0.0714, 0.682, 0.0743 (-62=>2.406) 0it [00:01, ?it/s] Dropping learning rate 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.45, losses: 0.783, 0.0915, 0.737, 0.0718, 0.691, 0.0735 (-4=>2.421) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.45, losses: 0.784, 0.091, 0.738, 0.0726, 0.693, 0.0732 (-14=>2.421) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.45, losses: 0.786, 0.0915, 0.737, 0.0717, 0.69, 0.0744 (-24=>2.421) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.45, losses: 0.786, 0.0938, 0.733, 0.0725, 0.687, 0.074 (-34=>2.421) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.47, losses: 0.789, 0.0904, 0.744, 0.0718, 0.699, 0.0725 (-44=>2.421) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.45, losses: 0.784, 0.0927, 0.734, 0.0728, 0.688, 0.0745 (-54=>2.421) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.46, losses: 0.787, 0.0904, 0.74, 0.0715, 0.693, 0.0732 (-64=>2.421) 0it [00:01, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-74=>2.421) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092ID5r5re4ib7javlny4l65oziuecyStatusSucceededSourceWebHardware–Total durationCreatedInput
- prompts
- voyeuristic | surrealist art by Lorraine Fox
- settings
- custom_loss: edge edge_color: purple
{ "prompts": "voyeuristic | surrealist art by Lorraine Fox", "settings": "custom_loss: edge\nedge_color: purple\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", { input: { prompts: "voyeuristic | surrealist art by Lorraine Fox", settings: "custom_loss: edge\nedge_color: purple\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", input={ "prompts": "voyeuristic | surrealist art by Lorraine Fox", "settings": "custom_loss: edge\nedge_color: purple\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", "input": { "prompts": "voyeuristic | surrealist art by Lorraine Fox", "settings": "custom_loss: edge\\nedge_color: purple\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-23T05:49:59.851830Z", "created_at": "2022-01-23T05:44:07.400777Z", "data_removed": false, "error": null, "id": "5r5re4ib7javlny4l65oziuecy", "input": { "prompts": "voyeuristic | surrealist art by Lorraine Fox", "settings": "custom_loss: edge\nedge_color: purple\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n17260410470397499681\nLoaded CLIP RN50: 102.01M params\nLoaded CLIP ViT-B/32: 151.28M params\nLoaded CLIP ViT-B/16: 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['voyeuristic', 'surrealist art by Lorraine Fox']\nusing custom losses: edge\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 5.92, losses: 0.966, 1.04, 0.0878, 0.879, 0.949, 0.0662, 0.88, 0.927, 0.0646, 0.0628 (-0=>5.918)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 5.76, losses: 0.949, 0.998, 0.0892, 0.865, 0.909, 0.0633, 0.857, 0.901, 0.0623, 0.0692 (-2=>5.755)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 5.74, losses: 0.947, 0.992, 0.0891, 0.858, 0.908, 0.0627, 0.853, 0.899, 0.0628, 0.068 (-0=>5.739)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 5.73, losses: 0.951, 0.989, 0.0872, 0.861, 0.906, 0.063, 0.854, 0.891, 0.063, 0.0666 (-3=>5.727)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 5.72, losses: 0.953, 0.987, 0.0887, 0.86, 0.901, 0.0629, 0.862, 0.89, 0.063, 0.0571 (-1=>5.717)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 5.68, losses: 0.953, 0.975, 0.0912, 0.861, 0.89, 0.0636, 0.857, 0.874, 0.0629, 0.0515 (-1=>5.664)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 5.59, losses: 0.944, 0.96, 0.0907, 0.848, 0.876, 0.0645, 0.842, 0.864, 0.0619, 0.0433 (-1=>5.584)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 5.48, losses: 0.936, 0.926, 0.0887, 0.842, 0.847, 0.0658, 0.836, 0.838, 0.0616, 0.0378 (-1=>5.465)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 5.37, losses: 0.92, 0.898, 0.0904, 0.834, 0.821, 0.0687, 0.828, 0.818, 0.0623, 0.0334 (-1=>5.354)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 5.29, losses: 0.907, 0.879, 0.0882, 0.825, 0.81, 0.0694, 0.819, 0.797, 0.063, 0.0285 (-0=>5.286)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 5.23, losses: 0.906, 0.869, 0.0876, 0.82, 0.796, 0.0692, 0.81, 0.786, 0.0631, 0.0265 (-0=>5.233)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 5.22, losses: 0.899, 0.867, 0.0881, 0.821, 0.795, 0.0704, 0.811, 0.785, 0.0636, 0.0235 (-1=>5.219)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 5.22, losses: 0.902, 0.872, 0.0866, 0.821, 0.793, 0.07, 0.806, 0.784, 0.063, 0.0244 (-5=>5.205)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 5.2, losses: 0.899, 0.869, 0.088, 0.821, 0.785, 0.0707, 0.804, 0.778, 0.0635, 0.0242 (-1=>5.192)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 5.23, losses: 0.901, 0.872, 0.088, 0.827, 0.796, 0.0708, 0.81, 0.78, 0.064, 0.0246 (-1=>5.174)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 5.21, losses: 0.9, 0.868, 0.0895, 0.82, 0.788, 0.0708, 0.807, 0.783, 0.0631, 0.0247 (-11=>5.174)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 5.22, losses: 0.9, 0.871, 0.0865, 0.824, 0.792, 0.0693, 0.81, 0.782, 0.0637, 0.0252 (-21=>5.174)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 5.21, losses: 0.9, 0.865, 0.0888, 0.82, 0.789, 0.0707, 0.806, 0.779, 0.0627, 0.0253 (-31=>5.174)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 5.2, losses: 0.899, 0.861, 0.0893, 0.82, 0.784, 0.0709, 0.802, 0.782, 0.0629, 0.0259 (-41=>5.174)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 5.22, losses: 0.894, 0.872, 0.0881, 0.82, 0.796, 0.0701, 0.807, 0.782, 0.0634, 0.0264 (-51=>5.174)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 5.21, losses: 0.9, 0.866, 0.0881, 0.824, 0.791, 0.0698, 0.807, 0.777, 0.0637, 0.0267 (-61=>5.174)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 5.24, losses: 0.9, 0.879, 0.0905, 0.824, 0.793, 0.0705, 0.806, 0.788, 0.0628, 0.0272 (-71=>5.174)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 5.21, losses: 0.901, 0.867, 0.088, 0.82, 0.789, 0.0715, 0.803, 0.781, 0.0631, 0.0275 (-81=>5.174)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 5.23, losses: 0.902, 0.871, 0.0896, 0.824, 0.79, 0.0718, 0.807, 0.784, 0.0628, 0.0277 (-1=>5.184)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 5.21, losses: 0.9, 0.862, 0.0888, 0.821, 0.791, 0.0711, 0.802, 0.78, 0.0627, 0.0278 (-11=>5.184)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 5.22, losses: 0.9, 0.869, 0.0881, 0.823, 0.797, 0.0705, 0.807, 0.779, 0.063, 0.0281 (-21=>5.184)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 5.22, losses: 0.902, 0.871, 0.0876, 0.823, 0.789, 0.0709, 0.807, 0.779, 0.0635, 0.0284 (-31=>5.184)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 5.25, losses: 0.902, 0.876, 0.0886, 0.828, 0.796, 0.0708, 0.812, 0.787, 0.0634, 0.0288 (-41=>5.184)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 5.24, losses: 0.906, 0.871, 0.0876, 0.824, 0.795, 0.0698, 0.808, 0.786, 0.0626, 0.0291 (-51=>5.184)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 5.24, losses: 0.903, 0.874, 0.0867, 0.824, 0.796, 0.0709, 0.81, 0.785, 0.0629, 0.0294 (-61=>5.184)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-71=>5.184)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 352.272882, "total_time": 352.451053 }, "output": [ { "file": "https://replicate.delivery/mgxm/6918cb8e-c441-414d-b0d8-9334e89525c6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f1cfa94a-5b3a-463c-8fee-123a64a9a103/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4126de9f-e80a-4400-baa1-b275f3003f91/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/007192a0-b4c5-4771-94ef-7396252ea1b8/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1dcd0df5-625b-4802-8ce0-d796c0127f06/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/359816b4-9db8-46e5-ba73-3f0253fcc3e2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/936252eb-aa00-4e90-b11a-31cefe34380b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/634616fe-700c-40ea-b1c2-7b0df9e2b2ed/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a8bf7463-6602-413c-99c5-412cb44e1a6d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4617ce2d-6b68-4698-b696-4d0d8a73aeb7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a67a669e-3407-4aab-bd80-1b6089e723e4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5d1fe08b-5ff8-4fbb-ac92-ae5fa85dc36b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/38197dc9-66d7-4382-9b64-ca746bbbca4e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3bd94cea-fb97-4706-bc40-035db20d449a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/718c96e9-d041-47b6-9b9f-43eabb044985/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2af2a2e0-5f2b-418e-9d08-5f4b2f2df161/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9b2cc80e-1111-49c6-a9ca-dcb464c250fb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4488025a-e58a-4149-aa10-fb50dc0a1074/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6df1d0af-2198-423a-aa3e-cf73a9db2f45/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/eac783c9-b87e-48b6-bbba-c13e2d00f29a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6d4ddf44-9e30-4756-8128-9e7608badfa7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/113c6549-0488-4b6e-9b57-7a2b157e1663/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/cf8ada18-c8e9-4519-bd97-8051b736f0aa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/17539a55-7e88-4f4f-8aea-370bbdadf4a8/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/20b9a0a2-358d-4b30-9942-b8ab59344644/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3dc14c6d-792e-4387-93c7-c212b7933ed1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b9ec769c-3384-434a-bc2c-8e0877967698/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/222b3905-f9b2-4532-929d-99270487a870/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/508f8667-dd2f-4294-bd4e-1d2c9e429b46/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c7181b5b-9bbe-4bd1-9df5-3fe6e03a09c7/tempfile.png" } ], "started_at": "2022-01-23T05:44:07.578948Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/5r5re4ib7javlny4l65oziuecy", "cancel": "https://api.replicate.com/v1/predictions/5r5re4ib7javlny4l65oziuecy/cancel" }, "version": "3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092" }
Generated in---> BasePixrayPredictor Predict Using seed: 17260410470397499681 Loaded CLIP RN50: 102.01M params Loaded CLIP ViT-B/32: 151.28M params Loaded CLIP ViT-B/16: 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['voyeuristic', 'surrealist art by Lorraine Fox'] using custom losses: edge 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 5.92, losses: 0.966, 1.04, 0.0878, 0.879, 0.949, 0.0662, 0.88, 0.927, 0.0646, 0.0628 (-0=>5.918) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 5.76, losses: 0.949, 0.998, 0.0892, 0.865, 0.909, 0.0633, 0.857, 0.901, 0.0623, 0.0692 (-2=>5.755) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 5.74, losses: 0.947, 0.992, 0.0891, 0.858, 0.908, 0.0627, 0.853, 0.899, 0.0628, 0.068 (-0=>5.739) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 5.73, losses: 0.951, 0.989, 0.0872, 0.861, 0.906, 0.063, 0.854, 0.891, 0.063, 0.0666 (-3=>5.727) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 5.72, losses: 0.953, 0.987, 0.0887, 0.86, 0.901, 0.0629, 0.862, 0.89, 0.063, 0.0571 (-1=>5.717) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 5.68, losses: 0.953, 0.975, 0.0912, 0.861, 0.89, 0.0636, 0.857, 0.874, 0.0629, 0.0515 (-1=>5.664) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 5.59, losses: 0.944, 0.96, 0.0907, 0.848, 0.876, 0.0645, 0.842, 0.864, 0.0619, 0.0433 (-1=>5.584) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 5.48, losses: 0.936, 0.926, 0.0887, 0.842, 0.847, 0.0658, 0.836, 0.838, 0.0616, 0.0378 (-1=>5.465) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 5.37, losses: 0.92, 0.898, 0.0904, 0.834, 0.821, 0.0687, 0.828, 0.818, 0.0623, 0.0334 (-1=>5.354) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 5.29, losses: 0.907, 0.879, 0.0882, 0.825, 0.81, 0.0694, 0.819, 0.797, 0.063, 0.0285 (-0=>5.286) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 5.23, losses: 0.906, 0.869, 0.0876, 0.82, 0.796, 0.0692, 0.81, 0.786, 0.0631, 0.0265 (-0=>5.233) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 5.22, losses: 0.899, 0.867, 0.0881, 0.821, 0.795, 0.0704, 0.811, 0.785, 0.0636, 0.0235 (-1=>5.219) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 5.22, losses: 0.902, 0.872, 0.0866, 0.821, 0.793, 0.07, 0.806, 0.784, 0.063, 0.0244 (-5=>5.205) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 5.2, losses: 0.899, 0.869, 0.088, 0.821, 0.785, 0.0707, 0.804, 0.778, 0.0635, 0.0242 (-1=>5.192) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 5.23, losses: 0.901, 0.872, 0.088, 0.827, 0.796, 0.0708, 0.81, 0.78, 0.064, 0.0246 (-1=>5.174) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 5.21, losses: 0.9, 0.868, 0.0895, 0.82, 0.788, 0.0708, 0.807, 0.783, 0.0631, 0.0247 (-11=>5.174) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 5.22, losses: 0.9, 0.871, 0.0865, 0.824, 0.792, 0.0693, 0.81, 0.782, 0.0637, 0.0252 (-21=>5.174) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 5.21, losses: 0.9, 0.865, 0.0888, 0.82, 0.789, 0.0707, 0.806, 0.779, 0.0627, 0.0253 (-31=>5.174) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 5.2, losses: 0.899, 0.861, 0.0893, 0.82, 0.784, 0.0709, 0.802, 0.782, 0.0629, 0.0259 (-41=>5.174) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 5.22, losses: 0.894, 0.872, 0.0881, 0.82, 0.796, 0.0701, 0.807, 0.782, 0.0634, 0.0264 (-51=>5.174) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 5.21, losses: 0.9, 0.866, 0.0881, 0.824, 0.791, 0.0698, 0.807, 0.777, 0.0637, 0.0267 (-61=>5.174) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 5.24, losses: 0.9, 0.879, 0.0905, 0.824, 0.793, 0.0705, 0.806, 0.788, 0.0628, 0.0272 (-71=>5.174) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 5.21, losses: 0.901, 0.867, 0.088, 0.82, 0.789, 0.0715, 0.803, 0.781, 0.0631, 0.0275 (-81=>5.174) 0it [00:00, ?it/s] Dropping learning rate 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 5.23, losses: 0.902, 0.871, 0.0896, 0.824, 0.79, 0.0718, 0.807, 0.784, 0.0628, 0.0277 (-1=>5.184) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 5.21, losses: 0.9, 0.862, 0.0888, 0.821, 0.791, 0.0711, 0.802, 0.78, 0.0627, 0.0278 (-11=>5.184) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 5.22, losses: 0.9, 0.869, 0.0881, 0.823, 0.797, 0.0705, 0.807, 0.779, 0.063, 0.0281 (-21=>5.184) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 5.22, losses: 0.902, 0.871, 0.0876, 0.823, 0.789, 0.0709, 0.807, 0.779, 0.0635, 0.0284 (-31=>5.184) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 5.25, losses: 0.902, 0.876, 0.0886, 0.828, 0.796, 0.0708, 0.812, 0.787, 0.0634, 0.0288 (-41=>5.184) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 5.24, losses: 0.906, 0.871, 0.0876, 0.824, 0.795, 0.0698, 0.808, 0.786, 0.0626, 0.0291 (-51=>5.184) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 5.24, losses: 0.903, 0.874, 0.0867, 0.824, 0.796, 0.0709, 0.81, 0.785, 0.0629, 0.0294 (-61=>5.184) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-71=>5.184) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092Input
- prompts
- the final boss is an evil version of rainbow brite #pixelart #gameart
- settings
- drawer: pixel custom_loss: edge edge_color: black
{ "prompts": "the final boss is an evil version of rainbow brite #pixelart #gameart", "settings": "drawer: pixel\ncustom_loss: edge\nedge_color: black" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", { input: { prompts: "the final boss is an evil version of rainbow brite #pixelart #gameart", settings: "drawer: pixel\ncustom_loss: edge\nedge_color: black" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", input={ "prompts": "the final boss is an evil version of rainbow brite #pixelart #gameart", "settings": "drawer: pixel\ncustom_loss: edge\nedge_color: black" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", "input": { "prompts": "the final boss is an evil version of rainbow brite #pixelart #gameart", "settings": "drawer: pixel\\ncustom_loss: edge\\nedge_color: black" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-27T03:16:44.343271Z", "created_at": "2022-01-27T03:09:41.253314Z", "data_removed": false, "error": null, "id": "yiguibfw6vbfzc3qcfp2wzrl5y", "input": { "prompts": "the final boss is an evil version of rainbow brite #pixelart #gameart", "settings": "drawer: pixel\ncustom_loss: edge\nedge_color: black" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n1866344475936812839\nRunning pixeldrawer with 80x45 grid\nLoaded CLIP RN50: 102.01M params\nLoaded CLIP ViT-B/32: 151.28M params\nLoaded CLIP ViT-B/16: 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['the final boss is an evil version of rainbow brite #pixelart #gameart']\nusing custom losses: edge\n\n0it [00:00, ?it/s]\niter: 0, loss: 3.07, losses: 0.973, 0.085, 0.879, 0.0616, 0.889, 0.0643, 0.116 (-0=>3.067)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.72, losses: 0.868, 0.0869, 0.776, 0.066, 0.778, 0.0643, 0.0824 (-0=>2.722)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.53, losses: 0.809, 0.0879, 0.709, 0.0668, 0.73, 0.0667, 0.0573 (-1=>2.524)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.4, losses: 0.767, 0.0873, 0.673, 0.0678, 0.692, 0.0691, 0.0397 (-0=>2.396)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.33, losses: 0.75, 0.0881, 0.649, 0.0701, 0.678, 0.0699, 0.0283 (-1=>2.326)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.29, losses: 0.737, 0.0901, 0.636, 0.0722, 0.661, 0.07, 0.0217 (-0=>2.288)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.25, losses: 0.725, 0.0899, 0.626, 0.0725, 0.647, 0.0713, 0.0176 (-0=>2.249)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.25, losses: 0.727, 0.0898, 0.628, 0.072, 0.65, 0.0708, 0.0148 (-1=>2.222)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.24, losses: 0.729, 0.0909, 0.622, 0.0728, 0.641, 0.07, 0.0131 (-3=>2.205)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.21, losses: 0.71, 0.091, 0.615, 0.074, 0.632, 0.0721, 0.012 (-3=>2.194)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.2, losses: 0.71, 0.0911, 0.612, 0.0734, 0.633, 0.0724, 0.0112 (-1=>2.19)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.19, losses: 0.707, 0.0919, 0.609, 0.0734, 0.631, 0.0717, 0.0103 (-3=>2.172)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.17, losses: 0.698, 0.0915, 0.6, 0.0748, 0.623, 0.073, 0.00956 (-5=>2.152)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.16, losses: 0.697, 0.0914, 0.596, 0.0751, 0.616, 0.073, 0.00927 (-3=>2.145)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.16, losses: 0.697, 0.0913, 0.595, 0.0756, 0.62, 0.0732, 0.00886 (-1=>2.134)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.17, losses: 0.702, 0.0907, 0.599, 0.0743, 0.623, 0.0726, 0.00837 (-3=>2.133)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.15, losses: 0.693, 0.0908, 0.595, 0.0747, 0.611, 0.0729, 0.00849 (-13=>2.133)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.15, losses: 0.689, 0.0917, 0.594, 0.0749, 0.617, 0.072, 0.00814 (-23=>2.133)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.14, losses: 0.688, 0.0915, 0.59, 0.0756, 0.61, 0.0741, 0.00799 (-5=>2.125)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.14, losses: 0.685, 0.0915, 0.592, 0.0745, 0.611, 0.0734, 0.008 (-5=>2.111)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.13, losses: 0.687, 0.0919, 0.589, 0.0751, 0.607, 0.0738, 0.0078 (-15=>2.111)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.15, losses: 0.69, 0.0906, 0.599, 0.074, 0.614, 0.0727, 0.0076 (-5=>2.103)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.12, losses: 0.687, 0.0922, 0.585, 0.076, 0.603, 0.0739, 0.00751 (-7=>2.102)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.13, losses: 0.69, 0.0923, 0.59, 0.0758, 0.601, 0.0737, 0.00753 (-3=>2.105)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.12, losses: 0.683, 0.0913, 0.587, 0.0759, 0.603, 0.0737, 0.00738 (-7=>2.096)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.13, losses: 0.688, 0.0917, 0.59, 0.0751, 0.604, 0.0734, 0.00727 (-3=>2.092)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.12, losses: 0.686, 0.0919, 0.586, 0.0751, 0.602, 0.0735, 0.00715 (-13=>2.092)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.1, losses: 0.672, 0.0914, 0.584, 0.0751, 0.599, 0.0742, 0.00707 (-3=>2.086)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.11, losses: 0.678, 0.0915, 0.584, 0.0758, 0.598, 0.0741, 0.00699 (-13=>2.086)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.11, losses: 0.681, 0.0915, 0.59, 0.0756, 0.597, 0.0731, 0.00688 (-7=>2.07)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-17=>2.07)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 422.8466, "total_time": 423.089957 }, "output": [ { "file": "https://replicate.delivery/mgxm/a53ce853-01f6-473c-b07d-619e104015d1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4e59dd0a-cd75-4932-8096-1412eaed729e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9d6d0ecb-24d8-4fc9-aba1-e317be32877c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1b27b510-153a-405d-9f80-c38899103915/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/23c7ff1e-da4a-44fa-88d9-074aa61d4478/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d2b4c989-c411-4734-bb87-71f8e6359a2b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b25490b7-f8d0-4374-b663-2da0e5213420/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8669ecfb-375a-485d-8240-53d0a9df3a5e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/81d057f4-3fba-441d-9002-b37026d1c576/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/32a6e614-5920-4362-8c4b-56a0bd8d8978/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/30079911-c394-4d66-b0d9-ab5bf41dbcc9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/64fa61a7-dbbf-4fc2-9b10-ba0468dc0a05/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/10c84f6b-e0c6-40bb-a78e-b909d51dd05a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9a9169f2-5861-4897-809b-d8b8bbd2852a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/74fe4515-c668-4c65-86b3-af571a219274/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d7da5443-107e-4e8f-89e2-c5b90a2d3f70/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0d495b1e-e7a4-4405-a3ee-af5b0583e7ea/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e6235ef4-5446-4ca5-9958-2afe268f63b6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e8e446cf-03d6-4dc2-857e-4fde3ccd525d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/696f284c-8d9b-47f0-8c8d-e88544bdb15a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/bc8b5028-1949-4db4-b65b-e8d83293120d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0a358272-fe8c-4e09-820f-a59081cf52bb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ec2b52f8-954d-4b9d-b623-6aecbe8c8b30/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f1401b06-8ffc-4aae-bea1-92363dcf8a8a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/56136980-7c00-4cdc-ae4b-2ae3d6ba1ee2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/481553e1-7765-4a2a-a9c3-4ea058ab5f23/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d882c498-4539-4d54-96c8-d2b7b5ea5b62/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/bbb69137-c9fe-4a39-b638-88c2f9c477b9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/76ef9bff-a229-4911-a32c-0ac646863369/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e1daa929-3094-4f16-82a9-58c009267e92/tempfile.png" } ], "started_at": "2022-01-27T03:09:41.496671Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/yiguibfw6vbfzc3qcfp2wzrl5y", "cancel": "https://api.replicate.com/v1/predictions/yiguibfw6vbfzc3qcfp2wzrl5y/cancel" }, "version": "3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092" }
Generated in---> BasePixrayPredictor Predict Using seed: 1866344475936812839 Running pixeldrawer with 80x45 grid Loaded CLIP RN50: 102.01M params Loaded CLIP ViT-B/32: 151.28M params Loaded CLIP ViT-B/16: 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['the final boss is an evil version of rainbow brite #pixelart #gameart'] using custom losses: edge 0it [00:00, ?it/s] iter: 0, loss: 3.07, losses: 0.973, 0.085, 0.879, 0.0616, 0.889, 0.0643, 0.116 (-0=>3.067) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.72, losses: 0.868, 0.0869, 0.776, 0.066, 0.778, 0.0643, 0.0824 (-0=>2.722) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.53, losses: 0.809, 0.0879, 0.709, 0.0668, 0.73, 0.0667, 0.0573 (-1=>2.524) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.4, losses: 0.767, 0.0873, 0.673, 0.0678, 0.692, 0.0691, 0.0397 (-0=>2.396) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.33, losses: 0.75, 0.0881, 0.649, 0.0701, 0.678, 0.0699, 0.0283 (-1=>2.326) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.29, losses: 0.737, 0.0901, 0.636, 0.0722, 0.661, 0.07, 0.0217 (-0=>2.288) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.25, losses: 0.725, 0.0899, 0.626, 0.0725, 0.647, 0.0713, 0.0176 (-0=>2.249) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.25, losses: 0.727, 0.0898, 0.628, 0.072, 0.65, 0.0708, 0.0148 (-1=>2.222) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.24, losses: 0.729, 0.0909, 0.622, 0.0728, 0.641, 0.07, 0.0131 (-3=>2.205) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.21, losses: 0.71, 0.091, 0.615, 0.074, 0.632, 0.0721, 0.012 (-3=>2.194) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.2, losses: 0.71, 0.0911, 0.612, 0.0734, 0.633, 0.0724, 0.0112 (-1=>2.19) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.19, losses: 0.707, 0.0919, 0.609, 0.0734, 0.631, 0.0717, 0.0103 (-3=>2.172) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.17, losses: 0.698, 0.0915, 0.6, 0.0748, 0.623, 0.073, 0.00956 (-5=>2.152) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.16, losses: 0.697, 0.0914, 0.596, 0.0751, 0.616, 0.073, 0.00927 (-3=>2.145) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.16, losses: 0.697, 0.0913, 0.595, 0.0756, 0.62, 0.0732, 0.00886 (-1=>2.134) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.17, losses: 0.702, 0.0907, 0.599, 0.0743, 0.623, 0.0726, 0.00837 (-3=>2.133) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.15, losses: 0.693, 0.0908, 0.595, 0.0747, 0.611, 0.0729, 0.00849 (-13=>2.133) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.15, losses: 0.689, 0.0917, 0.594, 0.0749, 0.617, 0.072, 0.00814 (-23=>2.133) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.14, losses: 0.688, 0.0915, 0.59, 0.0756, 0.61, 0.0741, 0.00799 (-5=>2.125) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.14, losses: 0.685, 0.0915, 0.592, 0.0745, 0.611, 0.0734, 0.008 (-5=>2.111) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.13, losses: 0.687, 0.0919, 0.589, 0.0751, 0.607, 0.0738, 0.0078 (-15=>2.111) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.15, losses: 0.69, 0.0906, 0.599, 0.074, 0.614, 0.0727, 0.0076 (-5=>2.103) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.12, losses: 0.687, 0.0922, 0.585, 0.076, 0.603, 0.0739, 0.00751 (-7=>2.102) 0it [00:00, ?it/s] Dropping learning rate 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.13, losses: 0.69, 0.0923, 0.59, 0.0758, 0.601, 0.0737, 0.00753 (-3=>2.105) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.12, losses: 0.683, 0.0913, 0.587, 0.0759, 0.603, 0.0737, 0.00738 (-7=>2.096) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.13, losses: 0.688, 0.0917, 0.59, 0.0751, 0.604, 0.0734, 0.00727 (-3=>2.092) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.12, losses: 0.686, 0.0919, 0.586, 0.0751, 0.602, 0.0735, 0.00715 (-13=>2.092) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.1, losses: 0.672, 0.0914, 0.584, 0.0751, 0.599, 0.0742, 0.00707 (-3=>2.086) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.11, losses: 0.678, 0.0915, 0.584, 0.0758, 0.598, 0.0741, 0.00699 (-13=>2.086) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.11, losses: 0.681, 0.0915, 0.59, 0.0756, 0.597, 0.0731, 0.00688 (-7=>2.07) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-17=>2.07) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092IDctxbzuyghnh7lgg54l5ew7dqxqStatusSucceededSourceWebHardware–Total durationCreatedInput
- prompts
- College classroom by Katarzyna Kobro
- settings
{ "prompts": "College classroom by Katarzyna Kobro", "settings": "\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", { input: { prompts: "College classroom by Katarzyna Kobro", settings: "\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", input={ "prompts": "College classroom by Katarzyna Kobro", "settings": "\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092", "input": { "prompts": "College classroom by Katarzyna Kobro", "settings": "\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-26T16:23:02.778999Z", "created_at": "2022-01-26T16:16:26.560013Z", "data_removed": false, "error": null, "id": "ctxbzuyghnh7lgg54l5ew7dqxq", "input": { "prompts": "College classroom by Katarzyna Kobro", "settings": "\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n15169609835611474252\nLoaded CLIP RN50: 102.01M params\nLoaded CLIP ViT-B/32: 151.28M params\nLoaded CLIP ViT-B/16: 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['College classroom by Katarzyna Kobro']\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 3.17, losses: 1.05, 0.0911, 0.991, 0.0647, 0.915, 0.0651 (-0=>3.173)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 3.1, losses: 1.02, 0.0885, 0.959, 0.0635, 0.9, 0.0645 (-1=>3.097)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 3.08, losses: 1.01, 0.0896, 0.96, 0.0632, 0.892, 0.0642 (-1=>3.068)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 3.06, losses: 1.01, 0.0905, 0.949, 0.0637, 0.888, 0.0632 (-3=>3.059)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.9, losses: 0.951, 0.0935, 0.881, 0.0654, 0.843, 0.0633 (-0=>2.898)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.79, losses: 0.912, 0.0943, 0.842, 0.0682, 0.813, 0.0637 (-0=>2.792)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.73, losses: 0.884, 0.0944, 0.832, 0.0687, 0.791, 0.0643 (-0=>2.735)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.67, losses: 0.869, 0.0937, 0.806, 0.0667, 0.771, 0.0634 (-0=>2.67)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.63, losses: 0.85, 0.095, 0.791, 0.0682, 0.76, 0.0645 (-0=>2.628)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.59, losses: 0.845, 0.0947, 0.779, 0.0674, 0.745, 0.0635 (-1=>2.59)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.56, losses: 0.836, 0.0938, 0.768, 0.0674, 0.733, 0.0642 (-3=>2.56)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.56, losses: 0.833, 0.0951, 0.766, 0.0676, 0.733, 0.0641 (-2=>2.542)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.53, losses: 0.826, 0.0928, 0.762, 0.067, 0.722, 0.0645 (-5=>2.526)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.56, losses: 0.837, 0.0931, 0.765, 0.0668, 0.733, 0.064 (-4=>2.522)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.53, losses: 0.816, 0.0943, 0.763, 0.0688, 0.719, 0.0645 (-7=>2.503)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.52, losses: 0.819, 0.0935, 0.753, 0.0671, 0.727, 0.0642 (-1=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.54, losses: 0.83, 0.0924, 0.753, 0.0677, 0.728, 0.0643 (-11=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.51, losses: 0.818, 0.0932, 0.752, 0.0678, 0.716, 0.0643 (-5=>2.492)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.51, losses: 0.819, 0.0927, 0.752, 0.0672, 0.719, 0.0644 (-15=>2.492)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.5, losses: 0.813, 0.0935, 0.747, 0.0671, 0.716, 0.0645 (-25=>2.492)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.53, losses: 0.823, 0.0925, 0.758, 0.0676, 0.723, 0.0641 (-8=>2.491)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.53, losses: 0.826, 0.094, 0.754, 0.0671, 0.722, 0.0645 (-18=>2.491)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.49, losses: 0.807, 0.0938, 0.743, 0.0678, 0.714, 0.0649 (-0=>2.491)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.51, losses: 0.817, 0.093, 0.752, 0.0674, 0.717, 0.0641 (-2=>2.503)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.52, losses: 0.819, 0.0931, 0.753, 0.0674, 0.72, 0.0646 (-12=>2.503)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.52, losses: 0.823, 0.0921, 0.749, 0.0672, 0.721, 0.0645 (-2=>2.501)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.51, losses: 0.813, 0.0948, 0.751, 0.0677, 0.715, 0.0645 (-12=>2.501)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.52, losses: 0.822, 0.0937, 0.751, 0.0673, 0.725, 0.0645 (-22=>2.501)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.53, losses: 0.82, 0.0935, 0.757, 0.0667, 0.727, 0.0648 (-32=>2.501)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.53, losses: 0.824, 0.0924, 0.755, 0.0672, 0.725, 0.0644 (-9=>2.498)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-19=>2.498)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 392.437032, "total_time": 396.218986 }, "output": [ { "file": "https://replicate.delivery/mgxm/aeeb4186-1bce-431f-b982-852008760a38/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/38e3e69b-10f7-41c7-bde4-91ac0c1a844f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3db4bf46-621b-43c5-b2de-e2d08942cbb0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e715e840-75c6-4e39-8e2e-39dbaf35e9fb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/18437587-f830-49ff-bcde-e98fe269e559/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fe04b1b0-45a3-419b-9fbc-5a9d794cfe4d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/698305a8-5c76-4de8-bae5-78643123f069/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/fb826162-7bc6-4c24-a6e1-43a97d19a813/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8f218f0f-c8b4-4f39-8945-a92de527c1fd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f892c9c3-a3bc-4436-aee2-95078c89c32e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a0e42f26-7987-413f-b800-a8b7018b1c50/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2e6b4cc6-1942-4d38-9139-b63f208e4c5e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ba44ba3f-6dd3-4c76-ae49-dbdb6790abe5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/82062470-b449-4a86-8139-ff8b7c8e7c1a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c79c2680-41a0-4347-b6c7-3af6319fe5bf/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0943c2ad-15b0-48f8-93ca-743152233ee1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/bb73fffe-1e7b-44a2-b517-0e68d2b24fff/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/383e1f12-3fc7-43bb-b1ad-7fa67f3d49f6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0ed624bc-c253-436c-b375-3e8c07aa1c7b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/45e41585-55c1-4c68-bde4-3a26ef54d24e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d90fe601-b068-4c83-a7af-8c76f68ce82e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1765d498-55c4-44ed-8c89-e06e97face09/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/50373acf-b9a8-4c25-873c-b5220fd661f0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/73ee14a8-df42-4e7e-82f3-0fdfe4f64e82/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b74bb25b-fc5d-43d8-ab51-d54a71c0a0b2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c36977a2-0128-4a94-87b9-819c06fed630/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e97c4c78-0c44-40d1-8e10-5579eed6b552/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7d41c11b-a5fe-499b-86c8-375d635f8de5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/88cd403a-c587-4669-8409-c11e450968a0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/17489d86-982f-4a5d-b184-65e93cee9074/tempfile.png" } ], "started_at": "2022-01-26T16:16:30.341967Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ctxbzuyghnh7lgg54l5ew7dqxq", "cancel": "https://api.replicate.com/v1/predictions/ctxbzuyghnh7lgg54l5ew7dqxq/cancel" }, "version": "3cd30ff3fbbe99c4bee36976b6d275233f635a3d980b708c404f82aea85f5092" }
Generated in---> BasePixrayPredictor Predict Using seed: 15169609835611474252 Loaded CLIP RN50: 102.01M params Loaded CLIP ViT-B/32: 151.28M params Loaded CLIP ViT-B/16: 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['College classroom by Katarzyna Kobro'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 3.17, losses: 1.05, 0.0911, 0.991, 0.0647, 0.915, 0.0651 (-0=>3.173) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 3.1, losses: 1.02, 0.0885, 0.959, 0.0635, 0.9, 0.0645 (-1=>3.097) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 3.08, losses: 1.01, 0.0896, 0.96, 0.0632, 0.892, 0.0642 (-1=>3.068) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 3.06, losses: 1.01, 0.0905, 0.949, 0.0637, 0.888, 0.0632 (-3=>3.059) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.9, losses: 0.951, 0.0935, 0.881, 0.0654, 0.843, 0.0633 (-0=>2.898) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.79, losses: 0.912, 0.0943, 0.842, 0.0682, 0.813, 0.0637 (-0=>2.792) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.73, losses: 0.884, 0.0944, 0.832, 0.0687, 0.791, 0.0643 (-0=>2.735) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.67, losses: 0.869, 0.0937, 0.806, 0.0667, 0.771, 0.0634 (-0=>2.67) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.63, losses: 0.85, 0.095, 0.791, 0.0682, 0.76, 0.0645 (-0=>2.628) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.59, losses: 0.845, 0.0947, 0.779, 0.0674, 0.745, 0.0635 (-1=>2.59) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.56, losses: 0.836, 0.0938, 0.768, 0.0674, 0.733, 0.0642 (-3=>2.56) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.56, losses: 0.833, 0.0951, 0.766, 0.0676, 0.733, 0.0641 (-2=>2.542) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.53, losses: 0.826, 0.0928, 0.762, 0.067, 0.722, 0.0645 (-5=>2.526) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.56, losses: 0.837, 0.0931, 0.765, 0.0668, 0.733, 0.064 (-4=>2.522) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.53, losses: 0.816, 0.0943, 0.763, 0.0688, 0.719, 0.0645 (-7=>2.503) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.52, losses: 0.819, 0.0935, 0.753, 0.0671, 0.727, 0.0642 (-1=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.54, losses: 0.83, 0.0924, 0.753, 0.0677, 0.728, 0.0643 (-11=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.51, losses: 0.818, 0.0932, 0.752, 0.0678, 0.716, 0.0643 (-5=>2.492) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.51, losses: 0.819, 0.0927, 0.752, 0.0672, 0.719, 0.0644 (-15=>2.492) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.5, losses: 0.813, 0.0935, 0.747, 0.0671, 0.716, 0.0645 (-25=>2.492) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.53, losses: 0.823, 0.0925, 0.758, 0.0676, 0.723, 0.0641 (-8=>2.491) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.53, losses: 0.826, 0.094, 0.754, 0.0671, 0.722, 0.0645 (-18=>2.491) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.49, losses: 0.807, 0.0938, 0.743, 0.0678, 0.714, 0.0649 (-0=>2.491) 0it [00:00, ?it/s] Dropping learning rate 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.51, losses: 0.817, 0.093, 0.752, 0.0674, 0.717, 0.0641 (-2=>2.503) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.52, losses: 0.819, 0.0931, 0.753, 0.0674, 0.72, 0.0646 (-12=>2.503) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.52, losses: 0.823, 0.0921, 0.749, 0.0672, 0.721, 0.0645 (-2=>2.501) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.51, losses: 0.813, 0.0948, 0.751, 0.0677, 0.715, 0.0645 (-12=>2.501) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.52, losses: 0.822, 0.0937, 0.751, 0.0673, 0.725, 0.0645 (-22=>2.501) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.53, losses: 0.82, 0.0935, 0.757, 0.0667, 0.727, 0.0648 (-32=>2.501) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.53, losses: 0.824, 0.0924, 0.755, 0.0672, 0.725, 0.0644 (-9=>2.498) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-19=>2.498) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:9db17c116ea5cb19530a24901915193eb23348309cb86e513a9ec24d730a0ca5IDtorqp2wodfhktoageo5aum55aqStatusSucceededSourceWebHardware–Total durationCreatedInput
- drawer
- vqgan
- prompts
- Manhattan skyline at sunset. #artstation 🌇
- settings
{ "drawer": "vqgan", "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:9db17c116ea5cb19530a24901915193eb23348309cb86e513a9ec24d730a0ca5", { input: { drawer: "vqgan", prompts: "Manhattan skyline at sunset. #artstation 🌇", settings: "\n" } } ); // 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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:9db17c116ea5cb19530a24901915193eb23348309cb86e513a9ec24d730a0ca5", input={ "drawer": "vqgan", "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:9db17c116ea5cb19530a24901915193eb23348309cb86e513a9ec24d730a0ca5", "input": { "drawer": "vqgan", "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-03-28T16:02:07.955941Z", "created_at": "2022-03-28T15:59:15.041423Z", "data_removed": false, "error": null, "id": "torqp2wodfhktoageo5aum55aq", "input": { "drawer": "vqgan", "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed: 13165604375926880482\nreusing cached copy of model models/vqgan_imagenet_f16_16384.ckpt\nAll CLIP models already loaded: ['ViT-B/32', 'ViT-B/16']\nUsing device: cuda:0\nOptimising using: Adam\nUsing text prompts: ['Manhattan skyline at sunset. #artstation 🌇']\n\n0it [00:00, ?it/s]\niter: 0, loss: 2.09, losses: 0.998, 0.0613, 0.971, 0.0632 (-0=>2.093)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 1.79, losses: 0.841, 0.0616, 0.829, 0.0623 (-0=>1.794)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 1.74, losses: 0.815, 0.0639, 0.799, 0.0627 (-1=>1.728)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 1.69, losses: 0.785, 0.0638, 0.782, 0.0627 (-1=>1.671)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 1.66, losses: 0.766, 0.0641, 0.767, 0.0627 (-3=>1.657)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 1.64, losses: 0.759, 0.0646, 0.757, 0.0625 (-1=>1.633)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 1.62, losses: 0.746, 0.0642, 0.743, 0.0633 (-1=>1.61)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\niter: 70, loss: 1.62, losses: 0.747, 0.0639, 0.748, 0.0633 (-3=>1.597)\n0it [00:00, ?it/s]\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 1.58, losses: 0.722, 0.0647, 0.726, 0.0637 (-0=>1.576)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 1.6, losses: 0.739, 0.0657, 0.726, 0.0644 (-3=>1.575)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 1.58, losses: 0.726, 0.0664, 0.719, 0.064 (-5=>1.56)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 1.58, losses: 0.728, 0.0661, 0.722, 0.0642 (-15=>1.56)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 1.56, losses: 0.718, 0.0664, 0.709, 0.0645 (-2=>1.557)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 1.56, losses: 0.718, 0.0678, 0.71, 0.0646 (-8=>1.544)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 1.56, losses: 0.719, 0.067, 0.706, 0.0644 (-18=>1.544)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 1.56, losses: 0.719, 0.0658, 0.709, 0.0636 (-28=>1.544)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 1.56, losses: 0.716, 0.0664, 0.708, 0.0645 (-7=>1.533)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 1.54, losses: 0.711, 0.0678, 0.698, 0.0647 (-17=>1.533)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 1.54, losses: 0.708, 0.0685, 0.696, 0.066 (-7=>1.528)\n\n\nDropping learning rate\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 1.54, losses: 0.704, 0.0682, 0.698, 0.0663 (-1=>1.53)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\niter: 200, loss: 1.55, losses: 0.713, 0.0676, 0.7, 0.0655 (-6=>1.525)\n0it [00:00, ?it/s]\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 1.52, losses: 0.699, 0.0676, 0.689, 0.0663 (-5=>1.522)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 1.54, losses: 0.705, 0.0685, 0.699, 0.066 (-5=>1.517)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 1.53, losses: 0.699, 0.0677, 0.696, 0.065 (-15=>1.517)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 1.53, losses: 0.704, 0.068, 0.694, 0.0651 (-8=>1.516)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, finished (-18=>1.516)\n\n\n0it [00:00, ?it/s]\n0it [00:00, ?it/s]", "metrics": { "predict_time": 164.578, "total_time": 172.914518 }, "output": [ "https://replicate.delivery/mgxm/7848eaf2-1563-4713-b3c9-51dce368d534/tempfile.png", "https://replicate.delivery/mgxm/1f2487b2-cd4c-4699-9a29-88b0b7bb36ab/tempfile.png", "https://replicate.delivery/mgxm/3c1e670c-94a4-46b5-a1e6-52cd625a5ef9/tempfile.png", "https://replicate.delivery/mgxm/d98880d2-0338-4eb7-89e0-5593079c84c4/tempfile.png", "https://replicate.delivery/mgxm/eecc7233-37f1-4ac2-9430-b8b72122efac/tempfile.png", "https://replicate.delivery/mgxm/f05f7b1c-d38e-427d-87d0-e1f0906f4ae1/tempfile.png", "https://replicate.delivery/mgxm/f2af2ac7-1d10-47ff-8a84-0cc0fc72336b/tempfile.png", "https://replicate.delivery/mgxm/798bdfca-6501-40f8-9831-11c31029b058/tempfile.png", "https://replicate.delivery/mgxm/41c6dac7-0c0c-4428-bafe-65478124c929/tempfile.png", "https://replicate.delivery/mgxm/8a254e0d-b35d-468b-80f7-b11894724bce/tempfile.png", "https://replicate.delivery/mgxm/9d1280c6-9730-4b04-8b42-c6ad8fa8c581/tempfile.png", "https://replicate.delivery/mgxm/35deb301-ebfc-4f1f-a397-fac69b1a44bb/tempfile.png", "https://replicate.delivery/mgxm/b8dce460-fd58-4cf9-9c07-ae2c5a7970ab/tempfile.png", "https://replicate.delivery/mgxm/081e5bbe-1b27-4ba5-a18c-4609416be6e3/tempfile.png", "https://replicate.delivery/mgxm/5890bd0d-b80a-467a-9ddd-ae2defcda2a8/tempfile.png", "https://replicate.delivery/mgxm/8a84ab5a-7c54-46a4-8037-3ec139378e55/tempfile.png", "https://replicate.delivery/mgxm/1546c50f-f2fb-43fe-8def-7a92e580a1cd/tempfile.png", "https://replicate.delivery/mgxm/34da9565-f8c7-402a-b4d1-f3d9c02f881c/tempfile.png", "https://replicate.delivery/mgxm/64de15e4-636a-4af1-a843-ebaf196872c5/tempfile.png", "https://replicate.delivery/mgxm/73b3c1ac-e613-4a84-af9c-31fab961c3c6/tempfile.png", "https://replicate.delivery/mgxm/d897ef09-7008-46f6-80b4-d8cf45c1bbbf/tempfile.png", "https://replicate.delivery/mgxm/cb4476c5-160b-4dd2-8e00-1d1e8944d5ce/tempfile.png", "https://replicate.delivery/mgxm/b7c2907a-d5db-4568-8bf5-1a53b036f9be/tempfile.png", "https://replicate.delivery/mgxm/4792d1c2-ed40-4fb4-94d8-9f31526584dc/tempfile.png", "https://replicate.delivery/mgxm/70ed304c-0df5-4d34-abe9-6cdb28debf81/tempfile.png", "https://replicate.delivery/mgxm/62624a19-ccfa-4819-a9a9-83d31b6dacf6/tempfile.png" ], "started_at": "2022-03-28T15:59:23.377941Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/torqp2wodfhktoageo5aum55aq", "cancel": "https://api.replicate.com/v1/predictions/torqp2wodfhktoageo5aum55aq/cancel" }, "version": "9db17c116ea5cb19530a24901915193eb23348309cb86e513a9ec24d730a0ca5" }
Generated in---> BasePixrayPredictor Predict Using seed: 13165604375926880482 reusing cached copy of model models/vqgan_imagenet_f16_16384.ckpt All CLIP models already loaded: ['ViT-B/32', 'ViT-B/16'] Using device: cuda:0 Optimising using: Adam Using text prompts: ['Manhattan skyline at sunset. #artstation 🌇'] 0it [00:00, ?it/s] iter: 0, loss: 2.09, losses: 0.998, 0.0613, 0.971, 0.0632 (-0=>2.093) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 1.79, losses: 0.841, 0.0616, 0.829, 0.0623 (-0=>1.794) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 1.74, losses: 0.815, 0.0639, 0.799, 0.0627 (-1=>1.728) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 1.69, losses: 0.785, 0.0638, 0.782, 0.0627 (-1=>1.671) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 1.66, losses: 0.766, 0.0641, 0.767, 0.0627 (-3=>1.657) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 1.64, losses: 0.759, 0.0646, 0.757, 0.0625 (-1=>1.633) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 1.62, losses: 0.746, 0.0642, 0.743, 0.0633 (-1=>1.61) 0it [00:00, ?it/s] 0it [00:06, ?it/s] iter: 70, loss: 1.62, losses: 0.747, 0.0639, 0.748, 0.0633 (-3=>1.597) 0it [00:00, ?it/s] 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 1.58, losses: 0.722, 0.0647, 0.726, 0.0637 (-0=>1.576) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 1.6, losses: 0.739, 0.0657, 0.726, 0.0644 (-3=>1.575) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 1.58, losses: 0.726, 0.0664, 0.719, 0.064 (-5=>1.56) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 1.58, losses: 0.728, 0.0661, 0.722, 0.0642 (-15=>1.56) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 1.56, losses: 0.718, 0.0664, 0.709, 0.0645 (-2=>1.557) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 1.56, losses: 0.718, 0.0678, 0.71, 0.0646 (-8=>1.544) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 1.56, losses: 0.719, 0.067, 0.706, 0.0644 (-18=>1.544) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 1.56, losses: 0.719, 0.0658, 0.709, 0.0636 (-28=>1.544) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 1.56, losses: 0.716, 0.0664, 0.708, 0.0645 (-7=>1.533) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 1.54, losses: 0.711, 0.0678, 0.698, 0.0647 (-17=>1.533) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 1.54, losses: 0.708, 0.0685, 0.696, 0.066 (-7=>1.528) Dropping learning rate 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 1.54, losses: 0.704, 0.0682, 0.698, 0.0663 (-1=>1.53) 0it [00:00, ?it/s] 0it [00:06, ?it/s] iter: 200, loss: 1.55, losses: 0.713, 0.0676, 0.7, 0.0655 (-6=>1.525) 0it [00:00, ?it/s] 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 1.52, losses: 0.699, 0.0676, 0.689, 0.0663 (-5=>1.522) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 1.54, losses: 0.705, 0.0685, 0.699, 0.066 (-5=>1.517) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 1.53, losses: 0.699, 0.0677, 0.696, 0.065 (-15=>1.517) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 1.53, losses: 0.704, 0.068, 0.694, 0.0651 (-8=>1.516) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 250, finished (-18=>1.516) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:b18734685c2c41ff3ec4e1b6f8fcee1c3f58f8cdbcd11caecfc92a2232d6aecaInput
- prompts
- Manhattan skyline at sunset. #artstation 🌇
- settings
{ "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:b18734685c2c41ff3ec4e1b6f8fcee1c3f58f8cdbcd11caecfc92a2232d6aeca", { input: { prompts: "Manhattan skyline at sunset. #artstation 🌇", settings: "\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:b18734685c2c41ff3ec4e1b6f8fcee1c3f58f8cdbcd11caecfc92a2232d6aeca", input={ "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:b18734685c2c41ff3ec4e1b6f8fcee1c3f58f8cdbcd11caecfc92a2232d6aeca", "input": { "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-04T06:40:21Z", "created_at": "2022-01-04T06:35:16.453894Z", "data_removed": false, "error": "", "id": "bpmogp2wprabndhuyyu73522gi", "input": { "prompts": "Manhattan skyline at sunset. #artstation 🌇", "settings": "\n" }, "logs": "---> BasePixrayPredictor Predict\r\nUsing seed:\r\n10184741873048389411\r\nUsing device:\r\ncuda:0\r\nOptimising using:\r\nAdam\r\nUsing text prompts:\r\n['Manhattan skyline at sunset. #artstation 🌇']\r\n\r\n0it [00:00, ?it/s]\r\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\r\n warnings.warn(\r\niter: 0, loss: 3.15, losses: 1.06, 0.0803, 0.967, 0.0479, 0.951, 0.0481 (-0=>3.154)\r\n\r\n0it [00:01, ?it/s]\r\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\r\n warnings.warn(\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 10, loss: 3.09, losses: 1.07, 0.0771, 0.942, 0.0435, 0.917, 0.0449 (-0=>3.093)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 20, loss: 3.09, losses: 1.06, 0.0797, 0.929, 0.0453, 0.928, 0.0467 (-4=>3.032)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 30, loss: 2.96, losses: 1.01, 0.0821, 0.889, 0.0488, 0.886, 0.0474 (-0=>2.959)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 40, loss: 2.94, losses: 1, 0.0814, 0.882, 0.0487, 0.872, 0.0482 (-1=>2.891)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 50, loss: 2.85, losses: 0.975, 0.0859, 0.85, 0.0508, 0.841, 0.0474 (-4=>2.83)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 60, loss: 2.74, losses: 0.943, 0.0875, 0.813, 0.0516, 0.797, 0.0477 (-0=>2.74)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 70, loss: 2.72, losses: 0.945, 0.085, 0.804, 0.0501, 0.789, 0.0481 (-4=>2.692)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 80, loss: 2.64, losses: 0.895, 0.0883, 0.785, 0.0516, 0.769, 0.0486 (-2=>2.636)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 90, loss: 2.61, losses: 0.884, 0.0883, 0.778, 0.0509, 0.759, 0.0484 (-1=>2.597)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 100, loss: 2.63, losses: 0.899, 0.0887, 0.781, 0.0492, 0.764, 0.0486 (-11=>2.597)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 110, loss: 2.6, losses: 0.884, 0.0895, 0.771, 0.0495, 0.753, 0.049 (-5=>2.559)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 120, loss: 2.56, losses: 0.865, 0.0886, 0.76, 0.0495, 0.746, 0.0485 (-2=>2.557)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 130, loss: 2.6, losses: 0.884, 0.0881, 0.771, 0.049, 0.758, 0.0481 (-7=>2.556)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 140, loss: 2.58, losses: 0.875, 0.0883, 0.765, 0.0488, 0.755, 0.0479 (-6=>2.519)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 150, loss: 2.58, losses: 0.87, 0.0887, 0.764, 0.0487, 0.761, 0.048 (-1=>2.514)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 160, loss: 2.53, losses: 0.841, 0.09, 0.756, 0.0504, 0.75, 0.0483 (-11=>2.514)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 170, loss: 2.57, losses: 0.862, 0.089, 0.764, 0.0498, 0.752, 0.0488 (-1=>2.513)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 180, loss: 2.55, losses: 0.859, 0.0889, 0.758, 0.0493, 0.747, 0.0488 (-11=>2.513)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 190, loss: 2.56, losses: 0.862, 0.0878, 0.763, 0.0491, 0.755, 0.0485 (-21=>2.513)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 200, loss: 2.58, losses: 0.875, 0.0885, 0.765, 0.0484, 0.76, 0.0482 (-31=>2.513)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 210, loss: 2.58, losses: 0.87, 0.0894, 0.765, 0.0493, 0.757, 0.0489 (-5=>2.508)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 220, loss: 2.58, losses: 0.867, 0.0883, 0.765, 0.0491, 0.762, 0.049 (-15=>2.508)\r\n\r\n0it [00:00, ?it/s]\r\nDropping learning rate\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 230, loss: 2.53, losses: 0.846, 0.0904, 0.748, 0.05, 0.748, 0.0493 (-1=>2.506)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:10, ?it/s]\r\n\r\n0it [00:00, ?it/s]\r\niter: 240, loss: 2.59, losses: 0.88, 0.088, 0.764, 0.0487, 0.761, 0.0482 (-11=>2.506)\r\n\r\n0it [00:00, ?it/s]\r\n\r\n0it [00:03, ?it/s]\r\nTraceback (most recent call last):\r\n File \"/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/cog/server/redis_queue.py\", line 163, in start\r\n self.handle_message(response_queue, message, cleanup_functions)\r\n File \"/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/cog/server/redis_queue.py\", line 232, in handle_message\r\n result = next(return_value)\r\n File \"/src/cogrun.py\", line 132, in predict\r\n yield from super().predict(settings=\"pixray_vdiff\", prompts=prompts, **ydict)\r\n File \"/src/cogrun.py\", line 48, in predict\r\n run_complete = pixray.do_run(settings, return_display=True)\r\n File \"/src/pixray.py\", line 1502, in do_run\r\n keep_going = train(args, cur_iteration)\r\n File \"/src/pixray.py\", line 1367, in train\r\n loss.backward()\r\n File \"/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/_tensor.py\", line 255, in backward\r\n torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)\r\n File \"/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/autograd/__init__.py\", line 147, in backward\r\n Variable._execution_engine.run_backward(\r\n File \"/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/cog/server/redis_queue.py\", line 35, in handle_timeout\r\n raise TimeoutError(self.error_message)\r\nTimeoutError: Prediction timed out", "metrics": { "predict_time": 301, "total_time": 304.546106 }, "output": [ { "file": "https://replicate.delivery/mgxm/7d3e3aa2-9859-4679-9755-5c8c166c9aae/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ecf18aee-cdd9-49c7-adf9-71b59a04ea56/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/af7c0e33-e940-4ad1-84ef-aac1f7471653/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9b1e957a-06d2-412f-81ef-4c95a7ea0f75/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/caa6cbf1-2c7e-4955-ba52-8dd96980f476/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/26418e22-c5dd-4903-9c0a-d61fdd2dd681/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/179edad9-4f0c-41ff-a274-a6a169b842d2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a0a49e7f-69bb-4fe2-9608-a746841140ee/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/88a80201-135d-4d05-95fd-b2815edbe50c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b8a701f5-c676-423e-917b-6b70c7eb9955/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4467a54f-6afc-4989-b9c3-985774d8839d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0055e7f7-0bdf-4feb-bd89-cf7d74a00233/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/02b0ee4d-e586-4100-bb9f-8cca1a2921f9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/86873983-d611-480a-a2e9-dbd937b2bdfb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4eb7ad94-3330-470e-8b3f-5b120bfce2e3/tempfile.png" } ], "started_at": "2022-01-04T06:35:20Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/bpmogp2wprabndhuyyu73522gi", "cancel": "https://api.replicate.com/v1/predictions/bpmogp2wprabndhuyyu73522gi/cancel" }, "version": "b18734685c2c41ff3ec4e1b6f8fcee1c3f58f8cdbcd11caecfc92a2232d6aeca" }
Generated in---> BasePixrayPredictor Predict Using seed: 10184741873048389411 Using device: cuda:0 Optimising using: Adam Using text prompts: ['Manhattan skyline at sunset. #artstation 🌇'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 3.15, losses: 1.06, 0.0803, 0.967, 0.0479, 0.951, 0.0481 (-0=>3.154) 0it [00:01, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 3.09, losses: 1.07, 0.0771, 0.942, 0.0435, 0.917, 0.0449 (-0=>3.093) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 3.09, losses: 1.06, 0.0797, 0.929, 0.0453, 0.928, 0.0467 (-4=>3.032) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.96, losses: 1.01, 0.0821, 0.889, 0.0488, 0.886, 0.0474 (-0=>2.959) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.94, losses: 1, 0.0814, 0.882, 0.0487, 0.872, 0.0482 (-1=>2.891) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.85, losses: 0.975, 0.0859, 0.85, 0.0508, 0.841, 0.0474 (-4=>2.83) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.74, losses: 0.943, 0.0875, 0.813, 0.0516, 0.797, 0.0477 (-0=>2.74) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.72, losses: 0.945, 0.085, 0.804, 0.0501, 0.789, 0.0481 (-4=>2.692) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.64, losses: 0.895, 0.0883, 0.785, 0.0516, 0.769, 0.0486 (-2=>2.636) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.61, losses: 0.884, 0.0883, 0.778, 0.0509, 0.759, 0.0484 (-1=>2.597) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.63, losses: 0.899, 0.0887, 0.781, 0.0492, 0.764, 0.0486 (-11=>2.597) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.6, losses: 0.884, 0.0895, 0.771, 0.0495, 0.753, 0.049 (-5=>2.559) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.56, losses: 0.865, 0.0886, 0.76, 0.0495, 0.746, 0.0485 (-2=>2.557) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.6, losses: 0.884, 0.0881, 0.771, 0.049, 0.758, 0.0481 (-7=>2.556) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.58, losses: 0.875, 0.0883, 0.765, 0.0488, 0.755, 0.0479 (-6=>2.519) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.58, losses: 0.87, 0.0887, 0.764, 0.0487, 0.761, 0.048 (-1=>2.514) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.53, losses: 0.841, 0.09, 0.756, 0.0504, 0.75, 0.0483 (-11=>2.514) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.57, losses: 0.862, 0.089, 0.764, 0.0498, 0.752, 0.0488 (-1=>2.513) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.55, losses: 0.859, 0.0889, 0.758, 0.0493, 0.747, 0.0488 (-11=>2.513) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.56, losses: 0.862, 0.0878, 0.763, 0.0491, 0.755, 0.0485 (-21=>2.513) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.58, losses: 0.875, 0.0885, 0.765, 0.0484, 0.76, 0.0482 (-31=>2.513) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.58, losses: 0.87, 0.0894, 0.765, 0.0493, 0.757, 0.0489 (-5=>2.508) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.58, losses: 0.867, 0.0883, 0.765, 0.0491, 0.762, 0.049 (-15=>2.508) 0it [00:00, ?it/s] Dropping learning rate 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.53, losses: 0.846, 0.0904, 0.748, 0.05, 0.748, 0.0493 (-1=>2.506) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.59, losses: 0.88, 0.088, 0.764, 0.0487, 0.761, 0.0482 (-11=>2.506) 0it [00:00, ?it/s] 0it [00:03, ?it/s] Traceback (most recent call last): File "/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/cog/server/redis_queue.py", line 163, in start self.handle_message(response_queue, message, cleanup_functions) File "/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/cog/server/redis_queue.py", line 232, in handle_message result = next(return_value) File "/src/cogrun.py", line 132, in predict yield from super().predict(settings="pixray_vdiff", prompts=prompts, **ydict) File "/src/cogrun.py", line 48, in predict run_complete = pixray.do_run(settings, return_display=True) File "/src/pixray.py", line 1502, in do_run keep_going = train(args, cur_iteration) File "/src/pixray.py", line 1367, in train loss.backward() File "/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/_tensor.py", line 255, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs) File "/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/autograd/__init__.py", line 147, in backward Variable._execution_engine.run_backward( File "/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/cog/server/redis_queue.py", line 35, in handle_timeout raise TimeoutError(self.error_message) TimeoutError: Prediction timed out
Prediction
pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26Input
- prompts
- The clockwork angel of air flying over a rocky coast, Kodak Portra film.
- settings
- custom_loss: symmetry,saturation scale: 4
{ "prompts": "The clockwork angel of air flying over a rocky coast, Kodak Portra film.", "settings": "custom_loss: symmetry,saturation\nscale: 4" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26", { input: { prompts: "The clockwork angel of air flying over a rocky coast, Kodak Portra film.", settings: "custom_loss: symmetry,saturation\nscale: 4" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26", input={ "prompts": "The clockwork angel of air flying over a rocky coast, Kodak Portra film.", "settings": "custom_loss: symmetry,saturation\nscale: 4" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26", "input": { "prompts": "The clockwork angel of air flying over a rocky coast, Kodak Portra film.", "settings": "custom_loss: symmetry,saturation\\nscale: 4" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-01-05T02:12:40.960217Z", "created_at": "2022-01-05T02:04:24.309102Z", "data_removed": false, "error": null, "id": "qosewrgrpbczfa726hsrcwfsze", "input": { "prompts": "The clockwork angel of air flying over a rocky coast, Kodak Portra film.", "settings": "custom_loss: symmetry,saturation\nscale: 4" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n6890092123385047554\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['The clockwork angel of air flying over a rocky coast, Kodak Portra film.']\nusing custom losses: symmetry,saturation\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 3.01, losses: 0.981, 0.0792, 0.938, 0.0473, 0.934, 0.049, 0.0017, -0.0169 (-0=>3.014)\n\n0it [00:01, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.95, losses: 0.977, 0.0741, 0.898, 0.0476, 0.869, 0.0461, 0.097, -0.0605 (-0=>2.949)\n\n0it [00:01, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.9, losses: 0.968, 0.0756, 0.891, 0.0465, 0.867, 0.0467, 0.0636, -0.0631 (-2=>2.895)\n\n0it [00:01, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.83, losses: 0.942, 0.0768, 0.876, 0.0478, 0.858, 0.0474, 0.0512, -0.068 (-2=>2.808)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.77, losses: 0.924, 0.0763, 0.859, 0.0482, 0.85, 0.0486, 0.0325, -0.0702 (-3=>2.716)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.68, losses: 0.899, 0.0763, 0.834, 0.0497, 0.82, 0.0494, 0.0273, -0.0724 (-4=>2.667)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.67, losses: 0.901, 0.0771, 0.83, 0.0479, 0.812, 0.0505, 0.0234, -0.0685 (-6=>2.664)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.61, losses: 0.879, 0.0769, 0.799, 0.0476, 0.798, 0.0501, 0.0236, -0.0634 (-4=>2.576)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.48, losses: 0.835, 0.0792, 0.757, 0.0492, 0.742, 0.0527, 0.0267, -0.0604 (-0=>2.481)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.49, losses: 0.842, 0.0783, 0.76, 0.0498, 0.732, 0.0535, 0.0304, -0.0564 (-4=>2.39)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.37, losses: 0.799, 0.0796, 0.724, 0.0504, 0.695, 0.0561, 0.0293, -0.0614 (-3=>2.366)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.41, losses: 0.813, 0.0815, 0.735, 0.0504, 0.7, 0.0551, 0.0304, -0.0564 (-1=>2.35)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.47, losses: 0.831, 0.08, 0.757, 0.0504, 0.721, 0.0542, 0.0329, -0.0571 (-9=>2.332)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.4, losses: 0.815, 0.081, 0.724, 0.0502, 0.695, 0.0546, 0.0345, -0.0564 (-8=>2.309)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.31, losses: 0.774, 0.0815, 0.709, 0.0516, 0.661, 0.0561, 0.0362, -0.0589 (-18=>2.309)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.33, losses: 0.775, 0.0819, 0.715, 0.0516, 0.673, 0.057, 0.0368, -0.0599 (-28=>2.309)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.41, losses: 0.817, 0.0807, 0.731, 0.0512, 0.695, 0.0558, 0.0385, -0.0544 (-38=>2.309)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.4, losses: 0.803, 0.0795, 0.726, 0.052, 0.698, 0.0555, 0.0401, -0.0548 (-48=>2.309)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.45, losses: 0.822, 0.0801, 0.746, 0.0497, 0.707, 0.0546, 0.0414, -0.0561 (-4=>2.307)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.46, losses: 0.828, 0.0808, 0.747, 0.0512, 0.705, 0.0556, 0.0425, -0.0548 (-14=>2.307)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.39, losses: 0.802, 0.0808, 0.725, 0.0512, 0.684, 0.0556, 0.0433, -0.0549 (-2=>2.295)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.43, losses: 0.823, 0.0804, 0.736, 0.0503, 0.701, 0.0552, 0.0442, -0.0549 (-12=>2.295)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.31, losses: 0.771, 0.0826, 0.702, 0.0525, 0.654, 0.0564, 0.0453, -0.0573 (-22=>2.295)\n\n0it [00:01, ?it/s]\nDropping learning rate\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.42, losses: 0.815, 0.081, 0.736, 0.0511, 0.694, 0.0553, 0.0463, -0.056 (-4=>2.306)\n\n0it [00:01, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.31, losses: 0.77, 0.0825, 0.702, 0.0519, 0.656, 0.0566, 0.047, -0.0579 (-14=>2.306)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.34, losses: 0.788, 0.0828, 0.714, 0.0512, 0.663, 0.0564, 0.0479, -0.0595 (-24=>2.306)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.39, losses: 0.796, 0.082, 0.729, 0.0513, 0.681, 0.0568, 0.0488, -0.0549 (-34=>2.306)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.45, losses: 0.825, 0.0801, 0.747, 0.0501, 0.7, 0.0553, 0.0497, -0.0557 (-44=>2.306)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.36, losses: 0.795, 0.0811, 0.715, 0.0505, 0.67, 0.0554, 0.0507, -0.0607 (-54=>2.306)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.39, losses: 0.802, 0.0829, 0.728, 0.0512, 0.681, 0.0564, 0.0515, -0.0601 (-64=>2.306)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-74=>2.306)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 405.275034, "total_time": 496.651115 }, "output": [ { "file": "https://replicate.delivery/mgxm/60100081-2ce0-44d3-9e08-5804200f9c7a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/684e8b68-d14e-4f62-a109-0a8d34ea1b4b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/77ace21c-c521-452e-89f3-460b489870dd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4b52f1e8-a9ca-47bf-9aee-ac333c5bfb66/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7ca5ec8b-7a00-4a8c-81af-706f03cd03bf/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7d4e003e-d8da-42c0-9342-2c12bbe061c5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ac7c9daf-477a-46fb-aaf0-d02203adeb01/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/80da105d-28db-4795-a3db-c12ef79a94cf/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9533c6f8-c330-4958-a304-cd2088e168a6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7514cf27-49fb-4d72-bd78-508dded377f5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/efef06f2-07a4-4b79-8f47-1267f347ddc2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/47e0a07f-cde8-4030-98c9-ef410412349a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f551cb5f-5bf5-4b10-88c6-3a83e0d4a2c7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3c99df78-61bc-42de-a039-621db5b32099/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f89d2107-bf21-4dbc-a257-9d68ed60569a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5d42c290-b619-4ca7-ac17-453250715a95/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6bf54efe-4d4b-48a9-9349-623aecad78e4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/37b76bc8-42aa-4223-8dd7-15be1b585d21/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a669a527-4f9e-458b-99ba-3cc3152c7cfc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7fee776f-2e4e-455c-910e-d9b5a3c019dc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/af32b931-c8ef-4d58-b36d-fcfe81f908a1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a770e815-f29d-40aa-a059-20f7b711f83a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5c7ce5b7-0246-423b-995b-9cf52b72bd81/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/cbb175b0-4489-4609-9e01-bfeb50434944/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/621ff903-7d68-4903-8d89-c32586caff99/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ea49748d-b926-4957-924c-13ace61e0098/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9fe2bbf6-a02f-42dc-a76a-fead5c8d2c52/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5c09c67f-9aae-4dd7-bbe7-4d504d7ee323/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/90a4e6bb-18d1-4c26-9095-ee202956bd0b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/56a6a68f-929c-4ae5-b753-fc0738f8fc89/tempfile.png" } ], "started_at": "2022-01-05T02:05:55.685183Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/qosewrgrpbczfa726hsrcwfsze", "cancel": "https://api.replicate.com/v1/predictions/qosewrgrpbczfa726hsrcwfsze/cancel" }, "version": "1c2f82502f7d2afc9e48b9320dc1f22b6a090f196b044500478441d43b482a26" }
Generated in---> BasePixrayPredictor Predict Using seed: 6890092123385047554 Using device: cuda:0 Optimising using: Adam Using text prompts: ['The clockwork angel of air flying over a rocky coast, Kodak Portra film.'] using custom losses: symmetry,saturation 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 3.01, losses: 0.981, 0.0792, 0.938, 0.0473, 0.934, 0.049, 0.0017, -0.0169 (-0=>3.014) 0it [00:01, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.95, losses: 0.977, 0.0741, 0.898, 0.0476, 0.869, 0.0461, 0.097, -0.0605 (-0=>2.949) 0it [00:01, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.9, losses: 0.968, 0.0756, 0.891, 0.0465, 0.867, 0.0467, 0.0636, -0.0631 (-2=>2.895) 0it [00:01, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.83, losses: 0.942, 0.0768, 0.876, 0.0478, 0.858, 0.0474, 0.0512, -0.068 (-2=>2.808) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.77, losses: 0.924, 0.0763, 0.859, 0.0482, 0.85, 0.0486, 0.0325, -0.0702 (-3=>2.716) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.68, losses: 0.899, 0.0763, 0.834, 0.0497, 0.82, 0.0494, 0.0273, -0.0724 (-4=>2.667) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.67, losses: 0.901, 0.0771, 0.83, 0.0479, 0.812, 0.0505, 0.0234, -0.0685 (-6=>2.664) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.61, losses: 0.879, 0.0769, 0.799, 0.0476, 0.798, 0.0501, 0.0236, -0.0634 (-4=>2.576) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.48, losses: 0.835, 0.0792, 0.757, 0.0492, 0.742, 0.0527, 0.0267, -0.0604 (-0=>2.481) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.49, losses: 0.842, 0.0783, 0.76, 0.0498, 0.732, 0.0535, 0.0304, -0.0564 (-4=>2.39) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.37, losses: 0.799, 0.0796, 0.724, 0.0504, 0.695, 0.0561, 0.0293, -0.0614 (-3=>2.366) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.41, losses: 0.813, 0.0815, 0.735, 0.0504, 0.7, 0.0551, 0.0304, -0.0564 (-1=>2.35) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.47, losses: 0.831, 0.08, 0.757, 0.0504, 0.721, 0.0542, 0.0329, -0.0571 (-9=>2.332) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.4, losses: 0.815, 0.081, 0.724, 0.0502, 0.695, 0.0546, 0.0345, -0.0564 (-8=>2.309) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.31, losses: 0.774, 0.0815, 0.709, 0.0516, 0.661, 0.0561, 0.0362, -0.0589 (-18=>2.309) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.33, losses: 0.775, 0.0819, 0.715, 0.0516, 0.673, 0.057, 0.0368, -0.0599 (-28=>2.309) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.41, losses: 0.817, 0.0807, 0.731, 0.0512, 0.695, 0.0558, 0.0385, -0.0544 (-38=>2.309) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.4, losses: 0.803, 0.0795, 0.726, 0.052, 0.698, 0.0555, 0.0401, -0.0548 (-48=>2.309) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.45, losses: 0.822, 0.0801, 0.746, 0.0497, 0.707, 0.0546, 0.0414, -0.0561 (-4=>2.307) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.46, losses: 0.828, 0.0808, 0.747, 0.0512, 0.705, 0.0556, 0.0425, -0.0548 (-14=>2.307) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.39, losses: 0.802, 0.0808, 0.725, 0.0512, 0.684, 0.0556, 0.0433, -0.0549 (-2=>2.295) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.43, losses: 0.823, 0.0804, 0.736, 0.0503, 0.701, 0.0552, 0.0442, -0.0549 (-12=>2.295) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.31, losses: 0.771, 0.0826, 0.702, 0.0525, 0.654, 0.0564, 0.0453, -0.0573 (-22=>2.295) 0it [00:01, ?it/s] Dropping learning rate 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.42, losses: 0.815, 0.081, 0.736, 0.0511, 0.694, 0.0553, 0.0463, -0.056 (-4=>2.306) 0it [00:01, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.31, losses: 0.77, 0.0825, 0.702, 0.0519, 0.656, 0.0566, 0.047, -0.0579 (-14=>2.306) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.34, losses: 0.788, 0.0828, 0.714, 0.0512, 0.663, 0.0564, 0.0479, -0.0595 (-24=>2.306) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.39, losses: 0.796, 0.082, 0.729, 0.0513, 0.681, 0.0568, 0.0488, -0.0549 (-34=>2.306) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.45, losses: 0.825, 0.0801, 0.747, 0.0501, 0.7, 0.0553, 0.0497, -0.0557 (-44=>2.306) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.36, losses: 0.795, 0.0811, 0.715, 0.0505, 0.67, 0.0554, 0.0507, -0.0607 (-54=>2.306) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.39, losses: 0.802, 0.0829, 0.728, 0.0512, 0.681, 0.0564, 0.0515, -0.0601 (-64=>2.306) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-74=>2.306) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364Input
- prompts
- photo:0
- settings
- drawer: vqgan quality: normal target_images: "https://upload.cc/i1/2022/03/23/OCNhTr.png:0.5 | https://upload.cc/i1/2022/03/23/08UfKt.png:0.5"
{ "prompts": "photo:0", "settings": "drawer: vqgan\nquality: normal\ntarget_images: \"https://upload.cc/i1/2022/03/23/OCNhTr.png:0.5 | https://upload.cc/i1/2022/03/23/08UfKt.png:0.5\"\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", { input: { prompts: "photo:0", settings: "drawer: vqgan\nquality: normal\ntarget_images: \"https://upload.cc/i1/2022/03/23/OCNhTr.png:0.5 | https://upload.cc/i1/2022/03/23/08UfKt.png:0.5\"\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", input={ "prompts": "photo:0", "settings": "drawer: vqgan\nquality: normal\ntarget_images: \"https://upload.cc/i1/2022/03/23/OCNhTr.png:0.5 | https://upload.cc/i1/2022/03/23/08UfKt.png:0.5\"\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", "input": { "prompts": "photo:0", "settings": "drawer: vqgan\\nquality: normal\\ntarget_images: \\"https://upload.cc/i1/2022/03/23/OCNhTr.png:0.5 | https://upload.cc/i1/2022/03/23/08UfKt.png:0.5\\"\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-03-23T00:12:35.508933Z", "created_at": "2022-03-23T00:09:28.938209Z", "data_removed": false, "error": null, "id": "lete5tzq2vesdcdzepzwibtstu", "input": { "prompts": "photo:0", "settings": "drawer: vqgan\nquality: normal\ntarget_images: \"https://upload.cc/i1/2022/03/23/OCNhTr.png:0.5 | https://upload.cc/i1/2022/03/23/08UfKt.png:0.5\"\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed: 13214517199878359130\nreusing cached copy of model models/vqgan_imagenet_f16_16384.ckpt\nAll CLIP models already loaded: ['ViT-B/32', 'ViT-B/16']\n[<http.client.HTTPResponse object at 0x7f543f3c7f70>, <http.client.HTTPResponse object at 0x7f543f3c7f10>]\n[<http.client.HTTPResponse object at 0x7f543f3c7f70>, <http.client.HTTPResponse object at 0x7f543f3c7f10>]\nUsing device: cuda:0\nOptimising using: Adam\n\nUsing text prompts: ['photo:0']\niter: 0, loss: 0.501, losses: 0.191, 0, 0.0601, 0.186, 0, 0.0639 (-0=>0.5013)\n0it [00:00, ?it/s]\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 0.38, losses: 0.136, 0, 0.0636, 0.116, 0, 0.0635 (-0=>0.3796)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 0.367, losses: 0.13, 0, 0.0637, 0.109, 0, 0.0641 (-2=>0.3578)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 0.357, losses: 0.128, 0, 0.0625, 0.103, 0, 0.0639 (-2=>0.3533)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 0.343, losses: 0.12, 0, 0.0619, 0.0969, 0, 0.064 (-2=>0.3412)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 0.341, losses: 0.116, 0, 0.0633, 0.0991, 0, 0.0628 (-2=>0.3344)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 0.33, losses: 0.112, 0, 0.0641, 0.0895, 0, 0.0649 (-0=>0.3302)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 0.331, losses: 0.113, 0, 0.0631, 0.0911, 0, 0.0635 (-4=>0.323)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 0.33, losses: 0.111, 0, 0.0648, 0.0895, 0, 0.0649 (-14=>0.323)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 0.324, losses: 0.11, 0, 0.0621, 0.0873, 0, 0.0642 (-24=>0.323)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 0.312, losses: 0.104, 0, 0.0637, 0.0806, 0, 0.0642 (-0=>0.3125)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 0.317, losses: 0.105, 0, 0.0631, 0.0852, 0, 0.0647 (-10=>0.3125)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 0.316, losses: 0.105, 0, 0.0652, 0.0815, 0, 0.0639 (-20=>0.3125)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 0.319, losses: 0.107, 0, 0.0636, 0.0849, 0, 0.0635 (-30=>0.3125)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 0.318, losses: 0.107, 0, 0.0632, 0.0825, 0, 0.0655 (-3=>0.3117)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 0.31, losses: 0.101, 0, 0.0649, 0.0803, 0, 0.0645 (-4=>0.308)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 0.306, losses: 0.101, 0, 0.0633, 0.0774, 0, 0.0643 (-2=>0.3033)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 0.319, losses: 0.105, 0, 0.0665, 0.0829, 0, 0.0648 (-12=>0.3033)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 0.304, losses: 0.0996, 0, 0.0641, 0.0766, 0, 0.064 (-22=>0.3033)\n\n\nDropping learning rate\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 0.308, losses: 0.101, 0, 0.0635, 0.0788, 0, 0.0639 (-2=>0.3063)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 0.302, losses: 0.0971, 0, 0.0635, 0.0775, 0, 0.0642 (-8=>0.2963)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 0.298, losses: 0.0958, 0, 0.0646, 0.0726, 0, 0.065 (-18=>0.2963)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 0.3, losses: 0.0958, 0, 0.0645, 0.0753, 0, 0.0648 (-28=>0.2963)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 0.294, losses: 0.0935, 0, 0.0643, 0.0717, 0, 0.0646 (-0=>0.2941)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 0.301, losses: 0.0981, 0, 0.0639, 0.0753, 0, 0.0642 (-10=>0.2941)\n\n\n0it [00:00, ?it/s]\n0it [00:06, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, finished (-20=>0.2941)\n\n\n0it [00:00, ?it/s]\n0it [00:00, ?it/s]", "metrics": { "predict_time": 186.370823, "total_time": 186.570724 }, "output": [ { "file": "https://replicate.delivery/mgxm/94e5165d-088e-4094-b8ce-e798e2b0c3fa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/907f1671-9db0-40ab-a74c-015f8c549503/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4bdb8d1c-b0ce-43a4-be2d-c78f6e4d0154/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/652b3e3b-105f-4f0c-91bd-ada3b08fe120/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a9075354-fbb1-4d39-a7a0-097ec233b031/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ab9ced06-4eef-4842-af23-42c5bc1f0919/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d98a1163-8543-47cc-9700-7e0cac5ad96e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9bc4ee0c-c6a8-407b-8f13-3c46742aee51/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8d83a4c4-ae46-4ba0-84b6-26ea03e3fb6d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/92d53516-e817-4a8e-8173-67282686b772/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b4211a19-6b81-4a31-ae3c-6d7684a8116c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/06313a4d-a7c3-4cec-aaac-9bee5917bdd7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d906bf5d-d5cb-4faf-9739-b9c68ba4fc42/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/dd0c5a36-c0eb-4eab-bbb9-3dc4659b1994/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6c9baf3d-ea50-4bd8-a58c-edc93dc56623/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7287df3b-8d80-4ab6-b780-20e16002fef3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/78012e3e-b0f6-4609-8654-b3d560e7d1a4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a50dbced-f4a7-4215-9b3c-8dd4526e4412/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a75d0d7b-ba0e-4d2e-8ad8-b786caeb9150/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/90854642-241f-4da9-b8b8-62309bc1b368/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4eda7bdb-8be0-4885-8e5a-5f46fe1f0de4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/00ef8b9c-95fa-4cc1-b6be-f8ad9e8ce0ea/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5f458317-d357-4994-b98c-056c7b92e5cc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/61a21e69-3631-469c-abaa-b522b09367db/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a8569a0f-3c92-400f-8af6-6766b2b7eba9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b7db9fbd-96f1-4062-8d73-44e89c71ebb9/tempfile.png" } ], "started_at": "2022-03-23T00:09:29.138110Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/lete5tzq2vesdcdzepzwibtstu", "cancel": "https://api.replicate.com/v1/predictions/lete5tzq2vesdcdzepzwibtstu/cancel" }, "version": "d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364" }
Generated in---> BasePixrayPredictor Predict Using seed: 13214517199878359130 reusing cached copy of model models/vqgan_imagenet_f16_16384.ckpt All CLIP models already loaded: ['ViT-B/32', 'ViT-B/16'] [<http.client.HTTPResponse object at 0x7f543f3c7f70>, <http.client.HTTPResponse object at 0x7f543f3c7f10>] [<http.client.HTTPResponse object at 0x7f543f3c7f70>, <http.client.HTTPResponse object at 0x7f543f3c7f10>] Using device: cuda:0 Optimising using: Adam Using text prompts: ['photo:0'] iter: 0, loss: 0.501, losses: 0.191, 0, 0.0601, 0.186, 0, 0.0639 (-0=>0.5013) 0it [00:00, ?it/s] 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 0.38, losses: 0.136, 0, 0.0636, 0.116, 0, 0.0635 (-0=>0.3796) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 0.367, losses: 0.13, 0, 0.0637, 0.109, 0, 0.0641 (-2=>0.3578) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 0.357, losses: 0.128, 0, 0.0625, 0.103, 0, 0.0639 (-2=>0.3533) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 0.343, losses: 0.12, 0, 0.0619, 0.0969, 0, 0.064 (-2=>0.3412) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 0.341, losses: 0.116, 0, 0.0633, 0.0991, 0, 0.0628 (-2=>0.3344) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 0.33, losses: 0.112, 0, 0.0641, 0.0895, 0, 0.0649 (-0=>0.3302) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 0.331, losses: 0.113, 0, 0.0631, 0.0911, 0, 0.0635 (-4=>0.323) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 0.33, losses: 0.111, 0, 0.0648, 0.0895, 0, 0.0649 (-14=>0.323) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 0.324, losses: 0.11, 0, 0.0621, 0.0873, 0, 0.0642 (-24=>0.323) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 0.312, losses: 0.104, 0, 0.0637, 0.0806, 0, 0.0642 (-0=>0.3125) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 0.317, losses: 0.105, 0, 0.0631, 0.0852, 0, 0.0647 (-10=>0.3125) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 0.316, losses: 0.105, 0, 0.0652, 0.0815, 0, 0.0639 (-20=>0.3125) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 0.319, losses: 0.107, 0, 0.0636, 0.0849, 0, 0.0635 (-30=>0.3125) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 0.318, losses: 0.107, 0, 0.0632, 0.0825, 0, 0.0655 (-3=>0.3117) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 0.31, losses: 0.101, 0, 0.0649, 0.0803, 0, 0.0645 (-4=>0.308) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 0.306, losses: 0.101, 0, 0.0633, 0.0774, 0, 0.0643 (-2=>0.3033) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 0.319, losses: 0.105, 0, 0.0665, 0.0829, 0, 0.0648 (-12=>0.3033) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 0.304, losses: 0.0996, 0, 0.0641, 0.0766, 0, 0.064 (-22=>0.3033) Dropping learning rate 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 0.308, losses: 0.101, 0, 0.0635, 0.0788, 0, 0.0639 (-2=>0.3063) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 0.302, losses: 0.0971, 0, 0.0635, 0.0775, 0, 0.0642 (-8=>0.2963) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 0.298, losses: 0.0958, 0, 0.0646, 0.0726, 0, 0.065 (-18=>0.2963) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 0.3, losses: 0.0958, 0, 0.0645, 0.0753, 0, 0.0648 (-28=>0.2963) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 0.294, losses: 0.0935, 0, 0.0643, 0.0717, 0, 0.0646 (-0=>0.2941) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 0.301, losses: 0.0981, 0, 0.0639, 0.0753, 0, 0.0642 (-10=>0.2941) 0it [00:00, ?it/s] 0it [00:06, ?it/s] 0it [00:00, ?it/s] iter: 250, finished (-20=>0.2941) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23IDqoiiaufaozhnxfpmkzbakgtjduStatusSucceededSourceWebHardware–Total durationCreatedInput
- drawer
- vqgan
- prompts
- X-ray showing the skeletal structure of cthulhu.
- settings
- palette: https://upload.wikimedia.org/wikipedia/commons/9/9c/Lung_X-ray.jpg filters: lookup aspect: portrait custom_loss: edge edge_color: black edge_thickness: 1
{ "drawer": "vqgan", "prompts": "X-ray showing the skeletal structure of cthulhu.", "settings": "palette: https://upload.wikimedia.org/wikipedia/commons/9/9c/Lung_X-ray.jpg\nfilters: lookup\naspect: portrait\ncustom_loss: edge\nedge_color: black\nedge_thickness: 1" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23", { input: { drawer: "vqgan", prompts: "X-ray showing the skeletal structure of cthulhu.", settings: "palette: https://upload.wikimedia.org/wikipedia/commons/9/9c/Lung_X-ray.jpg\nfilters: lookup\naspect: portrait\ncustom_loss: edge\nedge_color: black\nedge_thickness: 1" } } ); // 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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23", input={ "drawer": "vqgan", "prompts": "X-ray showing the skeletal structure of cthulhu.", "settings": "palette: https://upload.wikimedia.org/wikipedia/commons/9/9c/Lung_X-ray.jpg\nfilters: lookup\naspect: portrait\ncustom_loss: edge\nedge_color: black\nedge_thickness: 1" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23", "input": { "drawer": "vqgan", "prompts": "X-ray showing the skeletal structure of cthulhu.", "settings": "palette: https://upload.wikimedia.org/wikipedia/commons/9/9c/Lung_X-ray.jpg\\nfilters: lookup\\naspect: portrait\\ncustom_loss: edge\\nedge_color: black\\nedge_thickness: 1" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-03-30T23:51:38.005433Z", "created_at": "2022-03-30T23:48:32.788318Z", "data_removed": false, "error": null, "id": "qoiiaufaozhnxfpmkzbakgtjdu", "input": { "drawer": "vqgan", "prompts": "X-ray showing the skeletal structure of cthulhu.", "settings": "palette: https://upload.wikimedia.org/wikipedia/commons/9/9c/Lung_X-ray.jpg\nfilters: lookup\naspect: portrait\ncustom_loss: edge\nedge_color: black\nedge_thickness: 1" }, "logs": null, "metrics": { "predict_time": 185.009517, "total_time": 185.217115 }, "output": [ "https://replicate.delivery/mgxm/01bd0aa2-cf0c-4823-99c2-80bbd66fb231/tempfile.png", "https://replicate.delivery/mgxm/5d614064-48fb-42a0-9612-c637bc7fdf12/tempfile.png", "https://replicate.delivery/mgxm/455bc135-80f7-49dd-a4b9-bfd6a69b68a1/tempfile.png", "https://replicate.delivery/mgxm/2d61593b-b239-4256-afaf-18c622ac184a/tempfile.png", "https://replicate.delivery/mgxm/622a2260-b423-40ac-a70a-7cbc0e3b30a6/tempfile.png", "https://replicate.delivery/mgxm/d0ea35d5-707b-411b-9d62-c70aa7c6215d/tempfile.png", "https://replicate.delivery/mgxm/127e8e36-73e2-42b8-964e-4d1af8f13d66/tempfile.png", "https://replicate.delivery/mgxm/ddf22cc5-69ca-42df-add0-c6b06d99a9a6/tempfile.png", "https://replicate.delivery/mgxm/8ebcf41c-86d2-4b0f-ac0b-fbc137d2111a/tempfile.png", "https://replicate.delivery/mgxm/76a3b183-b923-4b45-8309-337b19382b20/tempfile.png", "https://replicate.delivery/mgxm/0bc0f9d0-93e8-4732-9587-913386c5432c/tempfile.png", "https://replicate.delivery/mgxm/bd7812b8-5899-4b50-92aa-e3fc2d976e36/tempfile.png", "https://replicate.delivery/mgxm/c6a5a163-16db-4a6c-8588-3b5f6363a12b/tempfile.png", "https://replicate.delivery/mgxm/9416acba-4a93-49e4-970c-f1bcac3a89cd/tempfile.png", "https://replicate.delivery/mgxm/73440451-4580-42cf-8522-c979b182ff68/tempfile.png", "https://replicate.delivery/mgxm/a4bcc50b-fe78-41e2-912d-fc316b5f9f69/tempfile.png", "https://replicate.delivery/mgxm/60cc3dc3-030c-43b3-8b16-09edd5d31b29/tempfile.png", "https://replicate.delivery/mgxm/8d17e4e9-ac12-4a92-a382-ec28b5d7629c/tempfile.png", "https://replicate.delivery/mgxm/44882f46-b0e3-491f-b64a-f55921860660/tempfile.png", "https://replicate.delivery/mgxm/d46f2655-cdfd-46f1-8278-51f9eba7961e/tempfile.png", "https://replicate.delivery/mgxm/3399421c-3e85-4af9-9f9d-dbad7ae3b345/tempfile.png", "https://replicate.delivery/mgxm/0ccd8307-36a9-4c24-994d-31369a04e6c1/tempfile.png", "https://replicate.delivery/mgxm/d69523ad-37c2-4bfd-89bc-3f447bf9d5df/tempfile.png", "https://replicate.delivery/mgxm/0612db8a-718a-4520-9dfc-783a9af660ee/tempfile.png", "https://replicate.delivery/mgxm/b08f9b37-4d65-4d75-8845-5dbb47d9621f/tempfile.png", "https://replicate.delivery/mgxm/811d52cb-cad9-4ead-8dbc-abb9408dbc60/tempfile.png" ], "started_at": "2022-03-30T23:48:32.995916Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/qoiiaufaozhnxfpmkzbakgtjdu", "cancel": "https://api.replicate.com/v1/predictions/qoiiaufaozhnxfpmkzbakgtjdu/cancel" }, "version": "f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23" }
Generated inPrediction
pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23Input
- drawer
- vdiff
- prompts
- beautiful Steampunk lady
- settings
- vdiff_model: cc12m_1 size: [320, 320] vector_prompts: None clip_models: RN101,ViT-B/32,ViT-B/16
{ "drawer": "vdiff", "prompts": "beautiful Steampunk lady", "settings": "vdiff_model: cc12m_1\nsize: [320, 320]\nvector_prompts: None\nclip_models: RN101,ViT-B/32,ViT-B/16" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23", { input: { drawer: "vdiff", prompts: "beautiful Steampunk lady", settings: "vdiff_model: cc12m_1\nsize: [320, 320]\nvector_prompts: None\nclip_models: RN101,ViT-B/32,ViT-B/16" } } ); // 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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23", input={ "drawer": "vdiff", "prompts": "beautiful Steampunk lady", "settings": "vdiff_model: cc12m_1\nsize: [320, 320]\nvector_prompts: None\nclip_models: RN101,ViT-B/32,ViT-B/16" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23", "input": { "drawer": "vdiff", "prompts": "beautiful Steampunk lady", "settings": "vdiff_model: cc12m_1\\nsize: [320, 320]\\nvector_prompts: None\\nclip_models: RN101,ViT-B/32,ViT-B/16" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-04-06T07:00:08.275395Z", "created_at": "2022-04-06T06:53:07.781450Z", "data_removed": false, "error": null, "id": "al42ygxikbhujgqd2yzlz5s4jm", "input": { "drawer": "vdiff", "prompts": "beautiful Steampunk lady", "settings": "vdiff_model: cc12m_1\nsize: [320, 320]\nvector_prompts: None\nclip_models: RN101,ViT-B/32,ViT-B/16" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed: 7260706899850638684\nAll CLIP models already loaded: ['RN101', 'ViT-B/32', 'ViT-B/16']\ndrawer <vdiff.VdiffDrawer object at 0x7fc125e77250> needs ViT-B/16\nclip_embed for drawer <vdiff.VdiffDrawer object at 0x7fc125e77250> is torch.Size([1, 512])\nUsing device: cuda:0\n\nOptimising using: Adam\nUsing text prompts: ['beautiful Steampunk lady']\niter: 0, loss: 2.77, losses: 0.766, 1.02, 0.987 (-0=>2.772)\n\n\n0it [00:01, ?it/s]\n0it [00:16, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.63, losses: 0.741, 0.967, 0.926 (-0=>2.634)\n\n\n0it [00:01, ?it/s]\n0it [00:16, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.54, losses: 0.727, 0.924, 0.887 (-3=>2.529)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.48, losses: 0.706, 0.889, 0.881 (-2=>2.452)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.29, losses: 0.64, 0.831, 0.82 (-0=>2.291)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.16, losses: 0.585, 0.793, 0.779 (-0=>2.157)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.01, losses: 0.537, 0.744, 0.725 (-0=>2.006)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 1.9, losses: 0.5, 0.706, 0.695 (-0=>1.901)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 1.87, losses: 0.489, 0.694, 0.683 (-0=>1.866)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 1.83, losses: 0.476, 0.681, 0.676 (-0=>1.833)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 1.81, losses: 0.465, 0.675, 0.672 (-1=>1.804)\n\n\n0it [00:01, ?it/s]\n0it [00:16, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 1.82, losses: 0.474, 0.677, 0.671 (-2=>1.797)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 1.8, losses: 0.467, 0.669, 0.666 (-3=>1.786)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 1.8, losses: 0.467, 0.672, 0.665 (-2=>1.785)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 1.79, losses: 0.461, 0.671, 0.662 (-12=>1.785)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 1.81, losses: 0.466, 0.677, 0.664 (-22=>1.785)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 1.78, losses: 0.456, 0.663, 0.658 (-0=>1.777)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 1.81, losses: 0.469, 0.674, 0.671 (-10=>1.777)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 1.82, losses: 0.472, 0.677, 0.668 (-20=>1.777)\n\n\nDropping learning rate\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 1.81, losses: 0.466, 0.673, 0.668 (-2=>1.804)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 1.82, losses: 0.473, 0.677, 0.671 (-8=>1.791)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\niter: 210, loss: 1.85, losses: 0.483, 0.685, 0.681 (-7=>1.791)\n0it [00:00, ?it/s]\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 1.83, losses: 0.478, 0.682, 0.675 (-17=>1.791)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 1.85, losses: 0.487, 0.685, 0.683 (-27=>1.791)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 1.82, losses: 0.478, 0.671, 0.671 (-37=>1.791)\n\n\n0it [00:01, ?it/s]\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, finished (-47=>1.791)\n\n\n0it [00:00, ?it/s]\n0it [00:00, ?it/s]", "metrics": { "predict_time": 420.324331, "total_time": 420.493945 }, "output": [ "https://replicate.delivery/mgxm/e93fde39-7240-40ba-94be-0c7834fe59ae/tempfile.png", "https://replicate.delivery/mgxm/2de03213-09cc-4bf1-baea-2e361cbff80b/tempfile.png", "https://replicate.delivery/mgxm/361488e5-bb01-4e85-a827-8ca609969ebd/tempfile.png", "https://replicate.delivery/mgxm/7d194191-7470-4e2f-8640-1c82dc647a48/tempfile.png", "https://replicate.delivery/mgxm/c0d8ab27-bfe9-4034-8433-6937c3e85aaa/tempfile.png", "https://replicate.delivery/mgxm/a19e9a26-3aba-4ff8-941f-eaf2bbc5dc9f/tempfile.png", "https://replicate.delivery/mgxm/b707c115-e072-44c3-a9ff-72ecded71f1e/tempfile.png", "https://replicate.delivery/mgxm/6d562a14-3a1e-4fd3-be99-0a8699df46b5/tempfile.png", "https://replicate.delivery/mgxm/8307625c-1dee-4970-b18a-c1ade27339e8/tempfile.png", "https://replicate.delivery/mgxm/5927a52e-712c-499a-8704-2da1a14957e3/tempfile.png", "https://replicate.delivery/mgxm/b7bd9afb-88c2-47e0-9f67-6dba33ddb045/tempfile.png", "https://replicate.delivery/mgxm/3238ece4-4c1c-4ae0-91b1-b6da7159bbee/tempfile.png", "https://replicate.delivery/mgxm/c146f6b3-de88-445f-ab43-6d7a64204639/tempfile.png", "https://replicate.delivery/mgxm/510b2d42-a7bc-4b62-b729-b52af2524ba4/tempfile.png", "https://replicate.delivery/mgxm/fd7f1541-2cd2-4bf7-947f-e7da88b0f0aa/tempfile.png", "https://replicate.delivery/mgxm/97923bf0-b066-4694-8196-d804ac811cc1/tempfile.png", "https://replicate.delivery/mgxm/7ade4f63-5431-4a53-8f4e-4dc5998d0a5a/tempfile.png", "https://replicate.delivery/mgxm/19f0b765-2c68-45a4-b254-498cbb8786fb/tempfile.png", "https://replicate.delivery/mgxm/2c843552-80bd-4d03-8647-7cf7d5a50ed5/tempfile.png", "https://replicate.delivery/mgxm/0c9ee64e-d2ad-4b0e-9615-dc6f87d88324/tempfile.png", "https://replicate.delivery/mgxm/791760fc-b49b-49a3-b3df-311290274678/tempfile.png", "https://replicate.delivery/mgxm/6682241d-d2ef-4077-ba78-c03cdbcc8a3a/tempfile.png", "https://replicate.delivery/mgxm/4713280f-6602-4e6b-bd07-480fcc603f60/tempfile.png", "https://replicate.delivery/mgxm/a9ba320d-b627-418f-8b2f-e46a253b9355/tempfile.png", "https://replicate.delivery/mgxm/172f142d-7082-4d11-829f-d4e50bc52db6/tempfile.png", "https://replicate.delivery/mgxm/b8270a91-ef27-40ab-9eff-7993f191e17c/tempfile.png" ], "started_at": "2022-04-06T06:53:07.951064Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/al42ygxikbhujgqd2yzlz5s4jm", "cancel": "https://api.replicate.com/v1/predictions/al42ygxikbhujgqd2yzlz5s4jm/cancel" }, "version": "f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23" }
Generated in---> BasePixrayPredictor Predict Using seed: 7260706899850638684 All CLIP models already loaded: ['RN101', 'ViT-B/32', 'ViT-B/16'] drawer <vdiff.VdiffDrawer object at 0x7fc125e77250> needs ViT-B/16 clip_embed for drawer <vdiff.VdiffDrawer object at 0x7fc125e77250> is torch.Size([1, 512]) Using device: cuda:0 Optimising using: Adam Using text prompts: ['beautiful Steampunk lady'] iter: 0, loss: 2.77, losses: 0.766, 1.02, 0.987 (-0=>2.772) 0it [00:01, ?it/s] 0it [00:16, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.63, losses: 0.741, 0.967, 0.926 (-0=>2.634) 0it [00:01, ?it/s] 0it [00:16, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.54, losses: 0.727, 0.924, 0.887 (-3=>2.529) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.48, losses: 0.706, 0.889, 0.881 (-2=>2.452) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.29, losses: 0.64, 0.831, 0.82 (-0=>2.291) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.16, losses: 0.585, 0.793, 0.779 (-0=>2.157) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.01, losses: 0.537, 0.744, 0.725 (-0=>2.006) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 1.9, losses: 0.5, 0.706, 0.695 (-0=>1.901) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 1.87, losses: 0.489, 0.694, 0.683 (-0=>1.866) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 1.83, losses: 0.476, 0.681, 0.676 (-0=>1.833) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 1.81, losses: 0.465, 0.675, 0.672 (-1=>1.804) 0it [00:01, ?it/s] 0it [00:16, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 1.82, losses: 0.474, 0.677, 0.671 (-2=>1.797) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 1.8, losses: 0.467, 0.669, 0.666 (-3=>1.786) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 1.8, losses: 0.467, 0.672, 0.665 (-2=>1.785) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 1.79, losses: 0.461, 0.671, 0.662 (-12=>1.785) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 1.81, losses: 0.466, 0.677, 0.664 (-22=>1.785) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 1.78, losses: 0.456, 0.663, 0.658 (-0=>1.777) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 1.81, losses: 0.469, 0.674, 0.671 (-10=>1.777) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 1.82, losses: 0.472, 0.677, 0.668 (-20=>1.777) Dropping learning rate 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 1.81, losses: 0.466, 0.673, 0.668 (-2=>1.804) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 1.82, losses: 0.473, 0.677, 0.671 (-8=>1.791) 0it [00:01, ?it/s] 0it [00:15, ?it/s] iter: 210, loss: 1.85, losses: 0.483, 0.685, 0.681 (-7=>1.791) 0it [00:00, ?it/s] 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 1.83, losses: 0.478, 0.682, 0.675 (-17=>1.791) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 1.85, losses: 0.487, 0.685, 0.683 (-27=>1.791) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 1.82, losses: 0.478, 0.671, 0.671 (-37=>1.791) 0it [00:01, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 250, finished (-47=>1.791) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebfInput
- drawer
- vdiff
- prompts
- Watercolor painting of a beautiful old library
- settings
- vdiff_model: wikiart_256 scale: 3
{ "drawer": "vdiff", "prompts": "Watercolor painting of a beautiful old library", "settings": "vdiff_model: wikiart_256\nscale: 3\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf", { input: { drawer: "vdiff", prompts: "Watercolor painting of a beautiful old library", settings: "vdiff_model: wikiart_256\nscale: 3\n" } } ); // 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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf", input={ "drawer": "vdiff", "prompts": "Watercolor painting of a beautiful old library", "settings": "vdiff_model: wikiart_256\nscale: 3\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf", "input": { "drawer": "vdiff", "prompts": "Watercolor painting of a beautiful old library", "settings": "vdiff_model: wikiart_256\\nscale: 3\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-05-23T00:38:15.886460Z", "created_at": "2022-05-23T00:33:58.583679Z", "data_removed": false, "error": null, "id": "ehspd7vmunc7xdbgys752ptjki", "input": { "drawer": "vdiff", "prompts": "Watercolor painting of a beautiful old library", "settings": "vdiff_model: wikiart_256\nscale: 3\n" }, "logs": null, "metrics": { "predict_time": 256.92629, "total_time": 257.302781 }, "output": [ "https://replicate.delivery/mgxm/ff6c074a-f7cd-402b-bf76-e0909b36ce4b/tempfile.png", "https://replicate.delivery/mgxm/114f9f86-214a-4136-a1f6-e5b830693995/tempfile.png", "https://replicate.delivery/mgxm/8b48034b-6834-4f22-8dd6-ef00e19d2163/tempfile.png", "https://replicate.delivery/mgxm/a2a00f0e-51e5-4855-b883-5f20d5172430/tempfile.png", "https://replicate.delivery/mgxm/390ae63d-95ef-4f2a-8531-7f64a07ab1f2/tempfile.png", "https://replicate.delivery/mgxm/5246bb4a-1f59-4218-a0db-9668feae0a6e/tempfile.png", "https://replicate.delivery/mgxm/27d1967e-c239-4798-a3d4-99019af2cdb4/tempfile.png", "https://replicate.delivery/mgxm/2fdcc929-abb9-4ddc-bd61-27867d5679a7/tempfile.png", "https://replicate.delivery/mgxm/f2e72a17-6110-4fde-ac35-8fea52dac96d/tempfile.png", "https://replicate.delivery/mgxm/46fefad4-8c03-45e8-9f36-3a61e0e7168d/tempfile.png", "https://replicate.delivery/mgxm/5d6434bf-fc4b-4e31-909e-4a964cca3f75/tempfile.png", "https://replicate.delivery/mgxm/4903e461-0fbe-4f6c-95a1-7e701512bf6b/tempfile.png", "https://replicate.delivery/mgxm/ab0bcb22-11b9-4f1e-9af4-0a970486fda3/tempfile.png", "https://replicate.delivery/mgxm/e65df9a3-34f9-4dd1-ae30-d9182d8267c1/tempfile.png", "https://replicate.delivery/mgxm/8f00b146-e7d8-43d6-a1c8-3e8dfe7aad7a/tempfile.png", "https://replicate.delivery/mgxm/7beb5783-24e2-4dce-a957-1ba5252cc0fe/tempfile.png", "https://replicate.delivery/mgxm/c638ee2b-058b-4fee-a198-819b727558b3/tempfile.png", "https://replicate.delivery/mgxm/1eb7b60a-7ed1-4cd7-9c28-eb31e5ed1a0b/tempfile.png", "https://replicate.delivery/mgxm/3a11e439-118e-4fc2-8dbb-6b723934c120/tempfile.png", "https://replicate.delivery/mgxm/79397375-ee8f-4e8e-bd72-6d176f46e334/tempfile.png", "https://replicate.delivery/mgxm/f59a0b60-8de0-4347-ba7f-4c4fb0dc3ec4/tempfile.png", "https://replicate.delivery/mgxm/69d72da1-7ed7-4489-b768-474f3f5d1af0/tempfile.png", "https://replicate.delivery/mgxm/c99b1a8c-b2e6-4aa0-be96-867492b50e76/tempfile.png", "https://replicate.delivery/mgxm/483f26cc-f00a-413f-b958-f2a521200fc2/tempfile.png", "https://replicate.delivery/mgxm/db1673fa-97b5-4819-b2d5-fb216423f7e5/tempfile.png", "https://replicate.delivery/mgxm/1c40349a-d0de-4c28-9675-65f64726e7db/tempfile.png" ], "started_at": "2022-05-23T00:33:58.960170Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ehspd7vmunc7xdbgys752ptjki", "cancel": "https://api.replicate.com/v1/predictions/ehspd7vmunc7xdbgys752ptjki/cancel" }, "version": "5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf" }
Generated inPrediction
pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebfIDw3m7bc5gnndrdkklanfae5nezmStatusSucceededSourceWebHardware–Total durationCreatedInput
- drawer
- vdiff
- prompts
- A beautiful symmetrical portrait of a woman with red hair sitting on a subway train staring at an AI artist who is writing a prompt trending on artstation
- settings
- vdiff_model: cc12m_1 size: [456, 256] vector_prompts: None custom_loss: aesthetic,edge edge_color: white edge_thickness: 1
{ "drawer": "vdiff", "prompts": "A beautiful symmetrical portrait of a woman with red hair sitting on a subway train staring at an AI artist who is writing a prompt trending on artstation", "settings": "vdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\ncustom_loss: aesthetic,edge\nedge_color: white\nedge_thickness: 1\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf", { input: { drawer: "vdiff", prompts: "A beautiful symmetrical portrait of a woman with red hair sitting on a subway train staring at an AI artist who is writing a prompt trending on artstation", settings: "vdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\ncustom_loss: aesthetic,edge\nedge_color: white\nedge_thickness: 1\n" } } ); // 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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf", input={ "drawer": "vdiff", "prompts": "A beautiful symmetrical portrait of a woman with red hair sitting on a subway train staring at an AI artist who is writing a prompt trending on artstation", "settings": "vdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\ncustom_loss: aesthetic,edge\nedge_color: white\nedge_thickness: 1\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf", "input": { "drawer": "vdiff", "prompts": "A beautiful symmetrical portrait of a woman with red hair sitting on a subway train staring at an AI artist who is writing a prompt trending on artstation", "settings": "vdiff_model: cc12m_1\\nsize: [456, 256]\\nvector_prompts: None\\ncustom_loss: aesthetic,edge\\nedge_color: white\\nedge_thickness: 1\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-05-23T00:55:34.941117Z", "created_at": "2022-05-23T00:45:55.581787Z", "data_removed": false, "error": null, "id": "w3m7bc5gnndrdkklanfae5nezm", "input": { "drawer": "vdiff", "prompts": "A beautiful symmetrical portrait of a woman with red hair sitting on a subway train staring at an AI artist who is writing a prompt trending on artstation", "settings": "vdiff_model: cc12m_1\nsize: [456, 256]\nvector_prompts: None\ncustom_loss: aesthetic,edge\nedge_color: white\nedge_thickness: 1\n" }, "logs": null, "metrics": { "predict_time": 464.297377, "total_time": 579.35933 }, "output": [ "https://replicate.delivery/mgxm/c156194d-a25b-4d51-bc53-e58493b20707/tempfile.png", "https://replicate.delivery/mgxm/14f5e1c2-e4ef-4818-bfc3-686e03836d1a/tempfile.png", "https://replicate.delivery/mgxm/94f1ac3d-6fb1-4df6-85f1-2c662d53a586/tempfile.png", "https://replicate.delivery/mgxm/d65e665e-2b3a-4aef-ad64-a3e98c87a284/tempfile.png", "https://replicate.delivery/mgxm/71bdc687-8923-4efc-af38-49627db19425/tempfile.png", "https://replicate.delivery/mgxm/5cd6a902-f6ec-40b5-941e-82e2c1b6c023/tempfile.png", "https://replicate.delivery/mgxm/ef97f23c-c6a2-4aee-91d7-a4b28f5d4e1a/tempfile.png", "https://replicate.delivery/mgxm/f0e9d7b2-c749-40af-bba1-3724fd9847a2/tempfile.png", "https://replicate.delivery/mgxm/f1a3b8e2-8672-474f-a63f-e9a2a635b570/tempfile.png", "https://replicate.delivery/mgxm/c2fd0dee-0e6e-44a7-81ca-3558b1dd34bd/tempfile.png", "https://replicate.delivery/mgxm/bc463322-9af7-4e67-92db-a69ccddea3ec/tempfile.png", "https://replicate.delivery/mgxm/37e424a1-99d6-478b-8a21-2bf647d50f2b/tempfile.png", "https://replicate.delivery/mgxm/c651ebb5-811e-4c4b-bb9c-994e03d150a9/tempfile.png", "https://replicate.delivery/mgxm/9616cc4b-64d9-48c6-958d-a613344751a8/tempfile.png", "https://replicate.delivery/mgxm/8a501c25-2299-4649-bac2-3606e09d93af/tempfile.png", "https://replicate.delivery/mgxm/e09f6871-22ea-4e27-ab8a-483667ecf837/tempfile.png", "https://replicate.delivery/mgxm/a1d8315d-6719-43cf-a2e4-25205caf1991/tempfile.png", "https://replicate.delivery/mgxm/27390d34-bb64-4ef9-b6fe-9947fbda7fd0/tempfile.png", "https://replicate.delivery/mgxm/0c3eb1a6-5f4a-4a2b-874b-f1b83d4ce7ab/tempfile.png", "https://replicate.delivery/mgxm/b3e5367b-aab7-424e-a19f-44f90ab7deec/tempfile.png", "https://replicate.delivery/mgxm/618346ac-9180-4142-ae32-34a23f89031c/tempfile.png", "https://replicate.delivery/mgxm/ff030f63-d682-473e-af83-abb55aa15bcc/tempfile.png", "https://replicate.delivery/mgxm/07d82ce4-1655-4ef2-bb2e-395991e0c87c/tempfile.png", "https://replicate.delivery/mgxm/245dc0dc-34e7-42c9-9f9d-f3e078d167eb/tempfile.png", "https://replicate.delivery/mgxm/8a6c136c-a2b7-497e-a43f-8522950af2dd/tempfile.png", "https://replicate.delivery/mgxm/185539a7-f994-4d14-aa73-9d6e82094238/tempfile.png" ], "started_at": "2022-05-23T00:47:50.643740Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/w3m7bc5gnndrdkklanfae5nezm", "cancel": "https://api.replicate.com/v1/predictions/w3m7bc5gnndrdkklanfae5nezm/cancel" }, "version": "5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf" }
Generated inPrediction
pixray/text2image:b7a01578e4ce6eb522e5b0d40deec0a520b37f59b935c9be4d0882fb5a420537Input
- prompts
- a highly detailed architectural painting of a time portal
- settings
- aspect: square quality: best drawer: vqgan
{ "prompts": "a highly detailed architectural painting of a time portal", "settings": "aspect: square\nquality: best\ndrawer: vqgan" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:b7a01578e4ce6eb522e5b0d40deec0a520b37f59b935c9be4d0882fb5a420537", { input: { prompts: "a highly detailed architectural painting of a time portal", settings: "aspect: square\nquality: best\ndrawer: vqgan" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:b7a01578e4ce6eb522e5b0d40deec0a520b37f59b935c9be4d0882fb5a420537", input={ "prompts": "a highly detailed architectural painting of a time portal", "settings": "aspect: square\nquality: best\ndrawer: vqgan" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:b7a01578e4ce6eb522e5b0d40deec0a520b37f59b935c9be4d0882fb5a420537", "input": { "prompts": "a highly detailed architectural painting of a time portal", "settings": "aspect: square\\nquality: best\\ndrawer: vqgan" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-02-06T13:01:36.387776Z", "created_at": "2022-02-06T12:43:24.999662Z", "data_removed": false, "error": null, "id": "osg2pzwnfzcb7gjfk4va4g5oia", "input": { "prompts": "a highly detailed architectural painting of a time portal", "settings": "aspect: square\nquality: best\ndrawer: vqgan" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n16407834211378167008\nWorking with z of shape (1, 256, 16, 16) = 65536 dimensions.\nloaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth\nVQLPIPSWithDiscriminator running with hinge loss.\nRestored from models/vqgan_imagenet_f16_16384.ckpt\nLoaded CLIP RN50x4: 288x288 and 178.30M params\nLoaded CLIP ViT-B/32: 224x224 and 151.28M params\nLoaded CLIP ViT-B/16: 224x224 and 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['a highly detailed architectural painting of a time portal']\n\n0it [00:00, ?it/s]\niter: 0, loss: 2.79, losses: 0.774, 0.0803, 0.899, 0.0614, 0.913, 0.0645 (-0=>2.793)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.35, losses: 0.621, 0.0829, 0.766, 0.0616, 0.76, 0.0615 (-0=>2.353)\n\n0it [00:01, ?it/s]\n\n0it [00:27, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.25, losses: 0.59, 0.0835, 0.722, 0.0684, 0.718, 0.0669 (-1=>2.24)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.16, losses: 0.56, 0.0843, 0.699, 0.0693, 0.683, 0.0679 (-0=>2.163)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.11, losses: 0.526, 0.0849, 0.689, 0.0685, 0.671, 0.0676 (-0=>2.107)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.09, losses: 0.532, 0.0843, 0.683, 0.0683, 0.656, 0.0664 (-4=>2.071)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.05, losses: 0.514, 0.0843, 0.678, 0.0688, 0.64, 0.068 (-0=>2.053)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.05, losses: 0.517, 0.0834, 0.675, 0.0697, 0.64, 0.0675 (-10=>2.053)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.05, losses: 0.504, 0.0839, 0.676, 0.0688, 0.648, 0.0676 (-7=>2.038)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.03, losses: 0.502, 0.0841, 0.672, 0.0681, 0.637, 0.0679 (-2=>2.015)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.02, losses: 0.5, 0.0833, 0.674, 0.0683, 0.627, 0.0671 (-12=>2.015)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.03, losses: 0.507, 0.0843, 0.674, 0.0687, 0.625, 0.0674 (-8=>2.011)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.01, losses: 0.5, 0.0852, 0.672, 0.0687, 0.62, 0.0675 (-6=>1.998)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 1.99, losses: 0.492, 0.0834, 0.665, 0.069, 0.614, 0.0686 (-1=>1.99)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.01, losses: 0.488, 0.0847, 0.675, 0.0702, 0.623, 0.068 (-11=>1.99)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.04, losses: 0.51, 0.0842, 0.674, 0.0693, 0.632, 0.0682 (-21=>1.99)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.02, losses: 0.485, 0.0846, 0.681, 0.0706, 0.629, 0.0695 (-5=>1.985)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.02, losses: 0.503, 0.0836, 0.666, 0.07, 0.629, 0.069 (-3=>1.964)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 1.99, losses: 0.492, 0.0843, 0.666, 0.0689, 0.609, 0.071 (-13=>1.964)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.01, losses: 0.493, 0.0849, 0.67, 0.0689, 0.624, 0.0696 (-23=>1.964)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2, losses: 0.489, 0.0826, 0.67, 0.0689, 0.618, 0.0689 (-9=>1.958)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 1.97, losses: 0.482, 0.0848, 0.661, 0.0686, 0.6, 0.0692 (-7=>1.951)\n\n0it [00:01, ?it/s]\n---> BasePixrayPredictor Predict\nUsing seed:\n17837617044840653843\nWorking with z of shape (1, 256, 16, 16) = 65536 dimensions.\nloaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth\nVQLPIPSWithDiscriminator running with hinge loss.\nRestored from models/vqgan_imagenet_f16_16384.ckpt\nAll CLIP models already loaded:\n['RN50x4', 'ViT-B/32', 'ViT-B/16']\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['a highly detailed architectural painting of a time portal']\n\n0it [00:00, ?it/s]\n\n0it [00:26, ?it/s]\niter: 0, loss: 2.79, losses: 0.771, 0.0788, 0.899, 0.0611, 0.918, 0.0651 (-0=>2.793)\n\n0it [00:01, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 1.99, losses: 0.484, 0.0856, 0.668, 0.0705, 0.615, 0.0686 (-17=>1.951)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.35, losses: 0.63, 0.0849, 0.76, 0.0628, 0.753, 0.0634 (-0=>2.355)\n\n0it [00:01, ?it/s]\niter: 230, loss: 2, losses: 0.498, 0.0829, 0.668, 0.0694, 0.614, 0.0694 (-7=>1.947)\n\n0it [00:01, ?it/s]\n\n0it [00:27, ?it/s]\n\n0it [00:00, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.22, losses: 0.567, 0.0857, 0.73, 0.0665, 0.702, 0.0649 (-0=>2.216)\n\n0it [00:01, ?it/s]\niter: 240, loss: 2.01, losses: 0.49, 0.0837, 0.68, 0.0691, 0.618, 0.0701 (-17=>1.947)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.16, losses: 0.54, 0.0862, 0.717, 0.0665, 0.681, 0.0661 (-2=>2.148)\n\n0it [00:01, ?it/s]\niter: 250, loss: 1.98, losses: 0.488, 0.0838, 0.673, 0.0682, 0.598, 0.0684 (-27=>1.947)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.14, losses: 0.536, 0.0849, 0.709, 0.0673, 0.674, 0.0662 (-1=>2.112)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 1.98, losses: 0.474, 0.0851, 0.67, 0.0696, 0.611, 0.069 (-37=>1.947)\n\n0it [00:01, ?it/s]\nDropping learning rate\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.09, losses: 0.518, 0.0852, 0.695, 0.0684, 0.652, 0.0683 (-1=>2.075)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 1.98, losses: 0.48, 0.0848, 0.676, 0.0682, 0.603, 0.0704 (-3=>1.937)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.1, losses: 0.51, 0.084, 0.706, 0.068, 0.665, 0.0665 (-5=>2.05)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 1.98, losses: 0.479, 0.085, 0.667, 0.0698, 0.606, 0.0698 (-3=>1.929)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.07, losses: 0.513, 0.086, 0.689, 0.0686, 0.647, 0.0685 (-7=>2.032)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 1.95, losses: 0.475, 0.0846, 0.656, 0.0711, 0.591, 0.0711 (-13=>1.929)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.05, losses: 0.509, 0.0844, 0.673, 0.0679, 0.645, 0.0683 (-2=>2.031)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, loss: 1.96, losses: 0.466, 0.0838, 0.667, 0.069, 0.605, 0.0688 (-2=>1.909)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.04, losses: 0.508, 0.0844, 0.672, 0.0683, 0.634, 0.0688 (-2=>2.027)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 310, loss: 1.94, losses: 0.46, 0.0849, 0.66, 0.0694, 0.598, 0.0697 (-12=>1.909)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.04, losses: 0.506, 0.0833, 0.679, 0.0686, 0.639, 0.0681 (-5=>2.012)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 320, loss: 1.97, losses: 0.482, 0.0849, 0.661, 0.0703, 0.598, 0.0715 (-22=>1.909)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.02, losses: 0.494, 0.0843, 0.67, 0.0691, 0.635, 0.0699 (-6=> 2)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 330, loss: 1.93, losses: 0.464, 0.0836, 0.66, 0.0684, 0.589, 0.07 (-32=>1.909)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.03, losses: 0.495, 0.0838, 0.674, 0.0685, 0.642, 0.0679 (-16=> 2)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 340, loss: 1.97, losses: 0.479, 0.0841, 0.67, 0.069, 0.597, 0.0707 (-42=>1.909)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.02, losses: 0.487, 0.0848, 0.675, 0.0683, 0.633, 0.0681 (-26=> 2)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 350, finished (-52=>1.909)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 964.517465, "total_time": 1091.388114 }, "output": [ { "file": "https://replicate.delivery/mgxm/d5cada86-f00e-480d-8e11-4cca0c5344f1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1387c368-8c57-489a-a032-478833f4b391/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/20f55b1c-068f-4dc4-bf81-3ff0e8a02428/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/981ef31a-8af7-4d51-a84a-d66a0645bf50/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f30203be-2d06-4f4d-8aff-beaea93f0212/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/22b99c37-d2f5-4df5-a71a-f42541a6e737/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5769efe0-1a87-46e6-8634-f1cd929f98d0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/77139acd-ab0c-4023-b67c-f50c7f166ef2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/eaa0c9c4-c4c8-47f1-a18c-64e46f2a1559/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/41eaa4a3-4255-494b-bf2d-5ae2138e3921/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8950967f-cbe9-4e97-a589-99025bb8f3e4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/98d8af1f-a6ef-4918-8252-3754b375e729/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/186e279a-4aa8-4a4c-a835-e64e14f08416/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/04b3a3b2-15d1-438a-9150-3c71a5eed791/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/695fe88d-4713-4270-9bf5-05d663bbeda6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e2e59452-ffcf-434b-99b1-bddcf774ae13/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b918860b-ba2a-47d4-9691-118582fa643e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/dd78c363-31d1-4844-99f3-51c1b965e5b8/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1e85d9ec-ae13-4033-b200-c241604661f2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5fd0a7c4-1d68-49ca-98d0-4c061218ce5c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ca0a2907-00b1-4d66-9066-a7fa53c88ab5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/754996b4-5177-41ee-8d26-2ac9a640d846/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c1cd59e5-77b4-4894-a8e3-025d1871b7ed/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/362fa686-39a9-47e6-a7d5-e0e5ea4d7742/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ddff37c4-2876-46d6-9ada-e1ec4f301de9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/00ce2158-b6d8-432e-a2a6-e782d86e120b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/894884ab-d2a8-4be3-bab1-825bb9cbc8cf/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/07468a87-a2f6-4193-a37d-58342ce0f242/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/de1e749b-c8dc-4bae-88e4-81f9075b6e36/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/00ff2686-ea23-436c-9295-2d24a765bbaa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f4566ec2-fffb-4d58-933a-f79694bd9a0d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8eb172b0-1ecf-4caf-8e88-1ee84a30d99f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/68083982-4e7a-4489-8e6c-0f0ab5cedb87/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2cec70bb-8f17-429e-9a84-5fe332cef466/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/42dfbb0f-4363-40a6-b148-3be95fae0b7b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/286556d1-2693-4b14-a9a7-d7f8b9cc1c62/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/de127885-e098-4f4e-8422-58951ff3d4a5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6768020c-09d2-4f4c-8dde-22cd3e76eabd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/73bf9843-839e-4662-863f-0ac502aa857c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4712f71a-f981-4a44-a1bc-7dc94de86ce1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b6fba3b1-f45c-48a5-959a-ab2fbb613278/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0ce9e8b8-aa1e-4cac-bb5d-432746f40a49/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d11b43a1-5e92-4695-b31d-6c9c2fd775b2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/799b56e7-13d5-4b63-98a6-f5801efba921/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/bee40729-1c36-4db1-ba40-cc191a70b313/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f0eb8638-a110-4731-ae23-b0e1537f0611/tempfile.png" } ], "started_at": "2022-02-06T12:45:31.870311Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/osg2pzwnfzcb7gjfk4va4g5oia", "cancel": "https://api.replicate.com/v1/predictions/osg2pzwnfzcb7gjfk4va4g5oia/cancel" }, "version": "b7a01578e4ce6eb522e5b0d40deec0a520b37f59b935c9be4d0882fb5a420537" }
Generated in---> BasePixrayPredictor Predict Using seed: 16407834211378167008 Working with z of shape (1, 256, 16, 16) = 65536 dimensions. loaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth VQLPIPSWithDiscriminator running with hinge loss. Restored from models/vqgan_imagenet_f16_16384.ckpt Loaded CLIP RN50x4: 288x288 and 178.30M params Loaded CLIP ViT-B/32: 224x224 and 151.28M params Loaded CLIP ViT-B/16: 224x224 and 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['a highly detailed architectural painting of a time portal'] 0it [00:00, ?it/s] iter: 0, loss: 2.79, losses: 0.774, 0.0803, 0.899, 0.0614, 0.913, 0.0645 (-0=>2.793) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.35, losses: 0.621, 0.0829, 0.766, 0.0616, 0.76, 0.0615 (-0=>2.353) 0it [00:01, ?it/s] 0it [00:27, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.25, losses: 0.59, 0.0835, 0.722, 0.0684, 0.718, 0.0669 (-1=>2.24) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.16, losses: 0.56, 0.0843, 0.699, 0.0693, 0.683, 0.0679 (-0=>2.163) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.11, losses: 0.526, 0.0849, 0.689, 0.0685, 0.671, 0.0676 (-0=>2.107) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.09, losses: 0.532, 0.0843, 0.683, 0.0683, 0.656, 0.0664 (-4=>2.071) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.05, losses: 0.514, 0.0843, 0.678, 0.0688, 0.64, 0.068 (-0=>2.053) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.05, losses: 0.517, 0.0834, 0.675, 0.0697, 0.64, 0.0675 (-10=>2.053) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.05, losses: 0.504, 0.0839, 0.676, 0.0688, 0.648, 0.0676 (-7=>2.038) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.03, losses: 0.502, 0.0841, 0.672, 0.0681, 0.637, 0.0679 (-2=>2.015) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.02, losses: 0.5, 0.0833, 0.674, 0.0683, 0.627, 0.0671 (-12=>2.015) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.03, losses: 0.507, 0.0843, 0.674, 0.0687, 0.625, 0.0674 (-8=>2.011) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.01, losses: 0.5, 0.0852, 0.672, 0.0687, 0.62, 0.0675 (-6=>1.998) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 1.99, losses: 0.492, 0.0834, 0.665, 0.069, 0.614, 0.0686 (-1=>1.99) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.01, losses: 0.488, 0.0847, 0.675, 0.0702, 0.623, 0.068 (-11=>1.99) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.04, losses: 0.51, 0.0842, 0.674, 0.0693, 0.632, 0.0682 (-21=>1.99) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.02, losses: 0.485, 0.0846, 0.681, 0.0706, 0.629, 0.0695 (-5=>1.985) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.02, losses: 0.503, 0.0836, 0.666, 0.07, 0.629, 0.069 (-3=>1.964) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 1.99, losses: 0.492, 0.0843, 0.666, 0.0689, 0.609, 0.071 (-13=>1.964) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.01, losses: 0.493, 0.0849, 0.67, 0.0689, 0.624, 0.0696 (-23=>1.964) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2, losses: 0.489, 0.0826, 0.67, 0.0689, 0.618, 0.0689 (-9=>1.958) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 1.97, losses: 0.482, 0.0848, 0.661, 0.0686, 0.6, 0.0692 (-7=>1.951) 0it [00:01, ?it/s] ---> BasePixrayPredictor Predict Using seed: 17837617044840653843 Working with z of shape (1, 256, 16, 16) = 65536 dimensions. loaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth VQLPIPSWithDiscriminator running with hinge loss. Restored from models/vqgan_imagenet_f16_16384.ckpt All CLIP models already loaded: ['RN50x4', 'ViT-B/32', 'ViT-B/16'] Using device: cuda:0 Optimising using: Adam Using text prompts: ['a highly detailed architectural painting of a time portal'] 0it [00:00, ?it/s] 0it [00:26, ?it/s] iter: 0, loss: 2.79, losses: 0.771, 0.0788, 0.899, 0.0611, 0.918, 0.0651 (-0=>2.793) 0it [00:01, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 1.99, losses: 0.484, 0.0856, 0.668, 0.0705, 0.615, 0.0686 (-17=>1.951) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.35, losses: 0.63, 0.0849, 0.76, 0.0628, 0.753, 0.0634 (-0=>2.355) 0it [00:01, ?it/s] iter: 230, loss: 2, losses: 0.498, 0.0829, 0.668, 0.0694, 0.614, 0.0694 (-7=>1.947) 0it [00:01, ?it/s] 0it [00:27, ?it/s] 0it [00:00, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.22, losses: 0.567, 0.0857, 0.73, 0.0665, 0.702, 0.0649 (-0=>2.216) 0it [00:01, ?it/s] iter: 240, loss: 2.01, losses: 0.49, 0.0837, 0.68, 0.0691, 0.618, 0.0701 (-17=>1.947) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.16, losses: 0.54, 0.0862, 0.717, 0.0665, 0.681, 0.0661 (-2=>2.148) 0it [00:01, ?it/s] iter: 250, loss: 1.98, losses: 0.488, 0.0838, 0.673, 0.0682, 0.598, 0.0684 (-27=>1.947) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.14, losses: 0.536, 0.0849, 0.709, 0.0673, 0.674, 0.0662 (-1=>2.112) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 1.98, losses: 0.474, 0.0851, 0.67, 0.0696, 0.611, 0.069 (-37=>1.947) 0it [00:01, ?it/s] Dropping learning rate 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.09, losses: 0.518, 0.0852, 0.695, 0.0684, 0.652, 0.0683 (-1=>2.075) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 1.98, losses: 0.48, 0.0848, 0.676, 0.0682, 0.603, 0.0704 (-3=>1.937) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.1, losses: 0.51, 0.084, 0.706, 0.068, 0.665, 0.0665 (-5=>2.05) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 1.98, losses: 0.479, 0.085, 0.667, 0.0698, 0.606, 0.0698 (-3=>1.929) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.07, losses: 0.513, 0.086, 0.689, 0.0686, 0.647, 0.0685 (-7=>2.032) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 1.95, losses: 0.475, 0.0846, 0.656, 0.0711, 0.591, 0.0711 (-13=>1.929) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.05, losses: 0.509, 0.0844, 0.673, 0.0679, 0.645, 0.0683 (-2=>2.031) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 300, loss: 1.96, losses: 0.466, 0.0838, 0.667, 0.069, 0.605, 0.0688 (-2=>1.909) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.04, losses: 0.508, 0.0844, 0.672, 0.0683, 0.634, 0.0688 (-2=>2.027) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 310, loss: 1.94, losses: 0.46, 0.0849, 0.66, 0.0694, 0.598, 0.0697 (-12=>1.909) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.04, losses: 0.506, 0.0833, 0.679, 0.0686, 0.639, 0.0681 (-5=>2.012) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 320, loss: 1.97, losses: 0.482, 0.0849, 0.661, 0.0703, 0.598, 0.0715 (-22=>1.909) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.02, losses: 0.494, 0.0843, 0.67, 0.0691, 0.635, 0.0699 (-6=> 2) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 330, loss: 1.93, losses: 0.464, 0.0836, 0.66, 0.0684, 0.589, 0.07 (-32=>1.909) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.03, losses: 0.495, 0.0838, 0.674, 0.0685, 0.642, 0.0679 (-16=> 2) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 340, loss: 1.97, losses: 0.479, 0.0841, 0.67, 0.069, 0.597, 0.0707 (-42=>1.909) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.02, losses: 0.487, 0.0848, 0.675, 0.0683, 0.633, 0.0681 (-26=> 2) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 350, finished (-52=>1.909) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364Input
- prompts
- Wario was flipping through the channels when he came across an interesting news report. It seemed there was a hostage crisis happening in Iran. Wario was curious to know more so he turned to the new channel that was airing the report. Wario was shocked to see that there was a picture of him on the screen.
- settings
- drawer: pixel custom_loss: aesthetic:0.2
{ "prompts": "Wario was flipping through the channels when he came across an interesting news report. It seemed there was a hostage crisis happening in Iran. Wario was curious to know more so he turned to the new channel that was airing the report. Wario was shocked to see that there was a picture of him on the screen.", "settings": "drawer: pixel\ncustom_loss: aesthetic:0.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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", { input: { prompts: "Wario was flipping through the channels when he came across an interesting news report. It seemed there was a hostage crisis happening in Iran. Wario was curious to know more so he turned to the new channel that was airing the report. Wario was shocked to see that there was a picture of him on the screen.", settings: "drawer: pixel\ncustom_loss: aesthetic:0.2" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", input={ "prompts": "Wario was flipping through the channels when he came across an interesting news report. It seemed there was a hostage crisis happening in Iran. Wario was curious to know more so he turned to the new channel that was airing the report. Wario was shocked to see that there was a picture of him on the screen.", "settings": "drawer: pixel\ncustom_loss: aesthetic:0.2" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", "input": { "prompts": "Wario was flipping through the channels when he came across an interesting news report. It seemed there was a hostage crisis happening in Iran. Wario was curious to know more so he turned to the new channel that was airing the report. Wario was shocked to see that there was a picture of him on the screen.", "settings": "drawer: pixel\\ncustom_loss: aesthetic:0.2" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-02-07T09:25:38.607634Z", "created_at": "2022-02-07T09:16:50.417474Z", "data_removed": false, "error": null, "id": "kwolcl4t2bdbzdkbhnz6supcd4", "input": { "prompts": "Wario was flipping through the channels when he came across an interesting news report. It seemed there was a hostage crisis happening in Iran. Wario was curious to know more so he turned to the new channel that was airing the report. Wario was shocked to see that there was a picture of him on the screen.", "settings": "drawer: pixel\ncustom_loss: aesthetic:0.2" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n11106636977606212667\nRunning pixeldrawer with 80x45 grid\nLoaded CLIP RN50: 224x224 and 102.01M params\nLoaded CLIP ViT-B/32: 224x224 and 151.28M params\nLoaded CLIP ViT-B/16: 224x224 and 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['Wario was flipping through the channels when he came across an interesting news report. It seemed there was a hostage crisis happening in Iran. Wario was curious to know more so he turned to the new channel that was airing the report. Wario was shocked to see that there was a picture of him on the screen.']\nusing custom losses: aesthetic:0.2\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 3.15, losses: 1.01, 0.0866, 0.889, 0.0619, 0.889, 0.0642, 0.145 (-0=>3.147)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.78, losses: 0.866, 0.088, 0.758, 0.0651, 0.774, 0.0655, 0.161 (-1=>2.777)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.63, losses: 0.813, 0.0907, 0.705, 0.0693, 0.732, 0.0686, 0.156 (-0=>2.635)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.56, losses: 0.787, 0.091, 0.684, 0.0696, 0.712, 0.0691, 0.147 (-0=>2.559)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.5, losses: 0.764, 0.0909, 0.673, 0.0694, 0.692, 0.0691, 0.144 (-2=>2.503)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.47, losses: 0.751, 0.0908, 0.665, 0.0691, 0.681, 0.0694, 0.145 (-1=>2.45)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.4, losses: 0.736, 0.0911, 0.642, 0.0712, 0.656, 0.0716, 0.137 (-7=>2.4)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.38, losses: 0.728, 0.0928, 0.635, 0.0719, 0.645, 0.073, 0.138 (-1=>2.378)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.33, losses: 0.707, 0.0957, 0.626, 0.0749, 0.623, 0.0748, 0.133 (-0=>2.334)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.31, losses: 0.696, 0.0965, 0.62, 0.0747, 0.617, 0.0749, 0.132 (-0=>2.312)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.31, losses: 0.692, 0.0953, 0.619, 0.0746, 0.619, 0.074, 0.134 (-6=>2.298)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.27, losses: 0.682, 0.0977, 0.612, 0.0759, 0.599, 0.0756, 0.132 (-1=>2.266)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.25, losses: 0.673, 0.0983, 0.602, 0.0759, 0.593, 0.0759, 0.129 (-0=>2.248)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.24, losses: 0.675, 0.0967, 0.606, 0.0759, 0.585, 0.0754, 0.128 (-1=>2.212)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.23, losses: 0.678, 0.0968, 0.599, 0.0755, 0.58, 0.0753, 0.127 (-3=>2.21)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.22, losses: 0.681, 0.0979, 0.586, 0.0769, 0.578, 0.0757, 0.129 (-5=>2.193)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.23, losses: 0.685, 0.097, 0.586, 0.0759, 0.578, 0.0757, 0.13 (-2=>2.16)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.16, losses: 0.66, 0.0973, 0.563, 0.0782, 0.561, 0.0771, 0.125 (-12=>2.16)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.19, losses: 0.676, 0.0957, 0.571, 0.0779, 0.573, 0.0757, 0.125 (-2=>2.153)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.18, losses: 0.673, 0.0952, 0.567, 0.0769, 0.567, 0.0761, 0.126 (-7=>2.136)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.17, losses: 0.67, 0.097, 0.563, 0.0772, 0.565, 0.0763, 0.125 (-4=>2.121)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.14, losses: 0.657, 0.096, 0.559, 0.0776, 0.554, 0.0757, 0.122 (-14=>2.121)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.13, losses: 0.652, 0.0961, 0.552, 0.0786, 0.554, 0.0767, 0.123 (-24=>2.121)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.18, losses: 0.672, 0.096, 0.567, 0.0773, 0.566, 0.0752, 0.125 (-3=>2.139)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.17, losses: 0.658, 0.0977, 0.568, 0.0777, 0.565, 0.0758, 0.128 (-1=>2.123)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.14, losses: 0.648, 0.0987, 0.559, 0.0791, 0.551, 0.0758, 0.124 (-6=>2.102)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.12, losses: 0.64, 0.0974, 0.554, 0.0781, 0.554, 0.0771, 0.121 (-9=>2.099)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.1, losses: 0.636, 0.0982, 0.549, 0.0795, 0.541, 0.0778, 0.118 (-3=>2.094)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.09, losses: 0.637, 0.0975, 0.543, 0.0797, 0.54, 0.0781, 0.119 (-13=>2.094)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.12, losses: 0.645, 0.0973, 0.555, 0.0788, 0.55, 0.0763, 0.121 (-23=>2.094)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-9=>2.09)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 480.821533, "total_time": 528.19016 }, "output": [ { "file": "https://replicate.delivery/mgxm/c540f603-0b71-462c-ba13-691f6900c69e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/44446ad7-88b9-42d2-a82e-389ac5f93487/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/304db5fc-139b-4bc9-ba87-cae5eeee2368/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/86a5de4f-693a-419f-88c9-ec71cc2da4ed/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b9c514cc-7d14-4f68-9b50-80047ee0901b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/dd979b29-004b-44d8-8d42-0391f8014e29/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/63dd1237-8433-4bb4-89ae-567488bf1703/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/eae3a273-cc9a-4e62-924f-1d61aff117a6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/313c3afb-5342-4b9e-9f43-e75edae3d865/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d2e7a77e-8c51-4564-98f8-bf68178b8810/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/57652906-1b63-427e-832b-208d9a7efde5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ba8d9be7-9d87-42ca-856e-d3312c1d330e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2ffd7561-14da-4217-8124-fb3f1cc192c2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8aa4113d-e575-49b5-8d0e-78d38f25986a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/78c5953c-e37f-485a-838e-1c64000ca05a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f8ea2975-3005-4d9d-a9c8-91c6d6d6d3ea/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0c4d1a7f-84e5-4aa0-96ca-8bb1ad7cf6e0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8db879e7-1b1e-4d3c-87d1-38b64fbebd2a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e0ec3c69-4dde-43ce-b944-dad0a6f88db0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/04e45f99-6030-47e7-83a3-f5c8259c004a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/df73f6cc-5f9e-46eb-8688-d3943c4f88dd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/233f66b4-029b-40cd-874d-34f649c90aec/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/640f9518-d687-463c-945c-4e183e287c08/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ea3c7e08-bb97-438f-8e58-84c7a7ea1c50/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/18c021e4-e931-42d4-91bb-e9721cf1915f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/30bb9661-36cf-434a-ac08-951ab088a9a7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f89f8f47-11ec-467f-b997-0e307b9768b3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/368ef1f4-9739-440a-b2d9-d794f900e172/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/24b00f38-ca96-4a3d-8285-c8125aa5b15f/tempfile.png" } ], "started_at": "2022-02-07T09:17:37.786101Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/kwolcl4t2bdbzdkbhnz6supcd4", "cancel": "https://api.replicate.com/v1/predictions/kwolcl4t2bdbzdkbhnz6supcd4/cancel" }, "version": "d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364" }
Generated in---> BasePixrayPredictor Predict Using seed: 11106636977606212667 Running pixeldrawer with 80x45 grid Loaded CLIP RN50: 224x224 and 102.01M params Loaded CLIP ViT-B/32: 224x224 and 151.28M params Loaded CLIP ViT-B/16: 224x224 and 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['Wario was flipping through the channels when he came across an interesting news report. It seemed there was a hostage crisis happening in Iran. Wario was curious to know more so he turned to the new channel that was airing the report. Wario was shocked to see that there was a picture of him on the screen.'] using custom losses: aesthetic:0.2 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 3.15, losses: 1.01, 0.0866, 0.889, 0.0619, 0.889, 0.0642, 0.145 (-0=>3.147) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.78, losses: 0.866, 0.088, 0.758, 0.0651, 0.774, 0.0655, 0.161 (-1=>2.777) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.63, losses: 0.813, 0.0907, 0.705, 0.0693, 0.732, 0.0686, 0.156 (-0=>2.635) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.56, losses: 0.787, 0.091, 0.684, 0.0696, 0.712, 0.0691, 0.147 (-0=>2.559) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.5, losses: 0.764, 0.0909, 0.673, 0.0694, 0.692, 0.0691, 0.144 (-2=>2.503) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.47, losses: 0.751, 0.0908, 0.665, 0.0691, 0.681, 0.0694, 0.145 (-1=>2.45) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.4, losses: 0.736, 0.0911, 0.642, 0.0712, 0.656, 0.0716, 0.137 (-7=>2.4) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.38, losses: 0.728, 0.0928, 0.635, 0.0719, 0.645, 0.073, 0.138 (-1=>2.378) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.33, losses: 0.707, 0.0957, 0.626, 0.0749, 0.623, 0.0748, 0.133 (-0=>2.334) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.31, losses: 0.696, 0.0965, 0.62, 0.0747, 0.617, 0.0749, 0.132 (-0=>2.312) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.31, losses: 0.692, 0.0953, 0.619, 0.0746, 0.619, 0.074, 0.134 (-6=>2.298) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.27, losses: 0.682, 0.0977, 0.612, 0.0759, 0.599, 0.0756, 0.132 (-1=>2.266) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.25, losses: 0.673, 0.0983, 0.602, 0.0759, 0.593, 0.0759, 0.129 (-0=>2.248) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.24, losses: 0.675, 0.0967, 0.606, 0.0759, 0.585, 0.0754, 0.128 (-1=>2.212) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.23, losses: 0.678, 0.0968, 0.599, 0.0755, 0.58, 0.0753, 0.127 (-3=>2.21) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.22, losses: 0.681, 0.0979, 0.586, 0.0769, 0.578, 0.0757, 0.129 (-5=>2.193) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.23, losses: 0.685, 0.097, 0.586, 0.0759, 0.578, 0.0757, 0.13 (-2=>2.16) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.16, losses: 0.66, 0.0973, 0.563, 0.0782, 0.561, 0.0771, 0.125 (-12=>2.16) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.19, losses: 0.676, 0.0957, 0.571, 0.0779, 0.573, 0.0757, 0.125 (-2=>2.153) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.18, losses: 0.673, 0.0952, 0.567, 0.0769, 0.567, 0.0761, 0.126 (-7=>2.136) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.17, losses: 0.67, 0.097, 0.563, 0.0772, 0.565, 0.0763, 0.125 (-4=>2.121) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.14, losses: 0.657, 0.096, 0.559, 0.0776, 0.554, 0.0757, 0.122 (-14=>2.121) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.13, losses: 0.652, 0.0961, 0.552, 0.0786, 0.554, 0.0767, 0.123 (-24=>2.121) 0it [00:00, ?it/s] Dropping learning rate 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.18, losses: 0.672, 0.096, 0.567, 0.0773, 0.566, 0.0752, 0.125 (-3=>2.139) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.17, losses: 0.658, 0.0977, 0.568, 0.0777, 0.565, 0.0758, 0.128 (-1=>2.123) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.14, losses: 0.648, 0.0987, 0.559, 0.0791, 0.551, 0.0758, 0.124 (-6=>2.102) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.12, losses: 0.64, 0.0974, 0.554, 0.0781, 0.554, 0.0771, 0.121 (-9=>2.099) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.1, losses: 0.636, 0.0982, 0.549, 0.0795, 0.541, 0.0778, 0.118 (-3=>2.094) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.09, losses: 0.637, 0.0975, 0.543, 0.0797, 0.54, 0.0781, 0.119 (-13=>2.094) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.12, losses: 0.645, 0.0973, 0.555, 0.0788, 0.55, 0.0763, 0.121 (-23=>2.094) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-9=>2.09) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364Input
- prompts
- The anatomy of Cthulhu
- settings
{ "prompts": "The anatomy of Cthulhu", "settings": "\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", { input: { prompts: "The anatomy of Cthulhu", settings: "\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", input={ "prompts": "The anatomy of Cthulhu", "settings": "\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", "input": { "prompts": "The anatomy of Cthulhu", "settings": "\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-02-07T22:56:07.764031Z", "created_at": "2022-02-07T22:49:20.657159Z", "data_removed": false, "error": null, "id": "wmgr2critzeh5lijmbovlc3z3e", "input": { "prompts": "The anatomy of Cthulhu", "settings": "\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n11594066339298540349\nLoaded CLIP RN50: 224x224 and 102.01M params\nLoaded CLIP ViT-B/32: 224x224 and 151.28M params\nLoaded CLIP ViT-B/16: 224x224 and 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['The anatomy of Cthulhu']\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 3.18, losses: 1.05, 0.0867, 0.972, 0.0631, 0.947, 0.0634 (-0=>3.185)\n\n0it [00:00, ?it/s]\n\n0it [00:10, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 3.11, losses: 1.03, 0.0917, 0.931, 0.0616, 0.934, 0.0622 (-1=>3.109)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 3.05, losses: 1.02, 0.0901, 0.91, 0.0624, 0.908, 0.0629 (-0=>3.054)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 3.05, losses: 1.01, 0.0903, 0.913, 0.0627, 0.903, 0.0629 (-3=>3.033)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.99, losses: 1.01, 0.0889, 0.888, 0.0639, 0.88, 0.0642 (-0=>2.991)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.92, losses: 0.987, 0.09, 0.875, 0.0626, 0.846, 0.0636 (-0=>2.923)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.88, losses: 0.967, 0.0927, 0.868, 0.0641, 0.822, 0.0647 (-1=>2.824)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.77, losses: 0.924, 0.0932, 0.826, 0.0663, 0.794, 0.0664 (-0=>2.771)\n\n0it [00:00, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.67, losses: 0.882, 0.0941, 0.786, 0.0688, 0.77, 0.0693 (-0=>2.67)\n\n0it [00:00, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.59, losses: 0.846, 0.0939, 0.76, 0.0693, 0.749, 0.069 (-0=>2.587)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.56, losses: 0.825, 0.0937, 0.756, 0.0701, 0.744, 0.07 (-0=>2.558)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.53, losses: 0.818, 0.0939, 0.745, 0.0688, 0.735, 0.07 (-2=>2.528)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.54, losses: 0.825, 0.0931, 0.746, 0.0698, 0.732, 0.0702 (-7=>2.527)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.52, losses: 0.814, 0.0908, 0.741, 0.0688, 0.732, 0.0699 (-4=>2.507)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.54, losses: 0.814, 0.0946, 0.751, 0.0699, 0.737, 0.0705 (-4=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.53, losses: 0.819, 0.0923, 0.746, 0.0698, 0.736, 0.0697 (-14=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.53, losses: 0.813, 0.0932, 0.749, 0.0698, 0.731, 0.07 (-24=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.52, losses: 0.811, 0.093, 0.744, 0.07, 0.733, 0.0701 (-34=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.53, losses: 0.817, 0.0927, 0.742, 0.0705, 0.737, 0.0699 (-44=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.52, losses: 0.81, 0.0923, 0.746, 0.0702, 0.735, 0.0698 (-54=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.52, losses: 0.812, 0.0926, 0.744, 0.0698, 0.735, 0.07 (-64=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.5, losses: 0.805, 0.092, 0.742, 0.0705, 0.724, 0.0699 (-74=>2.496)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.52, losses: 0.814, 0.0922, 0.742, 0.0707, 0.727, 0.0697 (-84=>2.496)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.52, losses: 0.812, 0.0928, 0.744, 0.07, 0.732, 0.07 (-1=>2.499)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.52, losses: 0.817, 0.0914, 0.742, 0.0698, 0.732, 0.0695 (-11=>2.499)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.53, losses: 0.816, 0.0929, 0.75, 0.0703, 0.736, 0.0694 (-21=>2.499)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.53, losses: 0.817, 0.0933, 0.745, 0.0702, 0.737, 0.0696 (-31=>2.499)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.52, losses: 0.817, 0.0948, 0.743, 0.0701, 0.73, 0.0694 (-41=>2.499)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.52, losses: 0.809, 0.0909, 0.749, 0.0701, 0.736, 0.069 (-51=>2.499)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.52, losses: 0.804, 0.0947, 0.746, 0.0707, 0.731, 0.0701 (-61=>2.499)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-71=>2.499)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 406.943559, "total_time": 407.106872 }, "output": [ { "file": "https://replicate.delivery/mgxm/77cb108b-0c84-468f-afcc-ff49688e5419/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/07f6c428-1ca0-42a8-8a75-81c6a24d02a1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b21352ac-58c1-4d2e-a43f-0e4db3ede79a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b558d0fd-2c83-406c-8c0d-8ce2d4583288/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/07636794-1b8d-4350-92f8-ba3257315aaa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c0736590-26db-4c1f-919d-c7b1caff2d91/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/47b8b25a-8815-45c0-a379-50554f7eedba/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4f51f1b1-d48c-466e-a7f9-d718c8f288fc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c018bf06-a1ac-442a-ab55-d1c40b3e6f56/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/edd246e5-c18f-46bf-b6c9-d5d76e86b5f2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0d5d2b21-32a0-4f4b-bdd7-138b2674f344/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8b467330-6e79-4d6a-ade0-76baaae50c4a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/81323918-5ce5-493e-87ca-2437ac5e19e4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c1e7afd1-861a-466f-8ebb-bfd8ade644be/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7cf81d56-51e7-484a-952c-b8a8683aefbd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4b56c082-815d-4bc6-a317-0edf12a10e62/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b6b84cb2-8989-43ad-8b41-cd433c0bfd61/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ab8f9680-3d19-45c8-800b-4203bc22f4f2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/197fc9e2-3b98-49ba-b36d-8ec6ded74829/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f682ba51-2ed0-4226-ae9a-cd1b89d48ce1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5340f3ba-e7d9-49e1-ad02-0c2766d9bfe7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/dd02c4f3-058a-4329-aba7-01c3c61cc1e7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/00e6cf2f-03eb-4a04-aee4-e1bc101e67a0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d947e5c5-ac34-4e09-b263-cf202d73b00e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ceb78e49-9838-443f-9df6-ec22e8624a68/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/45e701d9-f7d1-4e82-b24f-0dfe6bca29b4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7e6b394a-5cf9-4e4e-988c-8219bf330c7b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/79882356-459e-45c1-805e-daf1b5b1e1c0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5d1d08e5-fd10-48a4-96e8-dd2efb0fc790/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/568106e8-3bac-4f06-ba0a-29d638d4bc27/tempfile.png" } ], "started_at": "2022-02-07T22:49:20.820472Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/wmgr2critzeh5lijmbovlc3z3e", "cancel": "https://api.replicate.com/v1/predictions/wmgr2critzeh5lijmbovlc3z3e/cancel" }, "version": "d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364" }
Generated in---> BasePixrayPredictor Predict Using seed: 11594066339298540349 Loaded CLIP RN50: 224x224 and 102.01M params Loaded CLIP ViT-B/32: 224x224 and 151.28M params Loaded CLIP ViT-B/16: 224x224 and 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['The anatomy of Cthulhu'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 3.18, losses: 1.05, 0.0867, 0.972, 0.0631, 0.947, 0.0634 (-0=>3.185) 0it [00:00, ?it/s] 0it [00:10, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 3.11, losses: 1.03, 0.0917, 0.931, 0.0616, 0.934, 0.0622 (-1=>3.109) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 3.05, losses: 1.02, 0.0901, 0.91, 0.0624, 0.908, 0.0629 (-0=>3.054) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 3.05, losses: 1.01, 0.0903, 0.913, 0.0627, 0.903, 0.0629 (-3=>3.033) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.99, losses: 1.01, 0.0889, 0.888, 0.0639, 0.88, 0.0642 (-0=>2.991) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.92, losses: 0.987, 0.09, 0.875, 0.0626, 0.846, 0.0636 (-0=>2.923) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.88, losses: 0.967, 0.0927, 0.868, 0.0641, 0.822, 0.0647 (-1=>2.824) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.77, losses: 0.924, 0.0932, 0.826, 0.0663, 0.794, 0.0664 (-0=>2.771) 0it [00:00, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.67, losses: 0.882, 0.0941, 0.786, 0.0688, 0.77, 0.0693 (-0=>2.67) 0it [00:00, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.59, losses: 0.846, 0.0939, 0.76, 0.0693, 0.749, 0.069 (-0=>2.587) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.56, losses: 0.825, 0.0937, 0.756, 0.0701, 0.744, 0.07 (-0=>2.558) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.53, losses: 0.818, 0.0939, 0.745, 0.0688, 0.735, 0.07 (-2=>2.528) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.54, losses: 0.825, 0.0931, 0.746, 0.0698, 0.732, 0.0702 (-7=>2.527) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.52, losses: 0.814, 0.0908, 0.741, 0.0688, 0.732, 0.0699 (-4=>2.507) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.54, losses: 0.814, 0.0946, 0.751, 0.0699, 0.737, 0.0705 (-4=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.53, losses: 0.819, 0.0923, 0.746, 0.0698, 0.736, 0.0697 (-14=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.53, losses: 0.813, 0.0932, 0.749, 0.0698, 0.731, 0.07 (-24=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.52, losses: 0.811, 0.093, 0.744, 0.07, 0.733, 0.0701 (-34=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.53, losses: 0.817, 0.0927, 0.742, 0.0705, 0.737, 0.0699 (-44=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.52, losses: 0.81, 0.0923, 0.746, 0.0702, 0.735, 0.0698 (-54=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.52, losses: 0.812, 0.0926, 0.744, 0.0698, 0.735, 0.07 (-64=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.5, losses: 0.805, 0.092, 0.742, 0.0705, 0.724, 0.0699 (-74=>2.496) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.52, losses: 0.814, 0.0922, 0.742, 0.0707, 0.727, 0.0697 (-84=>2.496) 0it [00:00, ?it/s] Dropping learning rate 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.52, losses: 0.812, 0.0928, 0.744, 0.07, 0.732, 0.07 (-1=>2.499) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.52, losses: 0.817, 0.0914, 0.742, 0.0698, 0.732, 0.0695 (-11=>2.499) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.53, losses: 0.816, 0.0929, 0.75, 0.0703, 0.736, 0.0694 (-21=>2.499) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.53, losses: 0.817, 0.0933, 0.745, 0.0702, 0.737, 0.0696 (-31=>2.499) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.52, losses: 0.817, 0.0948, 0.743, 0.0701, 0.73, 0.0694 (-41=>2.499) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.52, losses: 0.809, 0.0909, 0.749, 0.0701, 0.736, 0.069 (-51=>2.499) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.52, losses: 0.804, 0.0947, 0.746, 0.0707, 0.731, 0.0701 (-61=>2.499) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-71=>2.499) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23ID7pvlsm2strc5vedddebzxiwet4StatusSucceededSourceWebHardware–Total durationCreatedInput
- drawer
- vqgan
- prompts
- Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)
- settings
{ "drawer": "vqgan", "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23", { input: { drawer: "vqgan", prompts: "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", settings: "\n" } } ); // 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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23", input={ "drawer": "vqgan", "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23", "input": { "drawer": "vqgan", "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-03-31T00:41:03.341337Z", "created_at": "2022-03-31T00:38:11.879558Z", "data_removed": false, "error": null, "id": "7pvlsm2strc5vedddebzxiwet4", "input": { "drawer": "vqgan", "prompts": "Using artists as an example, when anyone can create amazing art, there will be incredible upside for humanity, but downside for most individual artists. (On the other hand, totally new kinds of art will be possible, and the skill that will matter will be imagination.)", "settings": "\n" }, "logs": null, "metrics": { "predict_time": 171.296794, "total_time": 171.461779 }, "output": [ "https://replicate.delivery/mgxm/5c657148-9430-475b-bf4b-42c3b6d52742/tempfile.png", "https://replicate.delivery/mgxm/96ddce21-72d9-4b7f-be11-3dd4fa56e019/tempfile.png", "https://replicate.delivery/mgxm/648d66c7-1386-4da2-8a65-637b00942d8b/tempfile.png", "https://replicate.delivery/mgxm/9f99a2f9-e31f-4b5a-8e20-1e2c7a9a066f/tempfile.png", "https://replicate.delivery/mgxm/07c6e4ae-900f-417f-b619-725ef7cd061b/tempfile.png", "https://replicate.delivery/mgxm/91867cfa-3155-4f93-ab0a-b5f637b356b7/tempfile.png", "https://replicate.delivery/mgxm/3adb3d2f-3b93-4625-9c16-c49866e157ad/tempfile.png", "https://replicate.delivery/mgxm/0712f906-fc05-470a-8f1b-63523206a1b2/tempfile.png", "https://replicate.delivery/mgxm/76c9ce73-61b1-45c0-9da6-65ecbbea7d9c/tempfile.png", "https://replicate.delivery/mgxm/15a3251e-3102-46b8-a2ba-5aa9593b13fb/tempfile.png", "https://replicate.delivery/mgxm/32394700-5a26-4fe9-9703-c730e2159963/tempfile.png", "https://replicate.delivery/mgxm/3971052d-322a-4d27-b4b1-d0a5cee1c6f6/tempfile.png", "https://replicate.delivery/mgxm/39c9db20-0f1e-4fe1-ad8a-ff169fc61931/tempfile.png", "https://replicate.delivery/mgxm/92e128d2-5ea9-4ab0-aacf-6b73a37375d9/tempfile.png", "https://replicate.delivery/mgxm/4a3168a5-c265-40b8-8bb5-0f1cf279ca1c/tempfile.png", "https://replicate.delivery/mgxm/d61e148d-1223-4cf6-8859-c3e8f89b735e/tempfile.png", "https://replicate.delivery/mgxm/7d05486b-a4e3-4133-b86d-a973e97bebb1/tempfile.png", "https://replicate.delivery/mgxm/a0c1b36a-6fc6-4254-a44f-edc1877a8a34/tempfile.png", "https://replicate.delivery/mgxm/34446fe0-8901-4342-94b1-7751af1af4c2/tempfile.png", "https://replicate.delivery/mgxm/206d7210-1d25-41a9-926b-8969383be376/tempfile.png", "https://replicate.delivery/mgxm/fa562c6d-c8cc-4646-a2a7-d3b30c59b62d/tempfile.png", "https://replicate.delivery/mgxm/e6581809-dbe2-4c6e-810d-e748237d484c/tempfile.png", "https://replicate.delivery/mgxm/916a110b-64ed-4f9b-89ac-f4e7b6e28e1b/tempfile.png", "https://replicate.delivery/mgxm/eae0fb39-1153-49b6-bc88-7404b24d4b7c/tempfile.png", "https://replicate.delivery/mgxm/f27963d8-3eaa-4b20-a369-2e5d9f01b458/tempfile.png", "https://replicate.delivery/mgxm/ee0694ea-e946-4722-b52f-945870885029/tempfile.png" ], "started_at": "2022-03-31T00:38:12.044543Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/7pvlsm2strc5vedddebzxiwet4", "cancel": "https://api.replicate.com/v1/predictions/7pvlsm2strc5vedddebzxiwet4/cancel" }, "version": "f6ca4f09e1cad8c4adca2c86fd1f4c9121f5f2e6c2f00408ab19c4077192fd23" }
Generated inPrediction
pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364Input
- prompts
- the thinker
- settings
- target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Mus%C3%A9e_Rodin_1.jpg/440px-Mus%C3%A9e_Rodin_1.jpg drawer: line_sketch aspect: portrait vector_prompts: none
{ "prompts": "the thinker", "settings": "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Mus%C3%A9e_Rodin_1.jpg/440px-Mus%C3%A9e_Rodin_1.jpg\ndrawer: line_sketch\naspect: portrait\nvector_prompts: none\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", { input: { prompts: "the thinker", settings: "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Mus%C3%A9e_Rodin_1.jpg/440px-Mus%C3%A9e_Rodin_1.jpg\ndrawer: line_sketch\naspect: portrait\nvector_prompts: none\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", input={ "prompts": "the thinker", "settings": "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Mus%C3%A9e_Rodin_1.jpg/440px-Mus%C3%A9e_Rodin_1.jpg\ndrawer: line_sketch\naspect: portrait\nvector_prompts: none\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", "input": { "prompts": "the thinker", "settings": "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Mus%C3%A9e_Rodin_1.jpg/440px-Mus%C3%A9e_Rodin_1.jpg\\ndrawer: line_sketch\\naspect: portrait\\nvector_prompts: none\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-02-14T02:56:08.464735Z", "created_at": "2022-02-14T02:48:24.204293Z", "data_removed": false, "error": null, "id": "svgviu5b2jbohmnl6hrajmaul4", "input": { "prompts": "the thinker", "settings": "target_images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Mus%C3%A9e_Rodin_1.jpg/440px-Mus%C3%A9e_Rodin_1.jpg\ndrawer: line_sketch\naspect: portrait\nvector_prompts: none\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n7300854173629200212\nLoaded CLIP RN50: 224x224 and 102.01M params\nLoaded CLIP ViT-B/32: 224x224 and 151.28M params\nLoaded CLIP ViT-B/16: 224x224 and 149.62M params\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torchvision/transforms/transforms.py:280: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.\n warnings.warn(\n[<http.client.HTTPResponse object at 0x7f831df47cd0>]\n[<http.client.HTTPResponse object at 0x7f831df46c70>]\n[<http.client.HTTPResponse object at 0x7f831df46f70>]\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['the thinker']\n\n0it [00:00, ?it/s]\niter: 0, loss: 4.15, losses: 0.529, 0.99, 0.439, 0.907, 0.369, 0.912 (-0=>4.146)\n\n0it [00:00, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 3.91, losses: 0.432, 0.965, 0.399, 0.88, 0.349, 0.881 (-1=>3.905)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 3.76, losses: 0.407, 0.936, 0.372, 0.861, 0.328, 0.856 (-1=>3.73)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 3.65, losses: 0.381, 0.921, 0.341, 0.843, 0.32, 0.841 (-3=>3.636)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 3.59, losses: 0.366, 0.921, 0.326, 0.847, 0.297, 0.835 (-4=>3.532)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 3.46, losses: 0.342, 0.909, 0.3, 0.824, 0.268, 0.819 (-1=>3.46)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 3.39, losses: 0.332, 0.905, 0.281, 0.82, 0.242, 0.81 (-4=>3.376)\n\n0it [00:00, ?it/s]\n\n0it [00:13, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 3.31, losses: 0.305, 0.9, 0.261, 0.812, 0.229, 0.802 (-2=>3.307)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 3.3, losses: 0.307, 0.892, 0.274, 0.806, 0.225, 0.797 (-2=>3.292)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 3.26, losses: 0.293, 0.887, 0.267, 0.802, 0.212, 0.798 (-5=>3.251)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 3.24, losses: 0.296, 0.889, 0.244, 0.803, 0.206, 0.798 (-0=>3.236)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 3.22, losses: 0.294, 0.883, 0.243, 0.801, 0.205, 0.793 (-0=>3.218)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 3.26, losses: 0.3, 0.88, 0.245, 0.809, 0.225, 0.798 (-8=>3.175)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 3.23, losses: 0.287, 0.886, 0.245, 0.811, 0.202, 0.803 (-9=>3.16)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 3.25, losses: 0.299, 0.884, 0.246, 0.807, 0.215, 0.799 (-19=>3.16)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 3.21, losses: 0.287, 0.882, 0.228, 0.804, 0.211, 0.794 (-29=>3.16)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 3.19, losses: 0.281, 0.878, 0.229, 0.805, 0.198, 0.793 (-6=>3.147)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 3.2, losses: 0.278, 0.882, 0.233, 0.806, 0.201, 0.803 (-8=>3.144)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 3.16, losses: 0.271, 0.878, 0.223, 0.8, 0.197, 0.794 (-6=>3.118)\n\n0it [00:00, ?it/s]\n\n0it [00:14, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 3.22, losses: 0.288, 0.886, 0.227, 0.809, 0.204, 0.809 (-3=>3.113)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 3.23, losses: 0.287, 0.881, 0.236, 0.81, 0.21, 0.803 (-13=>3.113)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 3.21, losses: 0.283, 0.881, 0.229, 0.806, 0.208, 0.801 (-4=>3.096)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 3.16, losses: 0.276, 0.876, 0.22, 0.8, 0.193, 0.794 (-14=>3.096)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 3.19, losses: 0.277, 0.88, 0.226, 0.806, 0.201, 0.802 (-1=>3.092)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 3.15, losses: 0.267, 0.871, 0.21, 0.805, 0.196, 0.797 (-1=>3.069)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 3.19, losses: 0.278, 0.878, 0.221, 0.808, 0.205, 0.798 (-4=>3.059)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 3.15, losses: 0.267, 0.876, 0.218, 0.805, 0.187, 0.794 (-14=>3.059)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 3.1, losses: 0.256, 0.868, 0.204, 0.801, 0.183, 0.79 (-24=>3.059)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 3.13, losses: 0.268, 0.873, 0.21, 0.804, 0.183, 0.791 (-8=>3.04)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 3.12, losses: 0.264, 0.868, 0.205, 0.802, 0.183, 0.793 (-18=>3.04)\n\n0it [00:00, ?it/s]\n\n0it [00:15, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-28=>3.04)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 464.084032, "total_time": 464.260442 }, "output": [ { "file": "https://replicate.delivery/mgxm/c88649af-b169-4ec4-9177-c0f15b30abde/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5a6620d9-6a19-434f-9a7b-02c63dea0849/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/777ea988-9f07-46c8-9e74-614591677b2a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f16762df-0ea5-428d-9148-f596f2bad0f9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/96f5eff7-4ea2-45a5-ab23-d57aa2dbd218/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3a4fe512-7482-4d23-bf57-55d9fdf7cd5f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/becba3bd-af71-4441-9b5b-ebac2196f4fc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0b7d1764-4f9e-4c58-b2c7-b847727c73b3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4afc89aa-dbac-40b3-a4cb-b2d4fa1443ec/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8949bfe2-4701-4612-87b5-e67f32ef7ef7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/84698a4b-e111-43c5-ab6b-e5de808a8533/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a0e5b9da-408f-40a9-bdc9-e8fa5553ec31/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/81061b36-b146-4c36-aca2-c72c03f07f5d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/806e9f98-7520-482f-b6e5-26002236bf0c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7b473865-e4db-4dd5-8956-a5e5308882f6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f8e26891-3fcf-4992-a9d7-646ab9568863/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/dfe1d06d-c34a-409e-a280-c4f4798d931f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9e3c9b44-e0c8-474b-9bfc-7763972dfb44/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7baebcec-095f-4ba3-a6a7-44def9f929d7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9b19a19e-a108-4856-96ed-8aa0af2750c0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/31b90a59-daf2-4f13-a5c4-726404f59ead/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3ece2e1b-3251-4f73-b64d-2c0fc7974d82/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/27fcf1d7-547b-4ea2-b76d-9f7d7db10ba2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/14e07c79-f4e6-42dc-ab27-2bed2426dca2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7522f79f-6029-414c-bf48-433b389798b0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/90764ee1-cfb9-4ff5-a51c-ac5bb7f5aa96/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/343cebd1-73d8-4692-b402-589e1682c29b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/88eec1d7-d0a2-4a34-94ac-368867403ccb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c80e3ebf-65b2-4458-8be2-08d395d7ffb8/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/63abdcff-1a23-4867-bd84-73b188889514/tempfile.png" } ], "started_at": "2022-02-14T02:48:24.380703Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/svgviu5b2jbohmnl6hrajmaul4", "cancel": "https://api.replicate.com/v1/predictions/svgviu5b2jbohmnl6hrajmaul4/cancel" }, "version": "d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364" }
Generated in---> BasePixrayPredictor Predict Using seed: 7300854173629200212 Loaded CLIP RN50: 224x224 and 102.01M params Loaded CLIP ViT-B/32: 224x224 and 151.28M params Loaded CLIP ViT-B/16: 224x224 and 149.62M params /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torchvision/transforms/transforms.py:280: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum. warnings.warn( [<http.client.HTTPResponse object at 0x7f831df47cd0>] [<http.client.HTTPResponse object at 0x7f831df46c70>] [<http.client.HTTPResponse object at 0x7f831df46f70>] Using device: cuda:0 Optimising using: Adam Using text prompts: ['the thinker'] 0it [00:00, ?it/s] iter: 0, loss: 4.15, losses: 0.529, 0.99, 0.439, 0.907, 0.369, 0.912 (-0=>4.146) 0it [00:00, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 3.91, losses: 0.432, 0.965, 0.399, 0.88, 0.349, 0.881 (-1=>3.905) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 3.76, losses: 0.407, 0.936, 0.372, 0.861, 0.328, 0.856 (-1=>3.73) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 3.65, losses: 0.381, 0.921, 0.341, 0.843, 0.32, 0.841 (-3=>3.636) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 3.59, losses: 0.366, 0.921, 0.326, 0.847, 0.297, 0.835 (-4=>3.532) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 3.46, losses: 0.342, 0.909, 0.3, 0.824, 0.268, 0.819 (-1=>3.46) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 3.39, losses: 0.332, 0.905, 0.281, 0.82, 0.242, 0.81 (-4=>3.376) 0it [00:00, ?it/s] 0it [00:13, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 3.31, losses: 0.305, 0.9, 0.261, 0.812, 0.229, 0.802 (-2=>3.307) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 3.3, losses: 0.307, 0.892, 0.274, 0.806, 0.225, 0.797 (-2=>3.292) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 3.26, losses: 0.293, 0.887, 0.267, 0.802, 0.212, 0.798 (-5=>3.251) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 3.24, losses: 0.296, 0.889, 0.244, 0.803, 0.206, 0.798 (-0=>3.236) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 3.22, losses: 0.294, 0.883, 0.243, 0.801, 0.205, 0.793 (-0=>3.218) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 3.26, losses: 0.3, 0.88, 0.245, 0.809, 0.225, 0.798 (-8=>3.175) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 3.23, losses: 0.287, 0.886, 0.245, 0.811, 0.202, 0.803 (-9=>3.16) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 3.25, losses: 0.299, 0.884, 0.246, 0.807, 0.215, 0.799 (-19=>3.16) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 3.21, losses: 0.287, 0.882, 0.228, 0.804, 0.211, 0.794 (-29=>3.16) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 3.19, losses: 0.281, 0.878, 0.229, 0.805, 0.198, 0.793 (-6=>3.147) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 3.2, losses: 0.278, 0.882, 0.233, 0.806, 0.201, 0.803 (-8=>3.144) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 3.16, losses: 0.271, 0.878, 0.223, 0.8, 0.197, 0.794 (-6=>3.118) 0it [00:00, ?it/s] 0it [00:14, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 3.22, losses: 0.288, 0.886, 0.227, 0.809, 0.204, 0.809 (-3=>3.113) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 3.23, losses: 0.287, 0.881, 0.236, 0.81, 0.21, 0.803 (-13=>3.113) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 3.21, losses: 0.283, 0.881, 0.229, 0.806, 0.208, 0.801 (-4=>3.096) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 3.16, losses: 0.276, 0.876, 0.22, 0.8, 0.193, 0.794 (-14=>3.096) 0it [00:00, ?it/s] Dropping learning rate 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 3.19, losses: 0.277, 0.88, 0.226, 0.806, 0.201, 0.802 (-1=>3.092) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 3.15, losses: 0.267, 0.871, 0.21, 0.805, 0.196, 0.797 (-1=>3.069) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 3.19, losses: 0.278, 0.878, 0.221, 0.808, 0.205, 0.798 (-4=>3.059) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 3.15, losses: 0.267, 0.876, 0.218, 0.805, 0.187, 0.794 (-14=>3.059) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 3.1, losses: 0.256, 0.868, 0.204, 0.801, 0.183, 0.79 (-24=>3.059) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 3.13, losses: 0.268, 0.873, 0.21, 0.804, 0.183, 0.791 (-8=>3.04) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 3.12, losses: 0.264, 0.868, 0.205, 0.802, 0.183, 0.793 (-18=>3.04) 0it [00:00, ?it/s] 0it [00:15, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-28=>3.04) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364IDkpwko33xx5ekpkrlhvai3flgkeStatusSucceededSourceWebHardware–Total durationCreatedInput
- prompts
- Bah-weep-Graaaaagnah wheep ni ni bong.
- settings
- drawer: vqgan
{ "prompts": "Bah-weep-Graaaaagnah wheep ni ni bong.", "settings": "drawer: vqgan" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", { input: { prompts: "Bah-weep-Graaaaagnah wheep ni ni bong.", settings: "drawer: vqgan" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", input={ "prompts": "Bah-weep-Graaaaagnah wheep ni ni bong.", "settings": "drawer: vqgan" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", "input": { "prompts": "Bah-weep-Graaaaagnah wheep ni ni bong.", "settings": "drawer: vqgan" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-02-19T03:02:42.369132Z", "created_at": "2022-02-19T02:55:38.248658Z", "data_removed": false, "error": null, "id": "kpwko33xx5ekpkrlhvai3flgke", "input": { "prompts": "Bah-weep-Graaaaagnah wheep ni ni bong.", "settings": "drawer: vqgan" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n664336942428680805\nWorking with z of shape (1, 256, 16, 16) = 65536 dimensions.\nloaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth\nVQLPIPSWithDiscriminator running with hinge loss.\nRestored from models/vqgan_imagenet_f16_16384.ckpt\nAll CLIP models already loaded:\n['RN50', 'ViT-B/32', 'ViT-B/16']\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['Bah-weep-Graaaaagnah wheep ni ni bong.']\n\n0it [00:00, ?it/s]\niter: 0, loss: 3.03, losses: 0.986, 0.0829, 0.925, 0.0604, 0.912, 0.0644 (-0=>3.03)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.9, losses: 0.958, 0.087, 0.887, 0.064, 0.842, 0.061 (-0=>2.9)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.81, losses: 0.929, 0.0914, 0.853, 0.064, 0.811, 0.0645 (-0=>2.813)\n\n0it [00:01, ?it/s]\n\n0it [00:12, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.76, losses: 0.913, 0.0877, 0.834, 0.0675, 0.798, 0.0635 (-2=>2.756)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.71, losses: 0.898, 0.0883, 0.815, 0.0712, 0.771, 0.0657 (-0=>2.709)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.7, losses: 0.896, 0.0869, 0.813, 0.071, 0.764, 0.0669 (-4=>2.695)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.69, losses: 0.89, 0.0877, 0.809, 0.0724, 0.762, 0.0681 (-1=>2.679)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.68, losses: 0.891, 0.0873, 0.809, 0.0712, 0.755, 0.069 (-5=>2.665)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.68, losses: 0.89, 0.0877, 0.805, 0.0727, 0.75, 0.0699 (-4=>2.66)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.66, losses: 0.88, 0.0874, 0.803, 0.0711, 0.745, 0.0686 (-5=>2.639)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.67, losses: 0.888, 0.0869, 0.804, 0.0704, 0.756, 0.0676 (-15=>2.639)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.65, losses: 0.881, 0.0868, 0.798, 0.0723, 0.745, 0.0699 (-25=>2.639)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.64, losses: 0.876, 0.0859, 0.796, 0.0718, 0.74, 0.0683 (-0=>2.638)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.65, losses: 0.876, 0.0872, 0.8, 0.0711, 0.744, 0.0695 (-3=>2.637)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.65, losses: 0.878, 0.0854, 0.796, 0.0711, 0.745, 0.0702 (-5=>2.63)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.63, losses: 0.873, 0.0873, 0.79, 0.0723, 0.734, 0.0706 (-8=>2.622)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.64, losses: 0.872, 0.0884, 0.802, 0.0727, 0.741, 0.0684 (-5=>2.621)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.62, losses: 0.868, 0.0864, 0.793, 0.0735, 0.73, 0.0712 (-6=>2.62)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.64, losses: 0.879, 0.0884, 0.795, 0.0725, 0.741, 0.0693 (-6=>2.619)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.62, losses: 0.869, 0.0882, 0.794, 0.0729, 0.729, 0.0706 (-16=>2.619)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.64, losses: 0.876, 0.0873, 0.794, 0.0714, 0.74, 0.0705 (-26=>2.619)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.64, losses: 0.871, 0.0888, 0.798, 0.0743, 0.736, 0.0707 (-3=>2.617)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.62, losses: 0.863, 0.0875, 0.792, 0.0727, 0.729, 0.0706 (-0=>2.615)\n\n0it [00:00, ?it/s]\nDropping learning rate\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.62, losses: 0.866, 0.0876, 0.792, 0.0734, 0.73, 0.0714 (-1=>2.617)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.62, losses: 0.869, 0.087, 0.789, 0.0722, 0.73, 0.0707 (-5=>2.602)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.62, losses: 0.866, 0.0885, 0.791, 0.0732, 0.725, 0.0717 (-5=>2.602)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.62, losses: 0.868, 0.088, 0.787, 0.0732, 0.73, 0.071 (-15=>2.602)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.61, losses: 0.869, 0.0859, 0.786, 0.0732, 0.73, 0.0712 (-25=>2.602)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.62, losses: 0.866, 0.087, 0.788, 0.0725, 0.733, 0.0703 (-35=>2.602)\n\n0it [00:00, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.61, losses: 0.867, 0.087, 0.789, 0.0726, 0.728, 0.0704 (-45=>2.602)\n\n0it [00:01, ?it/s]\n\n0it [00:11, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-1=>2.599)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 423.936887, "total_time": 424.120474 }, "output": [ { "file": "https://replicate.delivery/mgxm/8df33267-cb45-4d50-b17b-4ba13698b651/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4b4576b3-b700-4bfc-b94d-238c53d5c57f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ea2a009d-0f6b-403f-9ac1-b018ef5554fc/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/47d60908-5dad-4564-a0d1-8672dfcd1e07/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ecd5f655-63db-4053-869e-6b5b2cc77718/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a2ad909d-daa2-4d33-800f-6b65902426f9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/9a4e3889-2367-4525-ba91-ecf38fc246e9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/862ddc97-b784-4ed7-9671-4a9fd4b32a0c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/71e8024d-2018-447c-a3a0-5f774aad54d6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/81ec1cb9-6887-4679-b7a6-e8ff9062def2/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/6abc4115-f697-49c8-9981-4abda35bbd3f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d0a45d01-9b41-4597-b2ed-796b98646784/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f53a055b-bf40-4faf-b712-ffe131ea31de/tempfile.png" } ], "started_at": "2022-02-19T02:55:38.432245Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/kpwko33xx5ekpkrlhvai3flgke", "cancel": "https://api.replicate.com/v1/predictions/kpwko33xx5ekpkrlhvai3flgke/cancel" }, "version": "d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364" }
Generated in---> BasePixrayPredictor Predict Using seed: 664336942428680805 Working with z of shape (1, 256, 16, 16) = 65536 dimensions. loaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth VQLPIPSWithDiscriminator running with hinge loss. Restored from models/vqgan_imagenet_f16_16384.ckpt All CLIP models already loaded: ['RN50', 'ViT-B/32', 'ViT-B/16'] Using device: cuda:0 Optimising using: Adam Using text prompts: ['Bah-weep-Graaaaagnah wheep ni ni bong.'] 0it [00:00, ?it/s] iter: 0, loss: 3.03, losses: 0.986, 0.0829, 0.925, 0.0604, 0.912, 0.0644 (-0=>3.03) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.9, losses: 0.958, 0.087, 0.887, 0.064, 0.842, 0.061 (-0=>2.9) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.81, losses: 0.929, 0.0914, 0.853, 0.064, 0.811, 0.0645 (-0=>2.813) 0it [00:01, ?it/s] 0it [00:12, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.76, losses: 0.913, 0.0877, 0.834, 0.0675, 0.798, 0.0635 (-2=>2.756) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.71, losses: 0.898, 0.0883, 0.815, 0.0712, 0.771, 0.0657 (-0=>2.709) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.7, losses: 0.896, 0.0869, 0.813, 0.071, 0.764, 0.0669 (-4=>2.695) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.69, losses: 0.89, 0.0877, 0.809, 0.0724, 0.762, 0.0681 (-1=>2.679) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.68, losses: 0.891, 0.0873, 0.809, 0.0712, 0.755, 0.069 (-5=>2.665) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.68, losses: 0.89, 0.0877, 0.805, 0.0727, 0.75, 0.0699 (-4=>2.66) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.66, losses: 0.88, 0.0874, 0.803, 0.0711, 0.745, 0.0686 (-5=>2.639) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.67, losses: 0.888, 0.0869, 0.804, 0.0704, 0.756, 0.0676 (-15=>2.639) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.65, losses: 0.881, 0.0868, 0.798, 0.0723, 0.745, 0.0699 (-25=>2.639) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.64, losses: 0.876, 0.0859, 0.796, 0.0718, 0.74, 0.0683 (-0=>2.638) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.65, losses: 0.876, 0.0872, 0.8, 0.0711, 0.744, 0.0695 (-3=>2.637) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.65, losses: 0.878, 0.0854, 0.796, 0.0711, 0.745, 0.0702 (-5=>2.63) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.63, losses: 0.873, 0.0873, 0.79, 0.0723, 0.734, 0.0706 (-8=>2.622) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.64, losses: 0.872, 0.0884, 0.802, 0.0727, 0.741, 0.0684 (-5=>2.621) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.62, losses: 0.868, 0.0864, 0.793, 0.0735, 0.73, 0.0712 (-6=>2.62) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.64, losses: 0.879, 0.0884, 0.795, 0.0725, 0.741, 0.0693 (-6=>2.619) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.62, losses: 0.869, 0.0882, 0.794, 0.0729, 0.729, 0.0706 (-16=>2.619) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.64, losses: 0.876, 0.0873, 0.794, 0.0714, 0.74, 0.0705 (-26=>2.619) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.64, losses: 0.871, 0.0888, 0.798, 0.0743, 0.736, 0.0707 (-3=>2.617) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.62, losses: 0.863, 0.0875, 0.792, 0.0727, 0.729, 0.0706 (-0=>2.615) 0it [00:00, ?it/s] Dropping learning rate 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.62, losses: 0.866, 0.0876, 0.792, 0.0734, 0.73, 0.0714 (-1=>2.617) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.62, losses: 0.869, 0.087, 0.789, 0.0722, 0.73, 0.0707 (-5=>2.602) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.62, losses: 0.866, 0.0885, 0.791, 0.0732, 0.725, 0.0717 (-5=>2.602) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.62, losses: 0.868, 0.088, 0.787, 0.0732, 0.73, 0.071 (-15=>2.602) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.61, losses: 0.869, 0.0859, 0.786, 0.0732, 0.73, 0.0712 (-25=>2.602) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.62, losses: 0.866, 0.087, 0.788, 0.0725, 0.733, 0.0703 (-35=>2.602) 0it [00:00, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.61, losses: 0.867, 0.087, 0.789, 0.0726, 0.728, 0.0704 (-45=>2.602) 0it [00:01, ?it/s] 0it [00:11, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-1=>2.599) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364Input
- prompts
- Trying to make friends on the subway by Maurice Bernard Sendak
- settings
- drawer: vqgan quality: best
{ "prompts": "Trying to make friends on the subway by Maurice Bernard Sendak", "settings": "drawer: vqgan\nquality: best" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", { input: { prompts: "Trying to make friends on the subway by Maurice Bernard Sendak", settings: "drawer: vqgan\nquality: best" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", input={ "prompts": "Trying to make friends on the subway by Maurice Bernard Sendak", "settings": "drawer: vqgan\nquality: best" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", "input": { "prompts": "Trying to make friends on the subway by Maurice Bernard Sendak", "settings": "drawer: vqgan\\nquality: best" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-02-23T02:58:46.627338Z", "created_at": "2022-02-23T02:41:11.358521Z", "data_removed": false, "error": null, "id": "3nk5g3dlwfakhdgn35utyxlmhi", "input": { "prompts": "Trying to make friends on the subway by Maurice Bernard Sendak", "settings": "drawer: vqgan\nquality: best" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n2607023540569480978\nWorking with z of shape (1, 256, 16, 16) = 65536 dimensions.\nloaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth\nVQLPIPSWithDiscriminator running with hinge loss.\nRestored from models/vqgan_imagenet_f16_16384.ckpt\nLoaded CLIP RN50x4: 288x288 and 178.30M params\nLoaded CLIP ViT-B/32: 224x224 and 151.28M params\nLoaded CLIP ViT-B/16: 224x224 and 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['Trying to make friends on the subway by Maurice Bernard Sendak']\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 3.06, losses: 0.824, 0.0795, 1.01, 0.0614, 1.03, 0.0641 (-0=>3.061)\n\n0it [00:01, ?it/s]\n\n0it [00:24, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.43, losses: 0.636, 0.0877, 0.762, 0.0681, 0.81, 0.0664 (-0=>2.43)\n\n0it [00:01, ?it/s]\n\n0it [00:24, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.18, losses: 0.551, 0.0922, 0.689, 0.0721, 0.706, 0.0707 (-0=>2.181)\n\n0it [00:01, ?it/s]\n\n0it [00:24, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.08, losses: 0.524, 0.0915, 0.664, 0.0738, 0.658, 0.0715 (-0=>2.083)\n\n0it [00:01, ?it/s]\n\n0it [00:24, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.01, losses: 0.473, 0.0946, 0.659, 0.0735, 0.641, 0.0732 (-2=>2.014)\n\n0it [00:01, ?it/s]\n\n0it [00:24, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 1.98, losses: 0.471, 0.094, 0.638, 0.074, 0.634, 0.0728 (-2=>1.977)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 1.95, losses: 0.465, 0.0915, 0.638, 0.0732, 0.612, 0.0719 (-1=>1.934)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 1.9, losses: 0.441, 0.0934, 0.626, 0.0747, 0.59, 0.074 (-0=>1.899)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 1.9, losses: 0.449, 0.0934, 0.625, 0.0755, 0.586, 0.0741 (-10=>1.899)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 1.89, losses: 0.446, 0.0912, 0.618, 0.0756, 0.58, 0.0748 (-3=>1.868)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 1.89, losses: 0.428, 0.0933, 0.631, 0.0745, 0.592, 0.0749 (-5=>1.858)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 1.88, losses: 0.44, 0.0938, 0.621, 0.0749, 0.574, 0.0751 (-7=>1.85)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 1.83, losses: 0.432, 0.0939, 0.6, 0.0782, 0.549, 0.0766 (-0=>1.83)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 1.82, losses: 0.439, 0.0906, 0.598, 0.0767, 0.538, 0.0777 (-0=>1.82)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 1.88, losses: 0.433, 0.0923, 0.628, 0.0735, 0.576, 0.0734 (-2=>1.817)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 1.82, losses: 0.424, 0.0928, 0.609, 0.0745, 0.548, 0.0744 (-7=>1.805)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 1.81, losses: 0.423, 0.0933, 0.607, 0.075, 0.533, 0.0767 (-8=>1.799)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 1.83, losses: 0.434, 0.0925, 0.611, 0.0734, 0.547, 0.0743 (-3=>1.791)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 1.84, losses: 0.434, 0.0932, 0.61, 0.0763, 0.549, 0.076 (-6=>1.782)\n\n0it [00:01, ?it/s]\n---> BasePixrayPredictor Predict\nUsing seed:\n18180768943398480051\nWorking with z of shape (1, 256, 16, 16) = 65536 dimensions.\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 1.82, losses: 0.429, 0.0936, 0.599, 0.0761, 0.546, 0.0767 (-6=>1.777)\n\n0it [00:01, ?it/s]\nloaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth\nVQLPIPSWithDiscriminator running with hinge loss.\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 1.81, losses: 0.413, 0.0929, 0.617, 0.0736, 0.536, 0.0767 (-16=>1.777)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\nRestored from models/vqgan_imagenet_f16_16384.ckpt\niter: 210, loss: 1.78, losses: 0.406, 0.0949, 0.597, 0.0755, 0.53, 0.0763 (-26=>1.777)\n\n0it [00:01, ?it/s]\nLoaded CLIP RN50x4: 288x288 and 178.30M params\nLoaded CLIP ViT-B/32: 224x224 and 151.28M params\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 1.82, losses: 0.407, 0.0927, 0.624, 0.0728, 0.546, 0.0752 (-2=>1.776)\n\n0it [00:01, ?it/s]\nLoaded CLIP ViT-B/16: 224x224 and 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['Trying to make friends on the subway by Maurice Bernard Sendak']\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 3.06, losses: 0.827, 0.0798, 1, 0.0618, 1.02, 0.0643 (-0=>3.061)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 1.81, losses: 0.409, 0.0953, 0.606, 0.0757, 0.551, 0.0755 (-12=>1.776)\n\n0it [00:01, ?it/s]\n\n0it [00:24, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 2.42, losses: 0.613, 0.0891, 0.763, 0.0685, 0.817, 0.0668 (-0=>2.418)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 1.83, losses: 0.431, 0.0938, 0.602, 0.0759, 0.549, 0.0743 (-6=>1.776)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 2.16, losses: 0.531, 0.0923, 0.687, 0.0705, 0.71, 0.069 (-0=>2.16)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 1.79, losses: 0.4, 0.0948, 0.604, 0.0755, 0.541, 0.0754 (-4=>1.761)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 2.03, losses: 0.488, 0.0926, 0.657, 0.0721, 0.65, 0.0712 (-1=>2.021)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 1.78, losses: 0.407, 0.0959, 0.597, 0.0763, 0.531, 0.0755 (-4=>1.756)\n\n0it [00:01, ?it/s]\nDropping learning rate\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 1.96, losses: 0.471, 0.0913, 0.637, 0.0731, 0.617, 0.0737 (-1=>1.948)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 1.83, losses: 0.415, 0.0942, 0.615, 0.0752, 0.553, 0.075 (-4=>1.775)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 1.92, losses: 0.46, 0.0926, 0.632, 0.0722, 0.593, 0.0737 (-4=>1.907)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 1.76, losses: 0.402, 0.0941, 0.59, 0.0747, 0.525, 0.0762 (-9=>1.743)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 1.89, losses: 0.438, 0.0918, 0.619, 0.0743, 0.588, 0.0747 (-0=>1.885)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 1.76, losses: 0.398, 0.095, 0.587, 0.0755, 0.527, 0.0768 (-5=>1.725)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 1.87, losses: 0.438, 0.0925, 0.612, 0.0742, 0.578, 0.0757 (-1=>1.865)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, loss: 1.78, losses: 0.41, 0.0941, 0.598, 0.0766, 0.529, 0.075 (-15=>1.725)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 1.88, losses: 0.437, 0.0927, 0.617, 0.0742, 0.587, 0.0751 (-8=>1.843)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 310, loss: 1.76, losses: 0.4, 0.0951, 0.589, 0.0761, 0.528, 0.0756 (-25=>1.725)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 1.86, losses: 0.426, 0.0928, 0.614, 0.0737, 0.573, 0.0768 (-5=>1.833)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 320, loss: 1.76, losses: 0.41, 0.0927, 0.592, 0.0752, 0.514, 0.076 (-35=>1.725)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 1.88, losses: 0.442, 0.0921, 0.622, 0.0734, 0.576, 0.0749 (-15=>1.833)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 330, loss: 1.74, losses: 0.408, 0.0935, 0.584, 0.0761, 0.5, 0.0762 (-45=>1.725)\n\n0it [00:01, ?it/s]\n\n0it [00:26, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 1.85, losses: 0.429, 0.0922, 0.612, 0.0735, 0.568, 0.0749 (-3=>1.82)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 340, loss: 1.74, losses: 0.388, 0.0947, 0.59, 0.0752, 0.515, 0.0761 (-55=>1.725)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 1.83, losses: 0.419, 0.0944, 0.603, 0.0738, 0.563, 0.0751 (-4=>1.803)\n\n0it [00:01, ?it/s]\n\n0it [00:25, ?it/s]\n\n0it [00:00, ?it/s]\niter: 350, finished (-65=>1.725)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 1055.081649, "total_time": 1055.268817 }, "output": [ { "file": "https://replicate.delivery/mgxm/9aaea4a2-e396-4204-9b53-eb8f04b18227/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f379df7e-5b8f-4417-a5ee-2c2688055544/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/67bb06bd-73c2-4790-91f6-4bf3f1e94a0c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b120fc85-889d-4f4f-a649-b62f806deb16/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b986bf2e-7a99-40ac-acff-f7c26dc395c1/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5390ad91-87be-4088-a644-5426b8742e4f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/822588f8-d319-42e9-a65c-250b920a5579/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7629c61c-60e5-4221-965d-6d8b9883d208/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b726ce5d-2a25-4a85-9184-3b84b4c20e8d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5b8a668f-9eb7-4b5b-8755-c415ad06772c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f26a57ff-77fb-452f-bf31-fe50b00fc1ed/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b4372ba1-c972-456a-a160-eae7c94ae6b0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b22bdd1c-4381-4815-85be-cf164603feaa/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/99092dec-132d-4b6e-8882-5326fcfa95a5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1a7f7d08-e1f6-4227-a594-550ba4d62417/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/89863ce4-96f9-4a1c-9f22-af1510c82715/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/029aa155-ffea-4cce-851f-39404765dc1e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/61244352-076e-45c3-8738-f288128534a0/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/44957c46-44c6-413d-ac75-7f94d07ba21c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/989c8e7e-4588-4415-8d40-a24721585272/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f32aa7db-8d58-4e11-8cde-dce35065a865/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/522b9b07-33d8-418a-83ce-0ae7a249e42b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5927d0d1-1a88-4403-bd3c-3f855c42819a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/44d4cd21-d7ff-45e6-8af4-6f4e4ce989a5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d014effb-76e5-447a-9722-a159ba8c30a4/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/92d81073-7b80-4394-bd44-14d9a69a33a6/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/49faaff6-cc64-43b8-9e70-72fd2f3a2a2d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/de7ea901-1f2d-41a7-bc1c-f9fd98b5cbd9/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/098cedb8-6533-47bc-925c-2369f1cae0a5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7152b85e-0a54-49f8-87ad-4f7a1b5fe2ec/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/36ade519-9f9f-4e9d-89ec-22a3575f1180/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1d091ee6-def4-4177-802d-8272e6066946/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/66a23f8c-f2b2-4e90-b59e-30c28b65fa71/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/35cf9378-dfdc-4eae-899c-4108f7df47ae/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/61cfabb1-2b06-44fc-ae41-40429eb0f8c7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e71cc9ff-5756-4208-bb24-a5d163c15877/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/31f148d7-a1ca-4f0b-ac13-4464fbbf8128/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7da914db-5320-40c3-a605-dd69118aec90/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5091aba2-c7ee-4193-ad6c-6196fa9405ed/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/13b6c4dc-f48f-40db-849f-f827d4301c10/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/038ff72c-800d-45dd-8445-48f777f52343/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/4cd3f089-bcd8-4d5f-85f2-8a5e650b41e7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/024763d8-0d45-4e8e-a0bf-77e2b9ca269b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/614b1048-12bb-4db0-a04c-cc8e92a5ec79/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/dd1e72cd-055c-4071-83e6-1352ba37f4fb/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/28bf43e8-5d49-4ed8-837e-e90383177e57/tempfile.png" } ], "started_at": "2022-02-23T02:41:11.545689Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/3nk5g3dlwfakhdgn35utyxlmhi", "cancel": "https://api.replicate.com/v1/predictions/3nk5g3dlwfakhdgn35utyxlmhi/cancel" }, "version": "d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364" }
Generated in---> BasePixrayPredictor Predict Using seed: 2607023540569480978 Working with z of shape (1, 256, 16, 16) = 65536 dimensions. loaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth VQLPIPSWithDiscriminator running with hinge loss. Restored from models/vqgan_imagenet_f16_16384.ckpt Loaded CLIP RN50x4: 288x288 and 178.30M params Loaded CLIP ViT-B/32: 224x224 and 151.28M params Loaded CLIP ViT-B/16: 224x224 and 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['Trying to make friends on the subway by Maurice Bernard Sendak'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 3.06, losses: 0.824, 0.0795, 1.01, 0.0614, 1.03, 0.0641 (-0=>3.061) 0it [00:01, ?it/s] 0it [00:24, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.43, losses: 0.636, 0.0877, 0.762, 0.0681, 0.81, 0.0664 (-0=>2.43) 0it [00:01, ?it/s] 0it [00:24, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.18, losses: 0.551, 0.0922, 0.689, 0.0721, 0.706, 0.0707 (-0=>2.181) 0it [00:01, ?it/s] 0it [00:24, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.08, losses: 0.524, 0.0915, 0.664, 0.0738, 0.658, 0.0715 (-0=>2.083) 0it [00:01, ?it/s] 0it [00:24, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.01, losses: 0.473, 0.0946, 0.659, 0.0735, 0.641, 0.0732 (-2=>2.014) 0it [00:01, ?it/s] 0it [00:24, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 1.98, losses: 0.471, 0.094, 0.638, 0.074, 0.634, 0.0728 (-2=>1.977) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 1.95, losses: 0.465, 0.0915, 0.638, 0.0732, 0.612, 0.0719 (-1=>1.934) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 1.9, losses: 0.441, 0.0934, 0.626, 0.0747, 0.59, 0.074 (-0=>1.899) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 1.9, losses: 0.449, 0.0934, 0.625, 0.0755, 0.586, 0.0741 (-10=>1.899) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 1.89, losses: 0.446, 0.0912, 0.618, 0.0756, 0.58, 0.0748 (-3=>1.868) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 1.89, losses: 0.428, 0.0933, 0.631, 0.0745, 0.592, 0.0749 (-5=>1.858) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 1.88, losses: 0.44, 0.0938, 0.621, 0.0749, 0.574, 0.0751 (-7=>1.85) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 1.83, losses: 0.432, 0.0939, 0.6, 0.0782, 0.549, 0.0766 (-0=>1.83) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 1.82, losses: 0.439, 0.0906, 0.598, 0.0767, 0.538, 0.0777 (-0=>1.82) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 1.88, losses: 0.433, 0.0923, 0.628, 0.0735, 0.576, 0.0734 (-2=>1.817) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 1.82, losses: 0.424, 0.0928, 0.609, 0.0745, 0.548, 0.0744 (-7=>1.805) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 1.81, losses: 0.423, 0.0933, 0.607, 0.075, 0.533, 0.0767 (-8=>1.799) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 1.83, losses: 0.434, 0.0925, 0.611, 0.0734, 0.547, 0.0743 (-3=>1.791) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 1.84, losses: 0.434, 0.0932, 0.61, 0.0763, 0.549, 0.076 (-6=>1.782) 0it [00:01, ?it/s] ---> BasePixrayPredictor Predict Using seed: 18180768943398480051 Working with z of shape (1, 256, 16, 16) = 65536 dimensions. 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 1.82, losses: 0.429, 0.0936, 0.599, 0.0761, 0.546, 0.0767 (-6=>1.777) 0it [00:01, ?it/s] loaded pretrained LPIPS loss from taming/modules/autoencoder/lpips/vgg.pth VQLPIPSWithDiscriminator running with hinge loss. 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 1.81, losses: 0.413, 0.0929, 0.617, 0.0736, 0.536, 0.0767 (-16=>1.777) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] Restored from models/vqgan_imagenet_f16_16384.ckpt iter: 210, loss: 1.78, losses: 0.406, 0.0949, 0.597, 0.0755, 0.53, 0.0763 (-26=>1.777) 0it [00:01, ?it/s] Loaded CLIP RN50x4: 288x288 and 178.30M params Loaded CLIP ViT-B/32: 224x224 and 151.28M params 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 1.82, losses: 0.407, 0.0927, 0.624, 0.0728, 0.546, 0.0752 (-2=>1.776) 0it [00:01, ?it/s] Loaded CLIP ViT-B/16: 224x224 and 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['Trying to make friends on the subway by Maurice Bernard Sendak'] 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 3.06, losses: 0.827, 0.0798, 1, 0.0618, 1.02, 0.0643 (-0=>3.061) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 1.81, losses: 0.409, 0.0953, 0.606, 0.0757, 0.551, 0.0755 (-12=>1.776) 0it [00:01, ?it/s] 0it [00:24, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 2.42, losses: 0.613, 0.0891, 0.763, 0.0685, 0.817, 0.0668 (-0=>2.418) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 1.83, losses: 0.431, 0.0938, 0.602, 0.0759, 0.549, 0.0743 (-6=>1.776) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 2.16, losses: 0.531, 0.0923, 0.687, 0.0705, 0.71, 0.069 (-0=>2.16) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 1.79, losses: 0.4, 0.0948, 0.604, 0.0755, 0.541, 0.0754 (-4=>1.761) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 2.03, losses: 0.488, 0.0926, 0.657, 0.0721, 0.65, 0.0712 (-1=>2.021) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 1.78, losses: 0.407, 0.0959, 0.597, 0.0763, 0.531, 0.0755 (-4=>1.756) 0it [00:01, ?it/s] Dropping learning rate 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 1.96, losses: 0.471, 0.0913, 0.637, 0.0731, 0.617, 0.0737 (-1=>1.948) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 1.83, losses: 0.415, 0.0942, 0.615, 0.0752, 0.553, 0.075 (-4=>1.775) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 1.92, losses: 0.46, 0.0926, 0.632, 0.0722, 0.593, 0.0737 (-4=>1.907) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 1.76, losses: 0.402, 0.0941, 0.59, 0.0747, 0.525, 0.0762 (-9=>1.743) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 1.89, losses: 0.438, 0.0918, 0.619, 0.0743, 0.588, 0.0747 (-0=>1.885) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 1.76, losses: 0.398, 0.095, 0.587, 0.0755, 0.527, 0.0768 (-5=>1.725) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 1.87, losses: 0.438, 0.0925, 0.612, 0.0742, 0.578, 0.0757 (-1=>1.865) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 300, loss: 1.78, losses: 0.41, 0.0941, 0.598, 0.0766, 0.529, 0.075 (-15=>1.725) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 1.88, losses: 0.437, 0.0927, 0.617, 0.0742, 0.587, 0.0751 (-8=>1.843) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 310, loss: 1.76, losses: 0.4, 0.0951, 0.589, 0.0761, 0.528, 0.0756 (-25=>1.725) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 1.86, losses: 0.426, 0.0928, 0.614, 0.0737, 0.573, 0.0768 (-5=>1.833) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 320, loss: 1.76, losses: 0.41, 0.0927, 0.592, 0.0752, 0.514, 0.076 (-35=>1.725) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 1.88, losses: 0.442, 0.0921, 0.622, 0.0734, 0.576, 0.0749 (-15=>1.833) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 330, loss: 1.74, losses: 0.408, 0.0935, 0.584, 0.0761, 0.5, 0.0762 (-45=>1.725) 0it [00:01, ?it/s] 0it [00:26, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 1.85, losses: 0.429, 0.0922, 0.612, 0.0735, 0.568, 0.0749 (-3=>1.82) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 340, loss: 1.74, losses: 0.388, 0.0947, 0.59, 0.0752, 0.515, 0.0761 (-55=>1.725) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 1.83, losses: 0.419, 0.0944, 0.603, 0.0738, 0.563, 0.0751 (-4=>1.803) 0it [00:01, ?it/s] 0it [00:25, ?it/s] 0it [00:00, ?it/s] iter: 350, finished (-65=>1.725) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364Input
- prompts
- a cozy japanese ramen stall #pixelart
- settings
- drawer: pixel quality: better pixel_size: [128, 64] size: [512, 256] custom_loss: smoothness, edge edge_color: black transparency: true alpha_weight: 1 alpha_use_g: true alpha_gamma: 4
{ "prompts": "a cozy japanese ramen stall #pixelart", "settings": "drawer: pixel\nquality: better\npixel_size: [128, 64]\nsize: [512, 256]\ncustom_loss: smoothness, edge\nedge_color: black\ntransparency: true\nalpha_weight: 1\nalpha_use_g: true\nalpha_gamma: 4\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", { input: { prompts: "a cozy japanese ramen stall #pixelart", settings: "drawer: pixel\nquality: better\npixel_size: [128, 64]\nsize: [512, 256]\ncustom_loss: smoothness, edge\nedge_color: black\ntransparency: true\nalpha_weight: 1\nalpha_use_g: true\nalpha_gamma: 4\n" } } ); console.log(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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", input={ "prompts": "a cozy japanese ramen stall #pixelart", "settings": "drawer: pixel\nquality: better\npixel_size: [128, 64]\nsize: [512, 256]\ncustom_loss: smoothness, edge\nedge_color: black\ntransparency: true\nalpha_weight: 1\nalpha_use_g: true\nalpha_gamma: 4\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364", "input": { "prompts": "a cozy japanese ramen stall #pixelart", "settings": "drawer: pixel\\nquality: better\\npixel_size: [128, 64]\\nsize: [512, 256]\\ncustom_loss: smoothness, edge\\nedge_color: black\\ntransparency: true\\nalpha_weight: 1\\nalpha_use_g: true\\nalpha_gamma: 4\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-03-03T11:05:56.254406Z", "created_at": "2022-03-03T10:50:47.690648Z", "data_removed": false, "error": null, "id": "qy6vngm54jcdnidjev5fz2ddma", "input": { "prompts": "a cozy japanese ramen stall #pixelart", "settings": "drawer: pixel\nquality: better\npixel_size: [128, 64]\nsize: [512, 256]\ncustom_loss: smoothness, edge\nedge_color: black\ntransparency: true\nalpha_weight: 1\nalpha_use_g: true\nalpha_gamma: 4\n" }, "logs": "---> BasePixrayPredictor Predict\nUsing seed:\n12466130296711310613\nRunning pixeldrawer with 128x64 grid\nLoaded CLIP RN50: 224x224 and 102.01M params\nLoaded CLIP ViT-B/32: 224x224 and 151.28M params\nLoaded CLIP ViT-B/16: 224x224 and 149.62M params\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['a cozy japanese ramen stall #pixelart']\nusing custom losses: smoothness, edge\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 4.47, losses: 1.03, 0.0831, 0.967, 0.0622, 0.994, 0.0643, 1, 0.149, 0.125 (-0=>4.47)\n\n0it [00:01, ?it/s]\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 3.63, losses: 0.862, 0.085, 0.742, 0.0625, 0.766, 0.0618, 0.837, 0.156, 0.0614 (-0=>3.633)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 3.3, losses: 0.799, 0.088, 0.673, 0.0645, 0.69, 0.0621, 0.72, 0.163, 0.04 (-1=>3.261)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 3.12, losses: 0.77, 0.0888, 0.656, 0.0651, 0.664, 0.0624, 0.616, 0.164, 0.029 (-1=>3.047)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.95, losses: 0.743, 0.0883, 0.648, 0.0656, 0.653, 0.0638, 0.518, 0.154, 0.0214 (-1=>2.918)\n\n0it [00:01, ?it/s]\nCaught SIGTERM, exiting...\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.8, losses: 0.721, 0.0897, 0.632, 0.0678, 0.638, 0.0647, 0.429, 0.146, 0.0142 (-2=>2.789)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.68, losses: 0.703, 0.0892, 0.612, 0.0683, 0.62, 0.0659, 0.357, 0.152, 0.0154 (-3=>2.68)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.65, losses: 0.712, 0.0906, 0.623, 0.0687, 0.619, 0.0661, 0.307, 0.149, 0.0135 (-3=>2.635)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 80, loss: 2.62, losses: 0.711, 0.0899, 0.625, 0.0685, 0.62, 0.0653, 0.274, 0.144, 0.0182 (-0=>2.615)\n\n0it [00:01, ?it/s]\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 90, loss: 2.74, losses: 0.785, 0.0913, 0.672, 0.0654, 0.662, 0.0637, 0.25, 0.137, 0.0164 (-7=>2.573)\n\n0it [00:01, ?it/s]\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 100, loss: 2.57, losses: 0.713, 0.0907, 0.627, 0.0681, 0.617, 0.0665, 0.23, 0.14, 0.0154 (-6=>2.539)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 110, loss: 2.54, losses: 0.709, 0.0906, 0.615, 0.0697, 0.618, 0.0677, 0.217, 0.139, 0.0121 (-8=>2.518)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 120, loss: 2.47, losses: 0.696, 0.092, 0.6, 0.071, 0.597, 0.0686, 0.203, 0.137, 0.00822 (-0=>2.473)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 130, loss: 2.47, losses: 0.693, 0.0923, 0.602, 0.0704, 0.592, 0.0687, 0.192, 0.148, 0.00891 (-0=>2.467)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 140, loss: 2.47, losses: 0.691, 0.0903, 0.612, 0.0693, 0.606, 0.0673, 0.18, 0.13, 0.025 (-3=>2.461)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 150, loss: 2.47, losses: 0.696, 0.0909, 0.617, 0.07, 0.596, 0.0688, 0.175, 0.14, 0.0118 (-13=>2.461)\n\n0it [00:01, ?it/s]\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 160, loss: 2.47, losses: 0.707, 0.0914, 0.612, 0.0696, 0.604, 0.0685, 0.17, 0.128, 0.0176 (-7=>2.447)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 170, loss: 2.45, losses: 0.696, 0.0917, 0.608, 0.0702, 0.597, 0.0686, 0.166, 0.142, 0.0129 (-7=>2.44)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 180, loss: 2.44, losses: 0.694, 0.0933, 0.611, 0.0698, 0.588, 0.0684, 0.16, 0.139, 0.0174 (-3=>2.419)\n\n0it [00:01, ?it/s]\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 190, loss: 2.5, losses: 0.718, 0.0919, 0.633, 0.068, 0.604, 0.0673, 0.156, 0.141, 0.0171 (-13=>2.419)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 200, loss: 2.45, losses: 0.701, 0.0917, 0.616, 0.0697, 0.605, 0.0682, 0.155, 0.13, 0.0142 (-23=>2.419)\n\n0it [00:02, ?it/s]\n---> BasePixrayPredictor Predict\nUsing seed:\n5571083126261961472\nRunning pixeldrawer with 128x64 grid\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 210, loss: 2.44, losses: 0.691, 0.0932, 0.625, 0.0697, 0.598, 0.0682, 0.151, 0.13, 0.0168 (-2=>2.417)\n\n0it [00:01, ?it/s]\nLoaded CLIP RN50: 224x224 and 102.01M params\nLoaded CLIP ViT-B/32: 224x224 and 151.28M params\nLoaded CLIP ViT-B/16: 224x224 and 149.62M params\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 220, loss: 2.43, losses: 0.702, 0.0925, 0.613, 0.0703, 0.59, 0.0695, 0.148, 0.134, 0.0102 (-12=>2.417)\n\n0it [00:01, ?it/s]\nDropping learning rate\nUsing device:\ncuda:0\nOptimising using:\nAdam\nUsing text prompts:\n['a cozy japanese ramen stall #pixelart']\nusing custom losses: smoothness, edge\n\n0it [00:00, ?it/s]\n/root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.\n warnings.warn(\niter: 0, loss: 4.47, losses: 1.03, 0.0825, 0.965, 0.0624, 0.995, 0.0643, 1, 0.145, 0.133 (-0=>4.473)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 230, loss: 2.49, losses: 0.721, 0.0921, 0.629, 0.0685, 0.613, 0.0668, 0.147, 0.139, 0.0152 (-5=>2.418)\n\n0it [00:01, ?it/s]\n\n0it [00:30, ?it/s]\n\n0it [00:00, ?it/s]\niter: 10, loss: 3.68, losses: 0.853, 0.0842, 0.774, 0.0612, 0.793, 0.0602, 0.836, 0.155, 0.0688 (-0=>3.685)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 240, loss: 2.49, losses: 0.713, 0.0907, 0.639, 0.0672, 0.615, 0.0681, 0.147, 0.136, 0.0169 (-4=>2.399)\n\n0it [00:01, ?it/s]\n\n0it [00:30, ?it/s]\n\n0it [00:00, ?it/s]\niter: 20, loss: 3.33, losses: 0.797, 0.0847, 0.705, 0.0621, 0.698, 0.0618, 0.719, 0.157, 0.0449 (-1=>3.304)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 250, loss: 2.44, losses: 0.7, 0.092, 0.614, 0.0694, 0.592, 0.0693, 0.146, 0.143, 0.0125 (-14=>2.399)\n\n0it [00:01, ?it/s]\n\n0it [00:30, ?it/s]\n\n0it [00:00, ?it/s]\niter: 30, loss: 3.11, losses: 0.76, 0.0859, 0.66, 0.0639, 0.668, 0.0634, 0.614, 0.165, 0.0331 (-0=>3.113)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 260, loss: 2.42, losses: 0.693, 0.0926, 0.611, 0.07, 0.588, 0.0695, 0.147, 0.144, 0.00819 (-24=>2.399)\n\n0it [00:01, ?it/s]\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 40, loss: 2.9, losses: 0.722, 0.087, 0.626, 0.0674, 0.633, 0.0663, 0.518, 0.156, 0.0209 (-0=>2.896)\n\n0it [00:01, ?it/s]\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 270, loss: 2.49, losses: 0.72, 0.0918, 0.628, 0.0681, 0.612, 0.0673, 0.146, 0.149, 0.0118 (-34=>2.399)\n\n0it [00:01, ?it/s]\n\n0it [00:27, ?it/s]\n\n0it [00:00, ?it/s]\niter: 50, loss: 2.81, losses: 0.717, 0.0888, 0.639, 0.0678, 0.633, 0.0656, 0.434, 0.143, 0.0252 (-0=>2.813)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 280, loss: 2.39, losses: 0.684, 0.0913, 0.61, 0.0698, 0.585, 0.0696, 0.146, 0.124, 0.0141 (-0=>2.394)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 60, loss: 2.81, losses: 0.744, 0.0874, 0.651, 0.0643, 0.649, 0.0646, 0.367, 0.158, 0.0207 (-1=>2.695)\n\n0it [00:01, ?it/s]\n\n0it [00:29, ?it/s]\n\n0it [00:00, ?it/s]\niter: 290, loss: 2.39, losses: 0.691, 0.0912, 0.609, 0.0706, 0.588, 0.0701, 0.146, 0.119, 0.00906 (-0=>2.393)\n\n0it [00:01, ?it/s]\n\n0it [00:27, ?it/s]\n\n0it [00:00, ?it/s]\niter: 70, loss: 2.66, losses: 0.702, 0.089, 0.62, 0.0685, 0.621, 0.0668, 0.316, 0.153, 0.0203 (-1=>2.635)\n\n0it [00:01, ?it/s]\n\n0it [00:28, ?it/s]\n\n0it [00:00, ?it/s]\niter: 300, finished (-10=>2.393)\n\n0it [00:00, ?it/s]\n\n0it [00:00, ?it/s]", "metrics": { "predict_time": 908.381708, "total_time": 908.563758 }, "output": [ { "file": "https://replicate.delivery/mgxm/054be8ee-dbd4-4340-ba00-afa0f23e022c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/097c977a-8795-4d7b-8c8b-388dde3bf751/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/44f5437f-5c14-48e1-9c57-22202e70cd2d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e9a6cdba-c0ad-4357-9037-ed18d30f96e7/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b7dd2d61-1de3-4eb2-9417-cd8b7178adb3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/cb7efdd7-4219-45de-a49a-48e4d2165857/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/70381d64-2e9f-45cf-b3ed-8e91dbea98dd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1bdb64d4-bad0-40d4-9811-84deaa7d5125/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/b8d5f394-23f7-487d-a1ee-1312f52e2f73/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/43636b3b-eba3-4dc9-919b-4d8072bb470c/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/94960732-ac65-47ca-9398-1dadc9fcf3ac/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f229092f-5e83-423d-8b6d-2675f95f615b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/1654d0ed-a80c-4aeb-8bb1-c9df03577874/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/0e71468a-1bb0-46ab-9e0d-a97b8b734354/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c28a2d12-c5b7-4e05-9d82-adbc99e7557f/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5ddb7167-7ec7-4b34-88f5-bbed54e82243/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2ec49a23-894d-4d70-a2a3-0c07452e852d/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/3a7994d1-c714-4722-a16e-7472e86c4858/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2faddd33-993c-4e69-818d-06ff835972c3/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/52655d56-1cfc-4e34-920e-e7e001c76f2e/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/d08dd2d6-9f11-4d04-a036-b60bc7225563/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2fba2bfb-e096-4c39-b3da-feb48d2adf02/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8a4dea6f-e660-4d7e-8605-d035189da5fd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/7a7aec53-7ed0-42b3-9252-3cd326b6ff0b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a5a42bb5-dd57-4b72-b2ba-60bb40ec167a/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/2f84ff8b-e0fc-4ff7-a047-a1353a25ac20/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/be7ca0ca-7b00-4aa9-b00b-926356a007d5/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/8ff7f472-b196-4f46-9f3e-e32890f3799b/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/a7ca76c6-5af3-4896-a330-950b5d729964/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/e0269581-a8fa-4e2a-8be6-8faf3fd5a600/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/f624d2a0-5952-49d2-bd6b-1f8c1dd43cbf/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c646be32-4f43-4a53-993e-6d711e8a8a80/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/643220d0-0041-4564-92eb-437605654077/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/c44b6f74-9ee9-41a5-a2c8-07b9f2cc5090/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/5a9715eb-501a-4a9e-be79-d61e7cf0aafd/tempfile.png" }, { "file": "https://replicate.delivery/mgxm/ccb3ffba-098e-4356-bf4a-e88a47833347/tempfile.png" } ], "started_at": "2022-03-03T10:50:47.872698Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/qy6vngm54jcdnidjev5fz2ddma", "cancel": "https://api.replicate.com/v1/predictions/qy6vngm54jcdnidjev5fz2ddma/cancel" }, "version": "d5193a57978545d235d22459bf0f79e4a4c19e85fc7f4fc6202358fb516e2364" }
Generated in---> BasePixrayPredictor Predict Using seed: 12466130296711310613 Running pixeldrawer with 128x64 grid Loaded CLIP RN50: 224x224 and 102.01M params Loaded CLIP ViT-B/32: 224x224 and 151.28M params Loaded CLIP ViT-B/16: 224x224 and 149.62M params Using device: cuda:0 Optimising using: Adam Using text prompts: ['a cozy japanese ramen stall #pixelart'] using custom losses: smoothness, edge 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 4.47, losses: 1.03, 0.0831, 0.967, 0.0622, 0.994, 0.0643, 1, 0.149, 0.125 (-0=>4.47) 0it [00:01, ?it/s] 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 3.63, losses: 0.862, 0.085, 0.742, 0.0625, 0.766, 0.0618, 0.837, 0.156, 0.0614 (-0=>3.633) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 3.3, losses: 0.799, 0.088, 0.673, 0.0645, 0.69, 0.0621, 0.72, 0.163, 0.04 (-1=>3.261) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 3.12, losses: 0.77, 0.0888, 0.656, 0.0651, 0.664, 0.0624, 0.616, 0.164, 0.029 (-1=>3.047) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.95, losses: 0.743, 0.0883, 0.648, 0.0656, 0.653, 0.0638, 0.518, 0.154, 0.0214 (-1=>2.918) 0it [00:01, ?it/s] Caught SIGTERM, exiting... 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.8, losses: 0.721, 0.0897, 0.632, 0.0678, 0.638, 0.0647, 0.429, 0.146, 0.0142 (-2=>2.789) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.68, losses: 0.703, 0.0892, 0.612, 0.0683, 0.62, 0.0659, 0.357, 0.152, 0.0154 (-3=>2.68) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.65, losses: 0.712, 0.0906, 0.623, 0.0687, 0.619, 0.0661, 0.307, 0.149, 0.0135 (-3=>2.635) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 80, loss: 2.62, losses: 0.711, 0.0899, 0.625, 0.0685, 0.62, 0.0653, 0.274, 0.144, 0.0182 (-0=>2.615) 0it [00:01, ?it/s] 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 90, loss: 2.74, losses: 0.785, 0.0913, 0.672, 0.0654, 0.662, 0.0637, 0.25, 0.137, 0.0164 (-7=>2.573) 0it [00:01, ?it/s] 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 100, loss: 2.57, losses: 0.713, 0.0907, 0.627, 0.0681, 0.617, 0.0665, 0.23, 0.14, 0.0154 (-6=>2.539) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 110, loss: 2.54, losses: 0.709, 0.0906, 0.615, 0.0697, 0.618, 0.0677, 0.217, 0.139, 0.0121 (-8=>2.518) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 120, loss: 2.47, losses: 0.696, 0.092, 0.6, 0.071, 0.597, 0.0686, 0.203, 0.137, 0.00822 (-0=>2.473) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 130, loss: 2.47, losses: 0.693, 0.0923, 0.602, 0.0704, 0.592, 0.0687, 0.192, 0.148, 0.00891 (-0=>2.467) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 140, loss: 2.47, losses: 0.691, 0.0903, 0.612, 0.0693, 0.606, 0.0673, 0.18, 0.13, 0.025 (-3=>2.461) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 150, loss: 2.47, losses: 0.696, 0.0909, 0.617, 0.07, 0.596, 0.0688, 0.175, 0.14, 0.0118 (-13=>2.461) 0it [00:01, ?it/s] 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 160, loss: 2.47, losses: 0.707, 0.0914, 0.612, 0.0696, 0.604, 0.0685, 0.17, 0.128, 0.0176 (-7=>2.447) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 170, loss: 2.45, losses: 0.696, 0.0917, 0.608, 0.0702, 0.597, 0.0686, 0.166, 0.142, 0.0129 (-7=>2.44) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 180, loss: 2.44, losses: 0.694, 0.0933, 0.611, 0.0698, 0.588, 0.0684, 0.16, 0.139, 0.0174 (-3=>2.419) 0it [00:01, ?it/s] 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 190, loss: 2.5, losses: 0.718, 0.0919, 0.633, 0.068, 0.604, 0.0673, 0.156, 0.141, 0.0171 (-13=>2.419) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 200, loss: 2.45, losses: 0.701, 0.0917, 0.616, 0.0697, 0.605, 0.0682, 0.155, 0.13, 0.0142 (-23=>2.419) 0it [00:02, ?it/s] ---> BasePixrayPredictor Predict Using seed: 5571083126261961472 Running pixeldrawer with 128x64 grid 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 210, loss: 2.44, losses: 0.691, 0.0932, 0.625, 0.0697, 0.598, 0.0682, 0.151, 0.13, 0.0168 (-2=>2.417) 0it [00:01, ?it/s] Loaded CLIP RN50: 224x224 and 102.01M params Loaded CLIP ViT-B/32: 224x224 and 151.28M params Loaded CLIP ViT-B/16: 224x224 and 149.62M params 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 220, loss: 2.43, losses: 0.702, 0.0925, 0.613, 0.0703, 0.59, 0.0695, 0.148, 0.134, 0.0102 (-12=>2.417) 0it [00:01, ?it/s] Dropping learning rate Using device: cuda:0 Optimising using: Adam Using text prompts: ['a cozy japanese ramen stall #pixelart'] using custom losses: smoothness, edge 0it [00:00, ?it/s] /root/.pyenv/versions/3.8.12/lib/python3.8/site-packages/torch/nn/functional.py:3609: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. warnings.warn( iter: 0, loss: 4.47, losses: 1.03, 0.0825, 0.965, 0.0624, 0.995, 0.0643, 1, 0.145, 0.133 (-0=>4.473) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 230, loss: 2.49, losses: 0.721, 0.0921, 0.629, 0.0685, 0.613, 0.0668, 0.147, 0.139, 0.0152 (-5=>2.418) 0it [00:01, ?it/s] 0it [00:30, ?it/s] 0it [00:00, ?it/s] iter: 10, loss: 3.68, losses: 0.853, 0.0842, 0.774, 0.0612, 0.793, 0.0602, 0.836, 0.155, 0.0688 (-0=>3.685) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 240, loss: 2.49, losses: 0.713, 0.0907, 0.639, 0.0672, 0.615, 0.0681, 0.147, 0.136, 0.0169 (-4=>2.399) 0it [00:01, ?it/s] 0it [00:30, ?it/s] 0it [00:00, ?it/s] iter: 20, loss: 3.33, losses: 0.797, 0.0847, 0.705, 0.0621, 0.698, 0.0618, 0.719, 0.157, 0.0449 (-1=>3.304) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 250, loss: 2.44, losses: 0.7, 0.092, 0.614, 0.0694, 0.592, 0.0693, 0.146, 0.143, 0.0125 (-14=>2.399) 0it [00:01, ?it/s] 0it [00:30, ?it/s] 0it [00:00, ?it/s] iter: 30, loss: 3.11, losses: 0.76, 0.0859, 0.66, 0.0639, 0.668, 0.0634, 0.614, 0.165, 0.0331 (-0=>3.113) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 260, loss: 2.42, losses: 0.693, 0.0926, 0.611, 0.07, 0.588, 0.0695, 0.147, 0.144, 0.00819 (-24=>2.399) 0it [00:01, ?it/s] 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 40, loss: 2.9, losses: 0.722, 0.087, 0.626, 0.0674, 0.633, 0.0663, 0.518, 0.156, 0.0209 (-0=>2.896) 0it [00:01, ?it/s] 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 270, loss: 2.49, losses: 0.72, 0.0918, 0.628, 0.0681, 0.612, 0.0673, 0.146, 0.149, 0.0118 (-34=>2.399) 0it [00:01, ?it/s] 0it [00:27, ?it/s] 0it [00:00, ?it/s] iter: 50, loss: 2.81, losses: 0.717, 0.0888, 0.639, 0.0678, 0.633, 0.0656, 0.434, 0.143, 0.0252 (-0=>2.813) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 280, loss: 2.39, losses: 0.684, 0.0913, 0.61, 0.0698, 0.585, 0.0696, 0.146, 0.124, 0.0141 (-0=>2.394) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 60, loss: 2.81, losses: 0.744, 0.0874, 0.651, 0.0643, 0.649, 0.0646, 0.367, 0.158, 0.0207 (-1=>2.695) 0it [00:01, ?it/s] 0it [00:29, ?it/s] 0it [00:00, ?it/s] iter: 290, loss: 2.39, losses: 0.691, 0.0912, 0.609, 0.0706, 0.588, 0.0701, 0.146, 0.119, 0.00906 (-0=>2.393) 0it [00:01, ?it/s] 0it [00:27, ?it/s] 0it [00:00, ?it/s] iter: 70, loss: 2.66, losses: 0.702, 0.089, 0.62, 0.0685, 0.621, 0.0668, 0.316, 0.153, 0.0203 (-1=>2.635) 0it [00:01, ?it/s] 0it [00:28, ?it/s] 0it [00:00, ?it/s] iter: 300, finished (-10=>2.393) 0it [00:00, ?it/s] 0it [00:00, ?it/s]
Prediction
pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebfIDusuwi2dcdjdwfb7p53vvgyzr2aStatusSucceededSourceWebHardware–Total durationCreatedInput
- drawer
- pixel
- prompts
- Super Mario Bros #Splafluted Level
- settings
- quality: better init_image: https://i.pinimg.com/originals/19/84/67/19846712a70fe39826e61756d63b6d88.png init_image_alpha: 50
{ "drawer": "pixel", "prompts": "Super Mario Bros #Splafluted Level", "settings": "quality: better\ninit_image: https://i.pinimg.com/originals/19/84/67/19846712a70fe39826e61756d63b6d88.png\ninit_image_alpha: 50\n" }
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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf", { input: { drawer: "pixel", prompts: "Super Mario Bros #Splafluted Level", settings: "quality: better\ninit_image: https://i.pinimg.com/originals/19/84/67/19846712a70fe39826e61756d63b6d88.png\ninit_image_alpha: 50\n" } } ); // 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 pixray/text2image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf", input={ "drawer": "pixel", "prompts": "Super Mario Bros #Splafluted Level", "settings": "quality: better\ninit_image: https://i.pinimg.com/originals/19/84/67/19846712a70fe39826e61756d63b6d88.png\ninit_image_alpha: 50\n" } ) # The pixray/text2image 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/pixray/text2image/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run pixray/text2image 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": "pixray/text2image:5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf", "input": { "drawer": "pixel", "prompts": "Super Mario Bros #Splafluted Level", "settings": "quality: better\\ninit_image: https://i.pinimg.com/originals/19/84/67/19846712a70fe39826e61756d63b6d88.png\\ninit_image_alpha: 50\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-06-01T11:11:45.402820Z", "created_at": "2022-06-01T11:02:53.484589Z", "data_removed": false, "error": null, "id": "usuwi2dcdjdwfb7p53vvgyzr2a", "input": { "drawer": "pixel", "prompts": "Super Mario Bros #Splafluted Level", "settings": "quality: better\ninit_image: https://i.pinimg.com/originals/19/84/67/19846712a70fe39826e61756d63b6d88.png\ninit_image_alpha: 50\n" }, "logs": null, "metrics": { "predict_time": 483.168559, "total_time": 531.918231 }, "output": [ "https://replicate.delivery/mgxm/a8589b80-f69a-4e6a-ae48-882742d73574/tempfile.png", "https://replicate.delivery/mgxm/3ddd8e27-4304-4997-93df-fcdcd7653384/tempfile.png", "https://replicate.delivery/mgxm/b23c1ce9-e8f6-4ec3-a021-d751c1e9502e/tempfile.png", "https://replicate.delivery/mgxm/6d17b7ff-6b30-44ea-992d-13fc37098920/tempfile.png", "https://replicate.delivery/mgxm/57ee6c77-0371-4a9d-bedf-25c88cce556d/tempfile.png", "https://replicate.delivery/mgxm/c35671f4-229f-461f-8a47-4fbfc8c426d8/tempfile.png", "https://replicate.delivery/mgxm/820150f7-df56-4ee2-ae1e-8ec0b394a2f9/tempfile.png", "https://replicate.delivery/mgxm/7a469b45-37a2-4411-8ac3-305c8c316491/tempfile.png", "https://replicate.delivery/mgxm/09573146-06b6-4b13-b2ff-d2d42c5cf229/tempfile.png", "https://replicate.delivery/mgxm/0ac931a2-6361-440e-b7b4-e1530d9f78d0/tempfile.png", "https://replicate.delivery/mgxm/97acc87c-7c42-463c-b111-3e92efe93195/tempfile.png", "https://replicate.delivery/mgxm/4659ac99-769b-4dd4-b049-86eaf18c33a2/tempfile.png", "https://replicate.delivery/mgxm/024a2d50-4fa9-4ef6-8e32-0a2962b6e51c/tempfile.png", "https://replicate.delivery/mgxm/5d422ee3-ac4f-473e-b041-4705395956f0/tempfile.png", "https://replicate.delivery/mgxm/46a3baaa-a0cf-44a6-82d8-ab92d3cda61f/tempfile.png", "https://replicate.delivery/mgxm/c069c80f-cf19-4d9d-846f-3f4302c1978d/tempfile.png", "https://replicate.delivery/mgxm/9b287397-a8b8-4b8d-96fa-6516efddad16/tempfile.png", "https://replicate.delivery/mgxm/080140dc-f864-4873-9680-bf74b614baba/tempfile.png", "https://replicate.delivery/mgxm/15bd3f60-fbde-4a55-8dfd-52128722eeee/tempfile.png", "https://replicate.delivery/mgxm/66db3fe6-812d-4458-b71e-89730dde0d70/tempfile.png", "https://replicate.delivery/mgxm/ec1c721a-fefc-4a03-90c2-9154fe40cd73/tempfile.png", "https://replicate.delivery/mgxm/39a8676d-0040-44ec-af1e-883455cf60b8/tempfile.png", "https://replicate.delivery/mgxm/022f9a71-945a-4215-8cea-b0fb6637afdd/tempfile.png", "https://replicate.delivery/mgxm/6b1f3ae3-0d57-481a-801d-30a7a74262e2/tempfile.png", "https://replicate.delivery/mgxm/bdc8de6c-2ab4-443d-bbcf-719add6c1bb0/tempfile.png", "https://replicate.delivery/mgxm/e7a2cf7d-ca89-497d-9012-cff368dcc799/tempfile.png", "https://replicate.delivery/mgxm/55798e69-c848-42c4-9d60-f7f54be043be/tempfile.png", "https://replicate.delivery/mgxm/66f83b7e-ad7a-4963-9d7f-7e20a8236410/tempfile.png", "https://replicate.delivery/mgxm/fbf873b0-4b94-4692-9508-aa092a6dede7/tempfile.png", "https://replicate.delivery/mgxm/161f8b5b-ec5a-4474-bbc7-0fee3ad05c1a/tempfile.png", "https://replicate.delivery/mgxm/01f57d7b-3e15-4873-8c1b-4436a4ddca4c/tempfile.png" ], "started_at": "2022-06-01T11:03:42.234261Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/usuwi2dcdjdwfb7p53vvgyzr2a", "cancel": "https://api.replicate.com/v1/predictions/usuwi2dcdjdwfb7p53vvgyzr2a/cancel" }, "version": "5c347a4bfa1d4523a58ae614c2194e15f2ae682b57e3797a5bb468920aa70ebf" }
Generated in
Want to make some of these yourself?
Run this model