Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
nightmareai /disco-diffusion:f6222c21
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run nightmareai/disco-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"nightmareai/disco-diffusion:f6222c2135233d427b0c1c086b1b6edc1173f6f713b1d4e0fdb23a452b8938ea",
{
input: {
RN50: true,
RN101: false,
steps: 100,
width: 1280,
RN50x4: false,
ViTB16: true,
ViTB32: true,
ViTL14: false,
height: 768,
prompt: "A beautiful painting of a singular lighthouse, shining its light across a tumultuous sea of blood by greg rutkowski and thomas kinkade, Trending on artstation.",
RN50x16: false,
RN50x64: false,
RN50x101: false,
tv_scale: 0,
sat_scale: 0,
skip_augs: false,
RN50_cc12m: false,
ViTL14_336: false,
init_scale: 1000,
skip_steps: 10,
range_scale: 150,
cutn_batches: 4,
display_rate: 20,
target_scale: 20000,
RN101_yfcc15m: false,
RN50_yffcc15m: false,
diffusion_model: "512x512_diffusion_uncond_finetune_008100",
ViTB32_laion2b_e16: false,
clip_guidance_scale: 5000,
use_secondary_model: true,
RN50_quickgelu_cc12m: false,
ViTB16_laion400m_e31: false,
ViTB16_laion400m_e32: false,
ViTB32_laion400m_e31: false,
ViTB32_laion400m_e32: false,
RN50_quickgelu_yfcc15m: false,
RN101_quickgelu_yfcc15m: false,
diffusion_sampling_mode: "ddim",
ViTB32quickgelu_laion400m_e31: false,
ViTB32quickgelu_laion400m_e32: false
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run nightmareai/disco-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"nightmareai/disco-diffusion:f6222c2135233d427b0c1c086b1b6edc1173f6f713b1d4e0fdb23a452b8938ea",
input={
"RN50": True,
"RN101": False,
"steps": 100,
"width": 1280,
"RN50x4": False,
"ViTB16": True,
"ViTB32": True,
"ViTL14": False,
"height": 768,
"prompt": "A beautiful painting of a singular lighthouse, shining its light across a tumultuous sea of blood by greg rutkowski and thomas kinkade, Trending on artstation.",
"RN50x16": False,
"RN50x64": False,
"RN50x101": False,
"tv_scale": 0,
"sat_scale": 0,
"skip_augs": False,
"RN50_cc12m": False,
"ViTL14_336": False,
"init_scale": 1000,
"skip_steps": 10,
"range_scale": 150,
"cutn_batches": 4,
"display_rate": 20,
"target_scale": 20000,
"RN101_yfcc15m": False,
"RN50_yffcc15m": False,
"diffusion_model": "512x512_diffusion_uncond_finetune_008100",
"ViTB32_laion2b_e16": False,
"clip_guidance_scale": 5000,
"use_secondary_model": True,
"RN50_quickgelu_cc12m": False,
"ViTB16_laion400m_e31": False,
"ViTB16_laion400m_e32": False,
"ViTB32_laion400m_e31": False,
"ViTB32_laion400m_e32": False,
"RN50_quickgelu_yfcc15m": False,
"RN101_quickgelu_yfcc15m": False,
"diffusion_sampling_mode": "ddim",
"ViTB32quickgelu_laion400m_e31": False,
"ViTB32quickgelu_laion400m_e32": False
}
)
# The nightmareai/disco-diffusion 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/nightmareai/disco-diffusion/api#output-schema
print(item)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run nightmareai/disco-diffusion 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": "f6222c2135233d427b0c1c086b1b6edc1173f6f713b1d4e0fdb23a452b8938ea",
"input": {
"RN50": true,
"RN101": false,
"steps": 100,
"width": 1280,
"RN50x4": false,
"ViTB16": true,
"ViTB32": true,
"ViTL14": false,
"height": 768,
"prompt": "A beautiful painting of a singular lighthouse, shining its light across a tumultuous sea of blood by greg rutkowski and thomas kinkade, Trending on artstation.",
"RN50x16": false,
"RN50x64": false,
"RN50x101": false,
"tv_scale": 0,
"sat_scale": 0,
"skip_augs": false,
"RN50_cc12m": false,
"ViTL14_336": false,
"init_scale": 1000,
"skip_steps": 10,
"range_scale": 150,
"cutn_batches": 4,
"display_rate": 20,
"target_scale": 20000,
"RN101_yfcc15m": false,
"RN50_yffcc15m": false,
"diffusion_model": "512x512_diffusion_uncond_finetune_008100",
"ViTB32_laion2b_e16": false,
"clip_guidance_scale": 5000,
"use_secondary_model": true,
"RN50_quickgelu_cc12m": false,
"ViTB16_laion400m_e31": false,
"ViTB16_laion400m_e32": false,
"ViTB32_laion400m_e31": false,
"ViTB32_laion400m_e32": false,
"RN50_quickgelu_yfcc15m": false,
"RN101_quickgelu_yfcc15m": false,
"diffusion_sampling_mode": "ddim",
"ViTB32quickgelu_laion400m_e31": false,
"ViTB32quickgelu_laion400m_e32": false
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
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/nightmareai/disco-diffusion@sha256:f6222c2135233d427b0c1c086b1b6edc1173f6f713b1d4e0fdb23a452b8938ea \
-i 'RN50=true' \
-i 'RN101=false' \
-i 'steps=100' \
-i 'width=1280' \
-i 'RN50x4=false' \
-i 'ViTB16=true' \
-i 'ViTB32=true' \
-i 'ViTL14=false' \
-i 'height=768' \
-i 'prompt="A beautiful painting of a singular lighthouse, shining its light across a tumultuous sea of blood by greg rutkowski and thomas kinkade, Trending on artstation."' \
-i 'RN50x16=false' \
-i 'RN50x64=false' \
-i 'RN50x101=false' \
-i 'tv_scale=0' \
-i 'sat_scale=0' \
-i 'skip_augs=false' \
-i 'RN50_cc12m=false' \
-i 'ViTL14_336=false' \
-i 'init_scale=1000' \
-i 'skip_steps=10' \
-i 'range_scale=150' \
-i 'cutn_batches=4' \
-i 'display_rate=20' \
-i 'target_scale=20000' \
-i 'RN101_yfcc15m=false' \
-i 'RN50_yffcc15m=false' \
-i 'diffusion_model="512x512_diffusion_uncond_finetune_008100"' \
-i 'ViTB32_laion2b_e16=false' \
-i 'clip_guidance_scale=5000' \
-i 'use_secondary_model=true' \
-i 'RN50_quickgelu_cc12m=false' \
-i 'ViTB16_laion400m_e31=false' \
-i 'ViTB16_laion400m_e32=false' \
-i 'ViTB32_laion400m_e31=false' \
-i 'ViTB32_laion400m_e32=false' \
-i 'RN50_quickgelu_yfcc15m=false' \
-i 'RN101_quickgelu_yfcc15m=false' \
-i 'diffusion_sampling_mode="ddim"' \
-i 'ViTB32quickgelu_laion400m_e31=false' \
-i 'ViTB32quickgelu_laion400m_e32=false'
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/nightmareai/disco-diffusion@sha256:f6222c2135233d427b0c1c086b1b6edc1173f6f713b1d4e0fdb23a452b8938ea
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "RN50": true, "RN101": false, "steps": 100, "width": 1280, "RN50x4": false, "ViTB16": true, "ViTB32": true, "ViTL14": false, "height": 768, "prompt": "A beautiful painting of a singular lighthouse, shining its light across a tumultuous sea of blood by greg rutkowski and thomas kinkade, Trending on artstation.", "RN50x16": false, "RN50x64": false, "RN50x101": false, "tv_scale": 0, "sat_scale": 0, "skip_augs": false, "RN50_cc12m": false, "ViTL14_336": false, "init_scale": 1000, "skip_steps": 10, "range_scale": 150, "cutn_batches": 4, "display_rate": 20, "target_scale": 20000, "RN101_yfcc15m": false, "RN50_yffcc15m": false, "diffusion_model": "512x512_diffusion_uncond_finetune_008100", "ViTB32_laion2b_e16": false, "clip_guidance_scale": 5000, "use_secondary_model": true, "RN50_quickgelu_cc12m": false, "ViTB16_laion400m_e31": false, "ViTB16_laion400m_e32": false, "ViTB32_laion400m_e31": false, "ViTB32_laion400m_e32": false, "RN50_quickgelu_yfcc15m": false, "RN101_quickgelu_yfcc15m": false, "diffusion_sampling_mode": "ddim", "ViTB32quickgelu_laion400m_e31": false, "ViTB32quickgelu_laion400m_e32": false } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.63. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
No output yet! Press "Submit" to start a prediction.