FLUX.1 Krea [dev] is an open source image generation tool developed by Black Forest Labs in collaboration with Krea AI and hosted on the Hugging Face platform. It is based on a rectified flow of 12 billion parameters transformer A model that generates highly realistic images from textual descriptions. The model focuses on improving image aesthetics, solving the common "AI Generation Sense" problem, and generating natural, detailed images for artists, developers, and researchers. The model is open-weighted, supports non-commercial use, and provides Comfy UI and diffusers library integration for local deployment and customization.
Function List
- Text to Image: Input text descriptions to generate high-resolution, realistic images.
- Aesthetic Optimization: Focus on generating natural, detailed photographic style images, avoiding the "AI feel".
- Open source weights: provide open model weights to support customized development for research and non-commercial use.
- Efficient inference: optimized by guided distillation technology, fast inference speed and low resource consumption.
- Multiple platform support: Compatible with Comfy UI and diffusers libraries for local or cloud deployment.
- Security Filtering: Built-in filtering mechanism to reduce the risk of generating inappropriate content.
Using Help
Installation and use
FLUX.1 Krea [dev] is supported for use in a variety of ways, including local deployment and online experiences. Below is a detailed installation and operation procedure.
1. Local deployment (using diffusers library)
FLUX.1 Krea [dev] can be run via Python's diffusers library. Here are the installation steps:
- Installation of dependencies: Ensure that Python 3.8+ and PyTorch are installed on your system; GPU acceleration is recommended, and CUDA-supported PyTorch should be installed.
pip install torch diffusers
- Loading Models: Use the following code to load the FLUX.1 Krea [dev] model and generate an image:
import torch from diffusers import FluxPipeline # 初始化管道 pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-Krea-dev", torch_dtype=torch.bfloat16) pipe.enable_model_cpu_offload() # 若 GPU 显存不足,启用 CPU 卸载 # 输入文本提示 prompt = "一只猫举着写有‘你好世界’的标牌" image = pipe( prompt, height=1024, width=1024, guidance_scale=4.5, ).images[0] # 保存生成图像 image.save("flux-krea-dev.png")
Parameter Description:
height
cap (a poem)width
: Set the output image resolution, 1024 x 1024 is recommended.guidance_scale
: Controls the degree of adherence to the text prompts, ranging from 0 to 10, with a recommendation of 4.5.torch_dtype=torch.bfloat16
: Use half-precision floating-point numbers to reduce graphics memory usage.
- operating environment: It is recommended to use a GPU with at least 12GB of video memory, but if that is not enough, you can enable the
enable_model_cpu_offload()
, but the speed of reasoning will be reduced.
2. Using Comfy UI
Comfy UI is a node-based workflow tool for running FLUX.1 Krea [dev] locally.
- Download model weights: Downloaded from Hugging Face repository https://huggingface.co/black-forest-labs/FLUX.1-Krea-dev
*.safetensors
Documentation. - Configuring the Comfy UI::
- Install Comfy UI (refer to the official GitHub repository https://github.com/comfyanonymous/ComfyUI).
- file the downloaded
*.safetensors
file into the Comfy UI's model directory (usually themodels/checkpoints
). - In the Comfy UI interface, load the FLUX.1 Krea [dev] node and set the text prompts and parameters.
- Generating images: Set parameters such as cue word, resolution, etc. through node connections and click Run to generate the image.
3. Online experience
No local deployment is required and can be experienced through Hugging Face Space or partner platforms (e.g. Replicate, FAL):
- Visit https://huggingface.co/spaces/black-forest-labs/FLUX.1-Krea-Dev.
- Enter a text prompt, adjust the resolution or style, and click Generate.
- Download the generated image.
Main Functions
Text to Image
The core function of FLUX.1 Krea [dev] is to generate images from text. The following are the main points of operation:
- Preparation of cues: Prompts need to be clear and specific, e.g., "A girl in a blue sweater walks in a fall forest with the sun shining on the leaves." Avoid vague descriptions, such as "beautiful pictures."
- Adjustment parameters::
- Resolution: 1024 x 1024 recommended for most scenes.
- Guidance_scale: control the fit of the image to the cue, 4.5 is the default value, increase to improve the fit, but too high may lead to image distortion.
- Generate results: Once generated, it can be saved in PNG format, suitable for further editing or sharing.
Aesthetic Optimization
FLUX.1 Krea [dev] specializes in generating photographic style images with the following features:
- Natural Details: Generate images that avoid overexposed highlights or distorted colors, rendering a sense of realism.
- Style Control: You can specify a style by using a cue word, such as "Cinematic" or "Vintage Photography". For example, the cue "City streets at night, neon lights, cinematic style" generates images with a cinematic feel.
- Avoiding the "AI sense": Models are aesthetically trained to reduce the stereotypical traces of common AI images, such as unnatural textures or lighting.
Security Controls
To prevent the generation of inappropriate content, the model has a built-in filtering mechanism:
- Pre-training filtering: NSFW and illegal content has been removed from the training data.
- Post-training optimization: Reduce the risk of generating prohibited content through fine-tuning.
- Recommendations for use: Users should avoid entering prompt words that may trigger inappropriate content, such as violent or pornographic descriptions.
caveat
- non-commercial use: Images generated are restricted to personal, research or non-profit use under the FluxDev Non-Commercial License. Commercial use requires a license by contacting Black Forest Labs. [](https://huggingface.co/black-forest-labs/FLUX.1-Krea-dev)
- hardware requirement: High-performance GPUs are required for local operation, NVIDIA A100 or RTX 3090 are recommended.
- cue-word technique: English prompts are more effective, and it is recommended to use detailed descriptions combined with stylistic keywords.
application scenario
- art
Artists can generate inspirational sketches or final artwork by entering text descriptions. For example, enter "future city, sky-hovering building, cyberpunk style" to generate a conceptual design, saving time in pre-composition. - academic research
Researchers can use open weights for model fine-tuning or analysis to explore the performance boundaries of the generated model. For example, testing the effect of different cue words on image quality. - Education and training
Teachers can use FLUX.1 Krea [dev] to demonstrate the principles of AI image generation and help students understand deep learning applications. Students can experience generating images and learn about cue word design through the online platform. - content creation
Content creators can generate blog graphics or social media material. For example, type in "tropical beach, sunset, coconut tree" to generate a high-quality background image.
QA
- Is FLUX.1 Krea [dev] free?
Yes, model weights are free and open, hosted at Hugging Face for non-commercial use. Commercial use requires a license. - How to improve the quality of generated images?
Use detailed cues to specify styles and details, such as "forest at night, moonlight on the lake, realistic photography". Adjustmentsguidance_scale
to between 4.5-6 to balance quality and fit. - Which languages are supported for cue words?
Mainly supports English prompts, Chinese prompts may be slightly less effective. It is recommended to translate them into English and input them. - How long does it take to generate an image?
It takes about 10-20 seconds to generate a 1024×1024 image using a GPU (e.g. RTX 3090), and may take 1-2 minutes in CPU offload mode.