{"id":13871632,"url":"https://github.com/black-forest-labs/flux","last_synced_at":"2025-05-13T18:04:41.180Z","repository":{"id":251223792,"uuid":"836642963","full_name":"black-forest-labs/flux","owner":"black-forest-labs","description":"Official inference repo for FLUX.1 models","archived":false,"fork":false,"pushed_at":"2025-02-06T21:48:49.000Z","size":19077,"stargazers_count":21574,"open_issues_count":166,"forks_count":1529,"subscribers_count":181,"default_branch":"main","last_synced_at":"2025-05-06T17:13:41.031Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/black-forest-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-01T09:04:19.000Z","updated_at":"2025-05-06T16:28:47.000Z","dependencies_parsed_at":"2024-08-05T10:22:44.512Z","dependency_job_id":"e8d1e5ef-addd-4ff9-9b29-741de5e2f4d8","html_url":"https://github.com/black-forest-labs/flux","commit_stats":null,"previous_names":["black-forest-labs/flux"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/black-forest-labs%2Fflux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/black-forest-labs%2Fflux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/black-forest-labs%2Fflux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/black-forest-labs%2Fflux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/black-forest-labs","download_url":"https://codeload.github.com/black-forest-labs/flux/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000824,"owners_count":21997441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T22:01:02.266Z","updated_at":"2025-05-13T18:04:41.141Z","avatar_url":"https://github.com/black-forest-labs.png","language":"Python","funding_links":[],"categories":["🎨 マルチモーダルと生成 AI","Python","AI","\u003cspan id=\"image\"\u003eImage\u003c/span\u003e","💬 大语言模型（LLM）","精选文章","其他_机器视觉","Stale","Image","Repos","Models","About Flux AI","Multimodal"],"sub_categories":["画像生成","\u003cspan id=\"tool\"\u003eLLM (LLM \u0026 Tool)\u003c/span\u003e","多模态大模型","AI图像创作","网络服务_其他","Python Tools","Models","Image Generation Models","6. Text2Image"],"readme":"# FLUX\nby Black Forest Labs: https://blackforestlabs.ai. Documentation for our API can be found here: [docs.bfl.ml](https://docs.bfl.ml/).\n\n![grid](assets/grid.jpg)\n\nThis repo contains minimal inference code to run image generation \u0026 editing with our Flux models.\n\n## Local installation\n\n```bash\ncd $HOME \u0026\u0026 git clone https://github.com/black-forest-labs/flux\ncd $HOME/flux\npython3.10 -m venv .venv\nsource .venv/bin/activate\npip install -e \".[all]\"\n```\n\n### Local installation with TensorRT support\n\nIf you would like to install the repository with [TensorRT](https://github.com/NVIDIA/TensorRT) support, you currently need to install a PyTorch image from NVIDIA instead. First install [enroot](https://github.com/NVIDIA/enroot), next follow the steps below:\n\n```bash\ncd $HOME \u0026\u0026 git clone https://github.com/black-forest-labs/flux\nenroot import 'docker://$oauthtoken@nvcr.io#nvidia/pytorch:25.01-py3'\nenroot create -n pti2501 nvidia+pytorch+25.01-py3.sqsh\nenroot start --rw -m ${PWD}/flux:/workspace/flux -r pti2501\ncd flux\npip install -e \".[tensorrt]\" --extra-index-url https://pypi.nvidia.com\n```\n\n### Models\n\nWe are offering an extensive suite of models. For more information about the invidual models, please refer to the link under **Usage**.\n\n| Name                        | Usage                                                      | HuggingFace repo                                               | License                                                               |\n| --------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------- |\n| `FLUX.1 [schnell]`          | [Text to Image](docs/text-to-image.md)                     | https://huggingface.co/black-forest-labs/FLUX.1-schnell        | [apache-2.0](model_licenses/LICENSE-FLUX1-schnell)                    |\n| `FLUX.1 [dev]`              | [Text to Image](docs/text-to-image.md)                     | https://huggingface.co/black-forest-labs/FLUX.1-dev            | [FLUX.1-dev Non-Commercial License](model_licenses/LICENSE-FLUX1-dev) |\n| `FLUX.1 Fill [dev]`         | [In/Out-painting](docs/fill.md)                            | https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev       | [FLUX.1-dev Non-Commercial License](model_licenses/LICENSE-FLUX1-dev) |\n| `FLUX.1 Canny [dev]`        | [Structural Conditioning](docs/structural-conditioning.md) | https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev      | [FLUX.1-dev Non-Commercial License](model_licenses/LICENSE-FLUX1-dev) |\n| `FLUX.1 Depth [dev]`        | [Structural Conditioning](docs/structural-conditioning.md) | https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev      | [FLUX.1-dev Non-Commercial License](model_licenses/LICENSE-FLUX1-dev) |\n| `FLUX.1 Canny [dev] LoRA`   | [Structural Conditioning](docs/structural-conditioning.md) | https://huggingface.co/black-forest-labs/FLUX.1-Canny-dev-lora | [FLUX.1-dev Non-Commercial License](model_licenses/LICENSE-FLUX1-dev) |\n| `FLUX.1 Depth [dev] LoRA`   | [Structural Conditioning](docs/structural-conditioning.md) | https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev-lora | [FLUX.1-dev Non-Commercial License](model_licenses/LICENSE-FLUX1-dev) |\n| `FLUX.1 Redux [dev]`        | [Image variation](docs/image-variation.md)                 | https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev      | [FLUX.1-dev Non-Commercial License](model_licenses/LICENSE-FLUX1-dev) |\n| `FLUX.1 [pro]`              | [Text to Image](docs/text-to-image.md)                     | [Available in our API.](https://docs.bfl.ml/)                  |                                                                       |\n| `FLUX1.1 [pro]`             | [Text to Image](docs/text-to-image.md)                     | [Available in our API.](https://docs.bfl.ml/)                  |                                                                       |\n| `FLUX1.1 [pro] Ultra/raw`   | [Text to Image](docs/text-to-image.md)                     | [Available in our API.](https://docs.bfl.ml/)                  |                                                                       |\n| `FLUX.1 Fill [pro]`         | [In/Out-painting](docs/fill.md)                            | [Available in our API.](https://docs.bfl.ml/)                  |                                                                       |\n| `FLUX.1 Canny [pro]`        | [Structural Conditioning](docs/structural-conditioning.md) | [Available in our API.](https://docs.bfl.ml/)                  |                                                                       |\n| `FLUX.1 Depth [pro]`        | [Structural Conditioning](docs/structural-conditioning.md) | [Available in our API.](https://docs.bfl.ml/)                  |                                                                       |\n| `FLUX1.1 Redux [pro]`       | [Image variation](docs/image-variation.md)                 | [Available in our API.](https://docs.bfl.ml/)                  |                                                                       |\n| `FLUX1.1 Redux [pro] Ultra` | [Image variation](docs/image-variation.md)                 | [Available in our API.](https://docs.bfl.ml/)                  |                                                                       |\n\nThe weights of the autoencoder are also released under [apache-2.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md) and can be found in the HuggingFace repos above.\n\n## API usage\n\nOur API offers access to our models. It is documented here:\n[docs.bfl.ml](https://docs.bfl.ml/).\n\nIn this repository we also offer an easy python interface. To use this, you\nfirst need to register with the API on [api.bfl.ml](https://api.bfl.ml/), and\ncreate a new API key.\n\nTo use the API key either run `export BFL_API_KEY=\u003cyour_key_here\u003e` or provide\nit via the `api_key=\u003cyour_key_here\u003e` parameter. It is also expected that you\nhave installed the package as above.\n\nUsage from python:\n\n```python\nfrom flux.api import ImageRequest\n\n# this will create an api request directly but not block until the generation is finished\nrequest = ImageRequest(\"A beautiful beach\", name=\"flux.1.1-pro\")\n# or: request = ImageRequest(\"A beautiful beach\", name=\"flux.1.1-pro\", api_key=\"your_key_here\")\n\n# any of the following will block until the generation is finished\nrequest.url\n# -\u003e https:\u003c...\u003e/sample.jpg\nrequest.bytes\n# -\u003e b\"...\" bytes for the generated image\nrequest.save(\"outputs/api.jpg\")\n# saves the sample to local storage\nrequest.image\n# -\u003e a PIL image\n```\n\nUsage from the command line:\n\n```bash\n$ python -m flux.api --prompt=\"A beautiful beach\" url\nhttps:\u003c...\u003e/sample.jpg\n\n# generate and save the result\n$ python -m flux.api --prompt=\"A beautiful beach\" save outputs/api\n\n# open the image directly\n$ python -m flux.api --prompt=\"A beautiful beach\" image show\n```\n\n## Citation\n\nIf you find the provided code or models useful for your research, consider citing them as:\n\n```bib\n@misc{flux2024,\n    author={Black Forest Labs},\n    title={FLUX},\n    year={2024},\n    howpublished={\\url{https://github.com/black-forest-labs/flux}},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblack-forest-labs%2Fflux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblack-forest-labs%2Fflux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblack-forest-labs%2Fflux/lists"}