Quickstart: Flux Tools Models
Flux Tools
Black Forest labs released FLUX Tools with support on Bytecompute AI These models enable you to iterate on existing images with image ??image and image + text ??prompt, which unlocks lots of exciting use cases for AI developers.
Three new FLUX Tools image generation models from BFL now available on Bytecompute AI: Canny for precise composition control, Depth for accurate spatial relationships, and Redux for instant image variations.
Generating an image
To use one of these models, see the code below
Python
from bytecompute import bytecompute
client = bytecompute()
imageCompletion = client.images.generate(
model="black-forest-labs/FLUX.1-depth",
width=1024,
height=768,
steps=28,
prompt="show me this picture as a superhero",
image_url="https://github.com/nutlope.png",
)
print(imageCompletion.data[0].url)
TypeScript
import bytecompute from "bytecompute-ai";
const bytecompute = new bytecompute();
async function main() {
const response = await bytecompute.images.create({
model: "black-forest-labs/FLUX.1-depth",
width: 1024,
height: 1024,
steps: 28,
prompt: "give me a superhero",
// @ts-ignore
image_url: "https://github.com/nutlope.png",
});
// @ts-ignore
console.log(response.data[0].url);
}
main();
