cjwbw
/
pixart-sigma
Weak-to-Strong Training of Diffusion Transformer for 4K Text-to-Image Generation
Prediction
cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067IDbswj3yqwvhrgg0cet90rw36re8StatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- prompt
- Close-up, gray-haired, bearded man in 60s, observing passersby, in wool coat and brown beret, glasses, cinematic.
- guidance_scale
- 4.5
- num_inference_steps
- 20
{ "prompt": "Close-up, gray-haired, bearded man in 60s, observing passersby, in wool coat and brown beret, glasses, cinematic.", "guidance_scale": 4.5, "num_inference_steps": 20 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", { input: { prompt: "Close-up, gray-haired, bearded man in 60s, observing passersby, in wool coat and brown beret, glasses, cinematic.", guidance_scale: 4.5, num_inference_steps: 20 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", input={ "prompt": "Close-up, gray-haired, bearded man in 60s, observing passersby, in wool coat and brown beret, glasses, cinematic.", "guidance_scale": 4.5, "num_inference_steps": 20 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", "input": { "prompt": "Close-up, gray-haired, bearded man in 60s, observing passersby, in wool coat and brown beret, glasses, cinematic.", "guidance_scale": 4.5, "num_inference_steps": 20 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-04-12T12:23:44.382850Z", "created_at": "2024-04-12T12:22:03.740000Z", "data_removed": false, "error": null, "id": "bswj3yqwvhrgg0cet90rw36re8", "input": { "prompt": "Close-up, gray-haired, bearded man in 60s, observing passersby, in wool coat and brown beret, glasses, cinematic.", "guidance_scale": 4.5, "num_inference_steps": 20 }, "logs": "Using seed: 48034\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\nSetting `clean_caption` to False...\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\nSetting `clean_caption` to False...\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:01<00:22, 1.20s/it]\n 10%|█ | 2/20 [00:02<00:20, 1.14s/it]\n 15%|█▌ | 3/20 [00:03<00:19, 1.13s/it]\n 20%|██ | 4/20 [00:04<00:17, 1.12s/it]\n 25%|██▌ | 5/20 [00:05<00:16, 1.12s/it]\n 30%|███ | 6/20 [00:06<00:15, 1.12s/it]\n 35%|███▌ | 7/20 [00:07<00:14, 1.12s/it]\n 40%|████ | 8/20 [00:09<00:13, 1.12s/it]\n 45%|████▌ | 9/20 [00:10<00:12, 1.12s/it]\n 50%|█████ | 10/20 [00:11<00:11, 1.12s/it]\n 55%|█████▌ | 11/20 [00:12<00:10, 1.12s/it]\n 60%|██████ | 12/20 [00:13<00:08, 1.12s/it]\n 65%|██████▌ | 13/20 [00:14<00:07, 1.12s/it]\n 70%|███████ | 14/20 [00:15<00:06, 1.12s/it]\n 75%|███████▌ | 15/20 [00:16<00:05, 1.12s/it]\n 80%|████████ | 16/20 [00:17<00:04, 1.12s/it]\n 85%|████████▌ | 17/20 [00:19<00:03, 1.12s/it]\n 90%|█████████ | 18/20 [00:20<00:02, 1.12s/it]\n 95%|█████████▌| 19/20 [00:21<00:01, 1.12s/it]\n100%|██████████| 20/20 [00:22<00:00, 1.12s/it]\n100%|██████████| 20/20 [00:22<00:00, 1.12s/it]", "metrics": { "predict_time": 25.091489, "total_time": 100.64285 }, "output": "https://replicate.delivery/pbxt/iipXCQGL7e1yBaxLCtsP9b3CUUfUkO0lkOzyaAL9Z6QOntpSA/out.png", "started_at": "2024-04-12T12:23:19.291361Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/bswj3yqwvhrgg0cet90rw36re8", "cancel": "https://api.replicate.com/v1/predictions/bswj3yqwvhrgg0cet90rw36re8/cancel" }, "version": "dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067" }
Generated inUsing seed: 48034 Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip: `pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation. Setting `clean_caption` to False... Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip: `pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation. Setting `clean_caption` to False... 0%| | 0/20 [00:00<?, ?it/s] 5%|▌ | 1/20 [00:01<00:22, 1.20s/it] 10%|█ | 2/20 [00:02<00:20, 1.14s/it] 15%|█▌ | 3/20 [00:03<00:19, 1.13s/it] 20%|██ | 4/20 [00:04<00:17, 1.12s/it] 25%|██▌ | 5/20 [00:05<00:16, 1.12s/it] 30%|███ | 6/20 [00:06<00:15, 1.12s/it] 35%|███▌ | 7/20 [00:07<00:14, 1.12s/it] 40%|████ | 8/20 [00:09<00:13, 1.12s/it] 45%|████▌ | 9/20 [00:10<00:12, 1.12s/it] 50%|█████ | 10/20 [00:11<00:11, 1.12s/it] 55%|█████▌ | 11/20 [00:12<00:10, 1.12s/it] 60%|██████ | 12/20 [00:13<00:08, 1.12s/it] 65%|██████▌ | 13/20 [00:14<00:07, 1.12s/it] 70%|███████ | 14/20 [00:15<00:06, 1.12s/it] 75%|███████▌ | 15/20 [00:16<00:05, 1.12s/it] 80%|████████ | 16/20 [00:17<00:04, 1.12s/it] 85%|████████▌ | 17/20 [00:19<00:03, 1.12s/it] 90%|█████████ | 18/20 [00:20<00:02, 1.12s/it] 95%|█████████▌| 19/20 [00:21<00:01, 1.12s/it] 100%|██████████| 20/20 [00:22<00:00, 1.12s/it] 100%|██████████| 20/20 [00:22<00:00, 1.12s/it]
Prediction
cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067IDg15d0nzwwxrgp0cet93ag728bgStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- prompt
- Photorealistic closeup video of two pirate ships battling each other as they sail inside a cup of coffee.
- guidance_scale
- 4.5
- num_inference_steps
- 20
{ "prompt": "Photorealistic closeup video of two pirate ships battling each other as they sail inside a cup of coffee.", "guidance_scale": 4.5, "num_inference_steps": 20 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", { input: { prompt: "Photorealistic closeup video of two pirate ships battling each other as they sail inside a cup of coffee.", guidance_scale: 4.5, num_inference_steps: 20 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", input={ "prompt": "Photorealistic closeup video of two pirate ships battling each other as they sail inside a cup of coffee.", "guidance_scale": 4.5, "num_inference_steps": 20 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", "input": { "prompt": "Photorealistic closeup video of two pirate ships battling each other as they sail inside a cup of coffee.", "guidance_scale": 4.5, "num_inference_steps": 20 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-04-12T12:27:56.449257Z", "created_at": "2024-04-12T12:27:31.431000Z", "data_removed": false, "error": null, "id": "g15d0nzwwxrgp0cet93ag728bg", "input": { "prompt": "Photorealistic closeup video of two pirate ships battling each other as they sail inside a cup of coffee.", "guidance_scale": 4.5, "num_inference_steps": 20 }, "logs": "Using seed: 20940\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\nSetting `clean_caption` to False...\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\nSetting `clean_caption` to False...\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:01<00:21, 1.13s/it]\n 10%|█ | 2/20 [00:02<00:20, 1.11s/it]\n 15%|█▌ | 3/20 [00:03<00:18, 1.12s/it]\n 20%|██ | 4/20 [00:04<00:17, 1.12s/it]\n 25%|██▌ | 5/20 [00:05<00:16, 1.12s/it]\n 30%|███ | 6/20 [00:06<00:15, 1.12s/it]\n 35%|███▌ | 7/20 [00:07<00:14, 1.12s/it]\n 40%|████ | 8/20 [00:08<00:13, 1.12s/it]\n 45%|████▌ | 9/20 [00:10<00:12, 1.12s/it]\n 50%|█████ | 10/20 [00:11<00:11, 1.12s/it]\n 55%|█████▌ | 11/20 [00:12<00:10, 1.12s/it]\n 60%|██████ | 12/20 [00:13<00:08, 1.12s/it]\n 65%|██████▌ | 13/20 [00:14<00:07, 1.12s/it]\n 70%|███████ | 14/20 [00:15<00:06, 1.12s/it]\n 75%|███████▌ | 15/20 [00:16<00:05, 1.12s/it]\n 80%|████████ | 16/20 [00:17<00:04, 1.12s/it]\n 85%|████████▌ | 17/20 [00:19<00:03, 1.12s/it]\n 90%|█████████ | 18/20 [00:20<00:02, 1.12s/it]\n 95%|█████████▌| 19/20 [00:21<00:01, 1.12s/it]\n100%|██████████| 20/20 [00:22<00:00, 1.12s/it]\n100%|██████████| 20/20 [00:22<00:00, 1.12s/it]", "metrics": { "predict_time": 24.970585, "total_time": 25.018257 }, "output": "https://replicate.delivery/pbxt/zn2mGosXVdI5CJuEdsxSqvR6t2VDlxShAG9BG6OUz76yabqE/out.png", "started_at": "2024-04-12T12:27:31.478672Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/g15d0nzwwxrgp0cet93ag728bg", "cancel": "https://api.replicate.com/v1/predictions/g15d0nzwwxrgp0cet93ag728bg/cancel" }, "version": "dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067" }
Generated inUsing seed: 20940 Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip: `pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation. Setting `clean_caption` to False... Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip: `pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation. Setting `clean_caption` to False... 0%| | 0/20 [00:00<?, ?it/s] 5%|▌ | 1/20 [00:01<00:21, 1.13s/it] 10%|█ | 2/20 [00:02<00:20, 1.11s/it] 15%|█▌ | 3/20 [00:03<00:18, 1.12s/it] 20%|██ | 4/20 [00:04<00:17, 1.12s/it] 25%|██▌ | 5/20 [00:05<00:16, 1.12s/it] 30%|███ | 6/20 [00:06<00:15, 1.12s/it] 35%|███▌ | 7/20 [00:07<00:14, 1.12s/it] 40%|████ | 8/20 [00:08<00:13, 1.12s/it] 45%|████▌ | 9/20 [00:10<00:12, 1.12s/it] 50%|█████ | 10/20 [00:11<00:11, 1.12s/it] 55%|█████▌ | 11/20 [00:12<00:10, 1.12s/it] 60%|██████ | 12/20 [00:13<00:08, 1.12s/it] 65%|██████▌ | 13/20 [00:14<00:07, 1.12s/it] 70%|███████ | 14/20 [00:15<00:06, 1.12s/it] 75%|███████▌ | 15/20 [00:16<00:05, 1.12s/it] 80%|████████ | 16/20 [00:17<00:04, 1.12s/it] 85%|████████▌ | 17/20 [00:19<00:03, 1.12s/it] 90%|█████████ | 18/20 [00:20<00:02, 1.12s/it] 95%|█████████▌| 19/20 [00:21<00:01, 1.12s/it] 100%|██████████| 20/20 [00:22<00:00, 1.12s/it] 100%|██████████| 20/20 [00:22<00:00, 1.12s/it]
Prediction
cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067IDq5eebdscz1rgp0cet948dvzv0mStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- prompt
- Body shot, a French woman, Photography, French Streets background, backlight, rim light, Fujifilm.
- guidance_scale
- 4.5
- num_inference_steps
- 20
{ "prompt": "Body shot, a French woman, Photography, French Streets background, backlight, rim light, Fujifilm.", "guidance_scale": 4.5, "num_inference_steps": 20 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", { input: { prompt: "Body shot, a French woman, Photography, French Streets background, backlight, rim light, Fujifilm.", guidance_scale: 4.5, num_inference_steps: 20 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", input={ "prompt": "Body shot, a French woman, Photography, French Streets background, backlight, rim light, Fujifilm.", "guidance_scale": 4.5, "num_inference_steps": 20 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", "input": { "prompt": "Body shot, a French woman, Photography, French Streets background, backlight, rim light, Fujifilm.", "guidance_scale": 4.5, "num_inference_steps": 20 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-04-12T12:29:14.631474Z", "created_at": "2024-04-12T12:28:49.272000Z", "data_removed": false, "error": null, "id": "q5eebdscz1rgp0cet948dvzv0m", "input": { "prompt": "Body shot, a French woman, Photography, French Streets background, backlight, rim light, Fujifilm.", "guidance_scale": 4.5, "num_inference_steps": 20 }, "logs": "Using seed: 29560\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\nSetting `clean_caption` to False...\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\nSetting `clean_caption` to False...\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:01<00:21, 1.12s/it]\n 10%|█ | 2/20 [00:02<00:20, 1.12s/it]\n 15%|█▌ | 3/20 [00:03<00:19, 1.12s/it]\n 20%|██ | 4/20 [00:04<00:17, 1.12s/it]\n 25%|██▌ | 5/20 [00:05<00:16, 1.12s/it]\n 30%|███ | 6/20 [00:06<00:15, 1.12s/it]\n 35%|███▌ | 7/20 [00:07<00:14, 1.12s/it]\n 40%|████ | 8/20 [00:08<00:13, 1.13s/it]\n 45%|████▌ | 9/20 [00:10<00:12, 1.13s/it]\n 50%|█████ | 10/20 [00:11<00:11, 1.13s/it]\n 55%|█████▌ | 11/20 [00:12<00:10, 1.13s/it]\n 60%|██████ | 12/20 [00:13<00:09, 1.13s/it]\n 65%|██████▌ | 13/20 [00:14<00:07, 1.13s/it]\n 70%|███████ | 14/20 [00:15<00:06, 1.13s/it]\n 75%|███████▌ | 15/20 [00:16<00:05, 1.13s/it]\n 80%|████████ | 16/20 [00:18<00:04, 1.13s/it]\n 85%|████████▌ | 17/20 [00:19<00:03, 1.13s/it]\n 90%|█████████ | 18/20 [00:20<00:02, 1.13s/it]\n 95%|█████████▌| 19/20 [00:21<00:01, 1.14s/it]\n100%|██████████| 20/20 [00:22<00:00, 1.14s/it]\n100%|██████████| 20/20 [00:22<00:00, 1.13s/it]", "metrics": { "predict_time": 25.322103, "total_time": 25.359474 }, "output": "https://replicate.delivery/pbxt/0AeaXnG6xTSOQ6qr2RDcfwuwMfwxqeNqtuujhPWW5cwnx2mKB/out.png", "started_at": "2024-04-12T12:28:49.309371Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/q5eebdscz1rgp0cet948dvzv0m", "cancel": "https://api.replicate.com/v1/predictions/q5eebdscz1rgp0cet948dvzv0m/cancel" }, "version": "dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067" }
Generated inUsing seed: 29560 Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip: `pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation. Setting `clean_caption` to False... Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip: `pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation. Setting `clean_caption` to False... 0%| | 0/20 [00:00<?, ?it/s] 5%|▌ | 1/20 [00:01<00:21, 1.12s/it] 10%|█ | 2/20 [00:02<00:20, 1.12s/it] 15%|█▌ | 3/20 [00:03<00:19, 1.12s/it] 20%|██ | 4/20 [00:04<00:17, 1.12s/it] 25%|██▌ | 5/20 [00:05<00:16, 1.12s/it] 30%|███ | 6/20 [00:06<00:15, 1.12s/it] 35%|███▌ | 7/20 [00:07<00:14, 1.12s/it] 40%|████ | 8/20 [00:08<00:13, 1.13s/it] 45%|████▌ | 9/20 [00:10<00:12, 1.13s/it] 50%|█████ | 10/20 [00:11<00:11, 1.13s/it] 55%|█████▌ | 11/20 [00:12<00:10, 1.13s/it] 60%|██████ | 12/20 [00:13<00:09, 1.13s/it] 65%|██████▌ | 13/20 [00:14<00:07, 1.13s/it] 70%|███████ | 14/20 [00:15<00:06, 1.13s/it] 75%|███████▌ | 15/20 [00:16<00:05, 1.13s/it] 80%|████████ | 16/20 [00:18<00:04, 1.13s/it] 85%|████████▌ | 17/20 [00:19<00:03, 1.13s/it] 90%|█████████ | 18/20 [00:20<00:02, 1.13s/it] 95%|█████████▌| 19/20 [00:21<00:01, 1.14s/it] 100%|██████████| 20/20 [00:22<00:00, 1.14s/it] 100%|██████████| 20/20 [00:22<00:00, 1.13s/it]
Prediction
cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067ID6f2m6xdpv9rgg0cet8y9tds6n0StatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- prompt
- A small cactus with a happy face in the Sahara desert.
- guidance_scale
- 4.5
- num_inference_steps
- 20
{ "prompt": "A small cactus with a happy face in the Sahara desert.", "guidance_scale": 4.5, "num_inference_steps": 20 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", { input: { prompt: "A small cactus with a happy face in the Sahara desert.", guidance_scale: 4.5, num_inference_steps: 20 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", input={ "prompt": "A small cactus with a happy face in the Sahara desert.", "guidance_scale": 4.5, "num_inference_steps": 20 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run cjwbw/pixart-sigma using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "cjwbw/pixart-sigma:dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067", "input": { "prompt": "A small cactus with a happy face in the Sahara desert.", "guidance_scale": 4.5, "num_inference_steps": 20 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-04-12T12:17:54.199034Z", "created_at": "2024-04-12T12:16:18.138000Z", "data_removed": false, "error": null, "id": "6f2m6xdpv9rgg0cet8y9tds6n0", "input": { "prompt": "A small cactus with a happy face in the Sahara desert.", "guidance_scale": 4.5, "num_inference_steps": 20 }, "logs": "Using seed: 4859\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\nSetting `clean_caption` to False...\nSetting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip:\n`pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation.\nSetting `clean_caption` to False...\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:01<00:22, 1.18s/it]\n 10%|█ | 2/20 [00:02<00:20, 1.13s/it]\n 15%|█▌ | 3/20 [00:03<00:19, 1.12s/it]\n 20%|██ | 4/20 [00:04<00:17, 1.12s/it]\n 25%|██▌ | 5/20 [00:05<00:16, 1.11s/it]\n 30%|███ | 6/20 [00:06<00:15, 1.11s/it]\n 35%|███▌ | 7/20 [00:07<00:14, 1.11s/it]\n 40%|████ | 8/20 [00:08<00:13, 1.11s/it]\n 45%|████▌ | 9/20 [00:10<00:12, 1.11s/it]\n 50%|█████ | 10/20 [00:11<00:11, 1.12s/it]\n 55%|█████▌ | 11/20 [00:12<00:10, 1.12s/it]\n 60%|██████ | 12/20 [00:13<00:08, 1.11s/it]\n 65%|██████▌ | 13/20 [00:14<00:07, 1.11s/it]\n 70%|███████ | 14/20 [00:15<00:06, 1.11s/it]\n 75%|███████▌ | 15/20 [00:16<00:05, 1.11s/it]\n 80%|████████ | 16/20 [00:17<00:04, 1.11s/it]\n 85%|████████▌ | 17/20 [00:18<00:03, 1.11s/it]\n 90%|█████████ | 18/20 [00:20<00:02, 1.11s/it]\n 95%|█████████▌| 19/20 [00:21<00:01, 1.11s/it]\n100%|██████████| 20/20 [00:22<00:00, 1.11s/it]\n100%|██████████| 20/20 [00:22<00:00, 1.12s/it]", "metrics": { "predict_time": 25.007262, "total_time": 96.061034 }, "output": "https://replicate.delivery/pbxt/se7NjRokzPT2RSQY84f13N6SA655QRvIYzhm1vodAKrwhtpSA/out.png", "started_at": "2024-04-12T12:17:29.191772Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/6f2m6xdpv9rgg0cet8y9tds6n0", "cancel": "https://api.replicate.com/v1/predictions/6f2m6xdpv9rgg0cet8y9tds6n0/cancel" }, "version": "dd378305882101b9be6ade3af645c36337f5050da8819f173f15ec4ad1210067" }
Generated inUsing seed: 4859 Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip: `pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation. Setting `clean_caption` to False... Setting `clean_caption=True` requires the Beautiful Soup library but it was not found in your environment. You can install it with pip: `pip install beautifulsoup4`. Please note that you may need to restart your runtime after installation. Setting `clean_caption` to False... 0%| | 0/20 [00:00<?, ?it/s] 5%|▌ | 1/20 [00:01<00:22, 1.18s/it] 10%|█ | 2/20 [00:02<00:20, 1.13s/it] 15%|█▌ | 3/20 [00:03<00:19, 1.12s/it] 20%|██ | 4/20 [00:04<00:17, 1.12s/it] 25%|██▌ | 5/20 [00:05<00:16, 1.11s/it] 30%|███ | 6/20 [00:06<00:15, 1.11s/it] 35%|███▌ | 7/20 [00:07<00:14, 1.11s/it] 40%|████ | 8/20 [00:08<00:13, 1.11s/it] 45%|████▌ | 9/20 [00:10<00:12, 1.11s/it] 50%|█████ | 10/20 [00:11<00:11, 1.12s/it] 55%|█████▌ | 11/20 [00:12<00:10, 1.12s/it] 60%|██████ | 12/20 [00:13<00:08, 1.11s/it] 65%|██████▌ | 13/20 [00:14<00:07, 1.11s/it] 70%|███████ | 14/20 [00:15<00:06, 1.11s/it] 75%|███████▌ | 15/20 [00:16<00:05, 1.11s/it] 80%|████████ | 16/20 [00:17<00:04, 1.11s/it] 85%|████████▌ | 17/20 [00:18<00:03, 1.11s/it] 90%|█████████ | 18/20 [00:20<00:02, 1.11s/it] 95%|█████████▌| 19/20 [00:21<00:01, 1.11s/it] 100%|██████████| 20/20 [00:22<00:00, 1.11s/it] 100%|██████████| 20/20 [00:22<00:00, 1.12s/it]
Want to make some of these yourself?
Run this model