To run FLUX.1 Krea [dev] locally using the diffusers library, you can follow these steps:
- Installation of dependencies: Ensure that Python 3.8+ and PyTorch are installed on your system; it is recommended that you use a version of PyTorch that supports CUDA to enable GPU acceleration, which can be done with the command
pip install torch diffusers
Installation. - Loading Models: Load a model from Hugging Face using the provided code. The sample code includes initializing the pipeline, setting parameters (e.g., resolution, bootstrap scale), and generating images based on textual prompts.
- Environmental requirements: It is recommended to use a GPU with at least 12GB of video memory, but if you don't have enough memory, you can enable the
enable_model_cpu_offload()
, but the speed of reasoning will be reduced. - parameterization: The recommended setting for resolution is 1024 x 1024, and the bootstrap scale (
guidance_scale
) The default value is 4.5 and ranges from 0-10.
With the above steps, users can generate high-quality images with FLUX.1 Krea [dev] in the local environment.
This answer comes from the articleFLUX.1 Krea: Free Open Source Tool for Generating Highly Realistic ImagesThe