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:3ebec828
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:3ebec828a3836d15b7e22ddc36d8f66f4c192af72cae63cd9b75e28df4643f35",
{
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:3ebec828a3836d15b7e22ddc36d8f66f4c192af72cae63cd9b75e28df4643f35",
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": "3ebec828a3836d15b7e22ddc36d8f66f4c192af72cae63cd9b75e28df4643f35",
"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.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
No output yet! Press "Submit" to start a prediction.