jyoung105
/
sdxl-turbo
Adversarial Diffusion Distillation
Prediction
jyoung105/sdxl-turbo:93c488b9IDz7q0r9ke3nrgj0cjthh8fjr71mStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- eta
- 0
- steps
- 1
- width
- 1024
- height
- 1024
- prompt
- A man with hoodie on, illustration
- clip_skip
- 0
- num_images
- 1
- guidance_scale
- 0
{ "eta": 0, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0 }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run jyoung105/sdxl-turbo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "jyoung105/sdxl-turbo:93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7", { input: { eta: 0, steps: 1, width: 1024, height: 1024, prompt: "A man with hoodie on, illustration", clip_skip: 0, num_images: 1, guidance_scale: 0 } } ); 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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run jyoung105/sdxl-turbo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "jyoung105/sdxl-turbo:93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7", input={ "eta": 0, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run jyoung105/sdxl-turbo 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": "93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7", "input": { "eta": 0, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/jyoung105/sdxl-turbo@sha256:93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7 \ -i 'eta=0' \ -i 'steps=1' \ -i 'width=1024' \ -i 'height=1024' \ -i 'prompt="A man with hoodie on, illustration"' \ -i 'clip_skip=0' \ -i 'num_images=1' \ -i 'guidance_scale=0'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/jyoung105/sdxl-turbo@sha256:93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "eta": 0, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-10-28T18:30:00.337889Z", "created_at": "2024-10-28T18:27:53.501000Z", "data_removed": false, "error": null, "id": "z7q0r9ke3nrgj0cjthh8fjr71m", "input": { "eta": 0, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0 }, "logs": "DEVICE: cuda\nDTYPE: torch.float16\nUsing seed: 59385\nFinish setup in 2.47955322265625e-05 secs.\n[Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 3.11it/s]\n100%|██████████| 1/1 [00:00<00:00, 3.11it/s]\nFinish generation in 1.8207151889801025 secs.", "metrics": { "predict_time": 2.711686834, "total_time": 126.836889 }, "output": [ "https://replicate.delivery/pbxt/z6BXepA0WXTfgU8SOrNHAjBFqVZ1IENEoitxO8iN04vnoYrTA/out_0.png" ], "started_at": "2024-10-28T18:29:57.626203Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/z7q0r9ke3nrgj0cjthh8fjr71m", "cancel": "https://api.replicate.com/v1/predictions/z7q0r9ke3nrgj0cjthh8fjr71m/cancel" }, "version": "521267bca99a59f8b16b812755603e23b7a5412767568d47c915920eabd9ef90" }
Generated inDEVICE: cuda DTYPE: torch.float16 Using seed: 59385 Finish setup in 2.47955322265625e-05 secs. [Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus 0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 3.11it/s] 100%|██████████| 1/1 [00:00<00:00, 3.11it/s] Finish generation in 1.8207151889801025 secs.
Prediction
jyoung105/sdxl-turbo:93c488b9IDcw1r02pcsnrme0ck9y2axzqb6cStatusSucceededSourceWebHardwareL40STotal durationCreatedInput
- eta
- 0
- seed
- 1234
- steps
- 1
- width
- 1024
- height
- 1024
- prompt
- A man with hoodie on, illustration
- clip_skip
- 0
- num_images
- 1
- guidance_scale
- 0
- use_highres_fix
{ "eta": 0, "seed": 1234, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0, "use_highres_fix": true }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run jyoung105/sdxl-turbo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "jyoung105/sdxl-turbo:93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7", { input: { eta: 0, seed: 1234, steps: 1, width: 1024, height: 1024, prompt: "A man with hoodie on, illustration", clip_skip: 0, num_images: 1, guidance_scale: 0, use_highres_fix: true } } ); 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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run jyoung105/sdxl-turbo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "jyoung105/sdxl-turbo:93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7", input={ "eta": 0, "seed": 1234, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0, "use_highres_fix": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run jyoung105/sdxl-turbo 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": "93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7", "input": { "eta": 0, "seed": 1234, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0, "use_highres_fix": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/jyoung105/sdxl-turbo@sha256:93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7 \ -i 'eta=0' \ -i 'seed=1234' \ -i 'steps=1' \ -i 'width=1024' \ -i 'height=1024' \ -i 'prompt="A man with hoodie on, illustration"' \ -i 'clip_skip=0' \ -i 'num_images=1' \ -i 'guidance_scale=0' \ -i 'use_highres_fix=true'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/jyoung105/sdxl-turbo@sha256:93c488b9fbd6bea622d354c8dcce2724c5f67adb92ccf909038042a21c5238a7
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "eta": 0, "seed": 1234, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0, "use_highres_fix": true } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-11-21T16:19:17.915457Z", "created_at": "2024-11-21T16:18:43.533000Z", "data_removed": false, "error": null, "id": "cw1r02pcsnrme0ck9y2axzqb6c", "input": { "eta": 0, "seed": 1234, "steps": 1, "width": 1024, "height": 1024, "prompt": "A man with hoodie on, illustration", "clip_skip": 0, "num_images": 1, "guidance_scale": 0, "use_highres_fix": true }, "logs": "[Debug] DEVICE: cuda\n[Debug] DTYPE: torch.float16\nSetup completed in 0.00 seconds.\n[~] Generating images...\n[Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus\n[Debug] Seed: 1234\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 6.67it/s]\n100%|██████████| 1/1 [00:00<00:00, 6.66it/s]\nImage generation completed in 0.92 seconds.\n[~] GPU: 0\n[~] Memory: 19.0 GiB / 44.99 GiB\n[~] Generation time: 0.92 seconds", "metrics": { "predict_time": 1.291939469, "total_time": 34.382457 }, "output": [ "https://replicate.delivery/xezq/3Hs18IhWGlJoF1lMCqrilyMGLLcd0F7RZd7Qe0HOE3kCfQzTA/out_0.png" ], "started_at": "2024-11-21T16:19:16.623517Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-ffoohe3xly4dxl3pyrcabka3ebeyo5op2ykate233rbtq2gzjqeq", "get": "https://api.replicate.com/v1/predictions/cw1r02pcsnrme0ck9y2axzqb6c", "cancel": "https://api.replicate.com/v1/predictions/cw1r02pcsnrme0ck9y2axzqb6c/cancel" }, "version": "f15ca635c7ff44f550c112a247966be926ee8699035a738bb8bde9bdac5aec70" }
Generated in[Debug] DEVICE: cuda [Debug] DTYPE: torch.float16 Setup completed in 0.00 seconds. [~] Generating images... [Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus [Debug] Seed: 1234 0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 6.67it/s] 100%|██████████| 1/1 [00:00<00:00, 6.66it/s] Image generation completed in 0.92 seconds. [~] GPU: 0 [~] Memory: 19.0 GiB / 44.99 GiB [~] Generation time: 0.92 seconds
Want to make some of these yourself?
Run this model