Flux Models Guide ⚡
Overview
This guide covers the Flux family of models, which are optimized for fast and efficient image generation. We'll explore the different variants and their specific use cases.
Available Models
- Flux Dev - Standard version with balanced speed and quality
- Flux Schnell - Ultra-fast image generation
- Flux Dev LoRA - Standard version with LoRA support
- Flux Schnell LoRA - Fast version with LoRA support
Basic Usage
Here's a simple example of how to use a Flux model:
from flymyai import client
# Initialize the client
fma_client = client(apikey="your-api-key")
# Set the model
model = "flymyai/flux-dev"
# Prepare the input data
payload = {
"prompt": "A magical forest with glowing mushrooms and fairies",
"height": 512,
"width": 512,
"num_inference_steps": 30,
"guidance_scale": 7.5,
"seed": 42
}
# Make the prediction
response = fma_client.predict(
model=model,
payload=payload
)
# Get the generated image URL
image_url = response.output_data["image_url"]
Model Variants
Flux Dev
The standard version of Flux, offering a good balance between speed and quality.
Flux Schnell
An optimized version for ultra-fast image generation, perfect for real-time applications.
Flux Dev LoRA
The standard version with LoRA support, allowing for custom model fine-tuning.
Flux Schnell LoRA
The fast version with LoRA support, combining speed with customization.
Parameters
prompt
: The text description of the image you want to generateheight
: Image height in pixelswidth
: Image width in pixelsnum_inference_steps
: Number of denoising stepsguidance_scale
: How closely to follow the promptseed
: Random seed for reproducibilitylora_url
: URL of the LoRA model to use (for LoRA variants)
Best Practices
- Choose the right model variant for your needs
- Use appropriate image dimensions
- Experiment with different parameters
- Save your seeds for reproducible results
- Use LoRA models for specific styles or subjects