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.
Choose generating images from in-the-wild text, MSCOCO datasets, or ImageNet class label.
Default: "in-the-wild text"
Prompt for generating image. Valid when generation_type is set to in-the-wild text and MSCOCO datasets.
Default: ""
Choose the ImageNet label. Valid when generation_type is set to ImageNet class label.
Default: "None"
Sample with truncation.
Default: 0.86
Improved VQ-Diffusion with learnable classifier-free sampling.
Default: 1
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
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 cjwbw/vq-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/vq-diffusion:862db85880281370e440f48fb8eb413db0ba6dc0aa9e028a31e8f7919dfc196a", { input: { prompt: "", image_class: "None", guidance_scale: 1, generation_type: "in-the-wild text", truncation_rate: 0.86 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "cjwbw/vq-diffusion:862db85880281370e440f48fb8eb413db0ba6dc0aa9e028a31e8f7919dfc196a", input={ "prompt": "", "image_class": "None", "guidance_scale": 1, "generation_type": "in-the-wild text", "truncation_rate": 0.86 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "cjwbw/vq-diffusion:862db85880281370e440f48fb8eb413db0ba6dc0aa9e028a31e8f7919dfc196a", "input": { "prompt": "", "image_class": "None", "guidance_scale": 1, "generation_type": "in-the-wild text", "truncation_rate": 0.86 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
No output yet! Press "Submit" to start a prediction.