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.
hvision-nku /storydiffusion:d0faed1e
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 hvision-nku/storydiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"hvision-nku/storydiffusion:d0faed1e8b5779d4d060c5bb0afac8e52c704700f7bee9e4341b0684a8feda04",
{
input: {
num_ids: 3,
sd_model: "Unstable",
num_steps: 50,
style_name: "Japanese Anime",
comic_style: "Classic Comic Style",
image_width: 768,
image_height: 768,
sa32_setting: 0.7,
sa64_setting: 0.7,
output_format: "webp",
guidance_scale: 5,
output_quality: 80,
negative_prompt: "bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs",
comic_description: "at home, read new paper #at home, The newspaper says there is a treasure house in the forest.\non the road, near the forest\n[NC] The car on the road, near the forest #He drives to the forest in search of treasure.\n[NC]A tiger appeared in the forest, at night \nvery frightened, open mouth, in the forest, at night\nrunning very fast, in the forest, at night\n[NC] A house in the forest, at night #Suddenly, he discovers the treasure house!\nin the house filled with treasure, laughing, at night #He is overjoyed inside the house.",
style_strength_ratio: 20,
character_description: "a man, wearing black suit"
}
}
);
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 hvision-nku/storydiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"hvision-nku/storydiffusion:d0faed1e8b5779d4d060c5bb0afac8e52c704700f7bee9e4341b0684a8feda04",
input={
"num_ids": 3,
"sd_model": "Unstable",
"num_steps": 50,
"style_name": "Japanese Anime",
"comic_style": "Classic Comic Style",
"image_width": 768,
"image_height": 768,
"sa32_setting": 0.7,
"sa64_setting": 0.7,
"output_format": "webp",
"guidance_scale": 5,
"output_quality": 80,
"negative_prompt": "bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs",
"comic_description": "at home, read new paper #at home, The newspaper says there is a treasure house in the forest.\non the road, near the forest\n[NC] The car on the road, near the forest #He drives to the forest in search of treasure.\n[NC]A tiger appeared in the forest, at night \nvery frightened, open mouth, in the forest, at night\nrunning very fast, in the forest, at night\n[NC] A house in the forest, at night #Suddenly, he discovers the treasure house!\nin the house filled with treasure, laughing, at night #He is overjoyed inside the house.",
"style_strength_ratio": 20,
"character_description": "a man, wearing black suit"
}
)
print(output)
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 hvision-nku/storydiffusion 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": "d0faed1e8b5779d4d060c5bb0afac8e52c704700f7bee9e4341b0684a8feda04",
"input": {
"num_ids": 3,
"sd_model": "Unstable",
"num_steps": 50,
"style_name": "Japanese Anime",
"comic_style": "Classic Comic Style",
"image_width": 768,
"image_height": 768,
"sa32_setting": 0.7,
"sa64_setting": 0.7,
"output_format": "webp",
"guidance_scale": 5,
"output_quality": 80,
"negative_prompt": "bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs",
"comic_description": "at home, read new paper #at home, The newspaper says there is a treasure house in the forest.\\non the road, near the forest\\n[NC] The car on the road, near the forest #He drives to the forest in search of treasure.\\n[NC]A tiger appeared in the forest, at night \\nvery frightened, open mouth, in the forest, at night\\nrunning very fast, in the forest, at night\\n[NC] A house in the forest, at night #Suddenly, he discovers the treasure house!\\nin the house filled with treasure, laughing, at night #He is overjoyed inside the house.",
"style_strength_ratio": 20,
"character_description": "a man, wearing black suit"
}
}' \
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.