typetext
{
"aspect_ratio": "1:1",
"cfg": 4.49,
"negative_prompt": "fingers, hands, penis, vagina, sex, boobs, pussy, breasts, nipples, laying",
"output_format": "webp",
"output_quality": 100,
"prompt": "Art piece of a woman taking selfie that combines the playful and whimsical nature of MS Paint art brut amateur art with the dynamic energy and bold shapes of Constructivism, infused with elements of glitch art, pixel art, and minimalism, and featuring thick borders, floating glands, secretors, Op Art patterns, and retro pulp art aesthetics. The background should be a solid, bright color, like a vivid blue or red, providing a lively yet uncluttered canvas for the main elements.\n\nIn the foreground, incorporate crude, childlike drawings with simple, uneven lines and bold, primary colors. These drawings should depict basic geometric shapes such as triangles, circles, and rectangles, rendered in an endearingly imperfect manner, as if drawn by a child using MS Paint. Each shape should have a thick, black border, adding a bold, graphic quality to the composition and enhancing the Constructivist influence."
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1IW**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run stability-ai/stable-diffusion-3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "1:1",
cfg: 4.49,
negative_prompt: "fingers, hands, penis, vagina, sex, boobs, pussy, breasts, nipples, laying",
output_format: "webp",
output_quality: 100,
prompt: "Art piece of a woman taking selfie that combines the playful and whimsical nature of MS Paint art brut amateur art with the dynamic energy and bold shapes of Constructivism, infused with elements of glitch art, pixel art, and minimalism, and featuring thick borders, floating glands, secretors, Op Art patterns, and retro pulp art aesthetics. The background should be a solid, bright color, like a vivid blue or red, providing a lively yet uncluttered canvas for the main elements.\n\nIn the foreground, incorporate crude, childlike drawings with simple, uneven lines and bold, primary colors. These drawings should depict basic geometric shapes such as triangles, circles, and rectangles, rendered in an endearingly imperfect manner, as if drawn by a child using MS Paint. Each shape should have a thick, black border, adding a bold, graphic quality to the composition and enhancing the Constructivist influence."
};
const output = await replicate.run("stability-ai/stable-diffusion-3", { input });
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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=r8_1IW**********************************
This is your API token. Keep it to yourself.
import replicate
Run stability-ai/stable-diffusion-3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"stability-ai/stable-diffusion-3",
input={
"aspect_ratio": "1:1",
"cfg": 4.49,
"negative_prompt": "fingers, hands, penis, vagina, sex, boobs, pussy, breasts, nipples, laying",
"output_format": "webp",
"output_quality": 100,
"prompt": "Art piece of a woman taking selfie that combines the playful and whimsical nature of MS Paint art brut amateur art with the dynamic energy and bold shapes of Constructivism, infused with elements of glitch art, pixel art, and minimalism, and featuring thick borders, floating glands, secretors, Op Art patterns, and retro pulp art aesthetics. The background should be a solid, bright color, like a vivid blue or red, providing a lively yet uncluttered canvas for the main elements.\n\nIn the foreground, incorporate crude, childlike drawings with simple, uneven lines and bold, primary colors. These drawings should depict basic geometric shapes such as triangles, circles, and rectangles, rendered in an endearingly imperfect manner, as if drawn by a child using MS Paint. Each shape should have a thick, black border, adding a bold, graphic quality to the composition and enhancing the Constructivist influence."
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1IW**********************************
This is your API token. Keep it to yourself.
Run stability-ai/stable-diffusion-3 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 $'{
"input": {
"aspect_ratio": "1:1",
"cfg": 4.49,
"negative_prompt": "fingers, hands, penis, vagina, sex, boobs, pussy, breasts, nipples, laying",
"output_format": "webp",
"output_quality": 100,
"prompt": "Art piece of a woman taking selfie that combines the playful and whimsical nature of MS Paint art brut amateur art with the dynamic energy and bold shapes of Constructivism, infused with elements of glitch art, pixel art, and minimalism, and featuring thick borders, floating glands, secretors, Op Art patterns, and retro pulp art aesthetics. The background should be a solid, bright color, like a vivid blue or red, providing a lively yet uncluttered canvas for the main elements.\\n\\nIn the foreground, incorporate crude, childlike drawings with simple, uneven lines and bold, primary colors. These drawings should depict basic geometric shapes such as triangles, circles, and rectangles, rendered in an endearingly imperfect manner, as if drawn by a child using MS Paint. Each shape should have a thick, black border, adding a bold, graphic quality to the composition and enhancing the Constructivist influence."
}
}' \
https://api.replicate.com/v1/models/stability-ai/stable-diffusion-3/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "dfn9ag3e45rh60cg4b2ty4bybw",
"model": "stability-ai/stable-diffusion-3",
"version": "hidden",
"input": {
"aspect_ratio": "1:1",
"cfg": 4.49,
"negative_prompt": "fingers, hands, penis, vagina, sex, boobs, pussy, breasts, nipples, laying",
"output_format": "webp",
"output_quality": 100,
"prompt": "Art piece of a woman taking selfie that combines the playful and whimsical nature of MS Paint art brut amateur art with the dynamic energy and bold shapes of Constructivism, infused with elements of glitch art, pixel art, and minimalism, and featuring thick borders, floating glands, secretors, Op Art patterns, and retro pulp art aesthetics. The background should be a solid, bright color, like a vivid blue or red, providing a lively yet uncluttered canvas for the main elements.\n\nIn the foreground, incorporate crude, childlike drawings with simple, uneven lines and bold, primary colors. These drawings should depict basic geometric shapes such as triangles, circles, and rectangles, rendered in an endearingly imperfect manner, as if drawn by a child using MS Paint. Each shape should have a thick, black border, adding a bold, graphic quality to the composition and enhancing the Constructivist influence."
},
"logs": "Random seed set to: 547312132\nRunning workflow\ngot prompt\nExecuting node 6, title: CLIP Text Encode (Prompt), class type: CLIPTextEncode\nExecuting node 71, title: CLIP Text Encode (Negative Prompt), class type: CLIPTextEncode\nExecuting node 67, title: ConditioningZeroOut, class type: ConditioningZeroOut\nExecuting node 68, title: ConditioningSetTimestepRange, class type: ConditioningSetTimestepRange\nExecuting node 70, title: ConditioningSetTimestepRange, class type: ConditioningSetTimestepRange\nExecuting node 69, title: Conditioning (Combine), class type: ConditioningCombine\nExecuting node 271, title: KSampler, class type: KSampler\n 0%| | 0/28 [00:00<?, ?it/s]\n 7%|▋ | 2/28 [00:00<00:02, 10.25it/s]\n 14%|█▍ | 4/28 [00:00<00:02, 10.12it/s]\n 21%|██▏ | 6/28 [00:00<00:02, 10.08it/s]\n 29%|██▊ | 8/28 [00:00<00:01, 10.05it/s]\n 36%|███▌ | 10/28 [00:00<00:01, 10.04it/s]\n 43%|████▎ | 12/28 [00:01<00:01, 10.05it/s]\n 50%|█████ | 14/28 [00:01<00:01, 10.04it/s]\n 57%|█████▋ | 16/28 [00:01<00:01, 10.04it/s]\n 64%|██████▍ | 18/28 [00:01<00:00, 10.03it/s]\n 71%|███████▏ | 20/28 [00:01<00:00, 10.03it/s]\n 79%|███████▊ | 22/28 [00:02<00:00, 10.02it/s]\n 86%|████████▌ | 24/28 [00:02<00:00, 10.03it/s]\n 93%|█████████▎| 26/28 [00:02<00:00, 10.03it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.01it/s]\n100%|██████████| 28/28 [00:02<00:00, 10.04it/s]\nExecuting node 231, title: VAE Decode, class type: VAEDecode\nExecuting node 273, title: Save Image, class type: SaveImage\nPrompt executed in 4.33 seconds\noutputs: {'273': {'images': [{'filename': 'R8_SD3_00001_.png', 'subfolder': '', 'type': 'output'}]}}\n====================================\nR8_SD3_00001_.png",
"output": [
"https://replicate.delivery/pbxt/X196G84GeM0ZBCL2xFdQXCkEOxe8EbWuNJVTYl1GkNWv8PflA/R8_SD3_00001_.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-06-16T20:38:02.529Z",
"started_at": "2024-06-16T20:38:02.548657Z",
"completed_at": "2024-06-16T20:38:07.685605Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/dfn9ag3e45rh60cg4b2ty4bybw/cancel",
"get": "https://api.replicate.com/v1/predictions/dfn9ag3e45rh60cg4b2ty4bybw",
"web": "https://replicate.com/p/dfn9ag3e45rh60cg4b2ty4bybw"
},
"metrics": {
"predict_time": 5.136947752,
"total_time": 5.156605
}
}