CoolFace
Modelpublic

Runware/FLUX.1-Redux-dev

sourceHugging Faceotherupdated 2y agoView on Hugging Face
2likes548downloads
README.md92 linesDownload Raw Back to root
1---2language:3- en4license: other5license_name: flux-1-dev-non-commercial-license6license_link: LICENSE.md7extra_gated_prompt: By clicking "Agree", you agree to the [FluxDev Non-Commercial License Agreement](https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/blob/main/LICENSE.md)8  and acknowledge the [Acceptable Use Policy](https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/blob/main/POLICY.md).9tags:10- image-generation11- flux12- diffusion-single-file13---14 15![image/png](https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev/resolve/main/redux.png)16 17FLUX.1 Redux [dev] is an adapter for all FLUX.1 base models for image variation generation. 18Given an input image, FLUX.1 Redux can reproduce the image with slight variation, allowing to refine a given image.19It naturally integrates into more complex workflows unlocking image restyling. 20Restyling via text is also available through our API by providing an image plus a language prompt. 21For more information, please read our [blog post](https://blackforestlabs.ai/flux-1-tools/). 22 23 24 25# Usage26We provide a reference implementation of `FLUX.1 Redux [dev]`, as well as sampling code, in a dedicated [github repository](https://github.com/black-forest-labs/flux).27 28## API Endpoints29`FLUX.1 Redux [pro]` is available in our API [bfl.ml](https://docs.bfl.ml/). In addition to the `[dev]` adapter, the API endpoint allows users to modify an image given a textual description.30The feature is supported in our latest model FLUX1.1 [pro] Ultra, allowing for combining input images and text prompts to create high-quality 4-megapixel outputs with flexible aspect ratios.31 32 33![image/png](https://cdn-uploads.huggingface.co/production/uploads/64510d6304397681bcf9725b/P123igomKjAkmitOzot8T.png)34 35## Diffusers36 37To use `FLUX.1 Redux [pro]` with the 🧨 diffusers python library, first install or upgrade diffusers38 39```shell40pip install -U diffusers41```42 43Then you can use `FluxPriorReduxPipeline` along with `FluxPipeline` to generate images from images.44 45```python46import torch47from diffusers import FluxPriorReduxPipeline, FluxPipeline48from diffusers.utils import load_image49 50pipe_prior_redux = FluxPriorReduxPipeline.from_pretrained("black-forest-labs/FLUX.1-Redux-dev", torch_dtype=torch.bfloat16).to("cuda")51pipe = FluxPipeline.from_pretrained(52    "black-forest-labs/FLUX.1-dev" , 53    text_encoder=None,54    text_encoder_2=None,55    torch_dtype=torch.bfloat1656).to("cuda")57 58image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/robot.png")59pipe_prior_output = pipe_prior_redux(image)60images = pipe(61    guidance_scale=2.5,62    num_inference_steps=50,63    generator=torch.Generator("cpu").manual_seed(0),64    **pipe_prior_output,65).images66images[0].save("flux-dev-redux.png")67```68 69To learn more check out the [diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) documentation70 71---72 73# Limitations74- This model is not intended or able to provide factual information.75- As a statistical model this checkpoint might amplify existing societal biases.76- The model may fail to generate output that matches the prompts.77- Outputs are heavily influenced by the input image.78 79# Out-of-Scope Use80The model and its derivatives may not be used81 82- In any way that violates any applicable national, federal, state, local or international law or regulation.83- For the purpose of exploiting, harming or attempting to exploit or harm minors in any way; including but not limited to the solicitation, creation, acquisition, or dissemination of child exploitative content.84- To generate or disseminate verifiably false information and/or content with the purpose of harming others.85- To generate or disseminate personal identifiable information that can be used to harm an individual.86- To harass, abuse, threaten, stalk, or bully individuals or groups of individuals.87- To create non-consensual nudity or illegal pornographic content.88- For fully automated decision making that adversely impacts an individual's legal rights or otherwise creates or modifies a binding, enforceable obligation.89- Generating or facilitating large-scale disinformation campaigns.90 91# License92This model falls under the [`FLUX.1 [dev]` Non-Commercial License](https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/blob/main/LICENSE.md).