Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -4,89 +4,22 @@ language:
|
|
| 4 |
license: other
|
| 5 |
license_name: flux-1-dev-non-commercial-license
|
| 6 |
license_link: LICENSE.md
|
| 7 |
-
extra_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).
|
| 9 |
tags:
|
| 10 |
- image-generation
|
| 11 |
- flux
|
| 12 |
-
-
|
| 13 |
---
|
| 14 |
|
| 15 |

|
| 16 |
|
| 17 |
-
|
| 18 |
-
Given an input image, FLUX.1 Redux can reproduce the image with slight variation, allowing to refine a given image.
|
| 19 |
-
It naturally integrates into more complex workflows unlocking image restyling.
|
| 20 |
-
Restyling via text is also available through our API by providing an image plus a language prompt.
|
| 21 |
-
For more information, please read our [blog post](https://blackforestlabs.ai/flux-1-tools/).
|
| 22 |
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
## API Endpoints
|
| 29 |
-
`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.
|
| 30 |
-
The 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 |
-

|
| 34 |
-
|
| 35 |
-
## Diffusers
|
| 36 |
-
|
| 37 |
-
To use `FLUX.1 Redux [pro]` with the 🧨 diffusers python library, first install or upgrade diffusers
|
| 38 |
-
|
| 39 |
-
```shell
|
| 40 |
-
pip install -U diffusers
|
| 41 |
-
```
|
| 42 |
-
|
| 43 |
-
Then you can use `FluxPriorReduxPipeline` along with `FluxPipeline` to generate images from images.
|
| 44 |
-
|
| 45 |
-
```python
|
| 46 |
-
import torch
|
| 47 |
-
from diffusers import FluxPriorReduxPipeline, FluxPipeline
|
| 48 |
-
from diffusers.utils import load_image
|
| 49 |
-
|
| 50 |
-
pipe_prior_redux = FluxPriorReduxPipeline.from_pretrained("black-forest-labs/FLUX.1-Redux-dev", torch_dtype=torch.bfloat16).to("cuda")
|
| 51 |
-
pipe = FluxPipeline.from_pretrained(
|
| 52 |
-
"black-forest-labs/FLUX.1-dev" ,
|
| 53 |
-
text_encoder=None,
|
| 54 |
-
text_encoder_2=None,
|
| 55 |
-
torch_dtype=torch.bfloat16
|
| 56 |
-
).to("cuda")
|
| 57 |
-
|
| 58 |
-
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/robot.png")
|
| 59 |
-
pipe_prior_output = pipe_prior_redux(image)
|
| 60 |
-
images = pipe(
|
| 61 |
-
guidance_scale=2.5,
|
| 62 |
-
num_inference_steps=50,
|
| 63 |
-
generator=torch.Generator("cpu").manual_seed(0),
|
| 64 |
-
**pipe_prior_output,
|
| 65 |
-
).images
|
| 66 |
-
images[0].save("flux-dev-redux.png")
|
| 67 |
-
```
|
| 68 |
-
|
| 69 |
-
To learn more check out the [diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) documentation
|
| 70 |
|
| 71 |
---
|
| 72 |
-
|
| 73 |
-
# Limitations
|
| 74 |
-
- 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 Use
|
| 80 |
-
The model and its derivatives may not be used
|
| 81 |
-
|
| 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 |
-
# License
|
| 92 |
-
This model falls under the [`FLUX.1 [dev]` Non-Commercial License](https://huggingface.co/black-forest-labs/FLUX.1-Depth-dev/blob/main/LICENSE.md).
|
|
|
|
| 4 |
license: other
|
| 5 |
license_name: flux-1-dev-non-commercial-license
|
| 6 |
license_link: LICENSE.md
|
|
|
|
|
|
|
| 7 |
tags:
|
| 8 |
- image-generation
|
| 9 |
- flux
|
| 10 |
+
- siglip2
|
| 11 |
---
|
| 12 |
|
| 13 |

|
| 14 |
|
| 15 |
+
# Flex.1-alpha-Redux [dev] — Enhanced with SigLIP-2
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
FLUX.1 Redux [dev] is an adapter for all FLUX.1 base models for image variation generation.
|
| 18 |
+
Given an input image, FLUX.1 Redux can reproduce the image with slight variation, allowing for refined visual generation. It integrates naturally into more complex workflows, enabling image restyling and editing via text.
|
| 19 |
|
| 20 |
+
This version of FLUX.1 Redux has been updated with modules from [`google/siglip2-so400m-patch16-512`](https://huggingface.co/google/siglip2-so400m-patch16-512), replacing the:
|
| 21 |
+
- `image_encoder`
|
| 22 |
+
- `feature_extractor`
|
| 23 |
+
- `image_embedder`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
feature_extractor/preprocessor_config.json
CHANGED
|
@@ -15,10 +15,10 @@
|
|
| 15 |
0.5
|
| 16 |
],
|
| 17 |
"processor_class": "SiglipProcessor",
|
| 18 |
-
"resample":
|
| 19 |
"rescale_factor": 0.00392156862745098,
|
| 20 |
"size": {
|
| 21 |
-
"height":
|
| 22 |
-
"width":
|
| 23 |
}
|
| 24 |
}
|
|
|
|
| 15 |
0.5
|
| 16 |
],
|
| 17 |
"processor_class": "SiglipProcessor",
|
| 18 |
+
"resample": 2,
|
| 19 |
"rescale_factor": 0.00392156862745098,
|
| 20 |
"size": {
|
| 21 |
+
"height": 512,
|
| 22 |
+
"width": 512
|
| 23 |
}
|
| 24 |
}
|
flux1-redux-dev.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a422b7a55b1fb7232af85bd4d6c5a26f763879734e856e8661815016e60f161
|
| 3 |
+
size 129008400
|
image_embedder/diffusion_pytorch_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a422b7a55b1fb7232af85bd4d6c5a26f763879734e856e8661815016e60f161
|
| 3 |
+
size 129008400
|
image_encoder/config.json
CHANGED
|
@@ -5,14 +5,14 @@
|
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
"hidden_act": "gelu_pytorch_tanh",
|
| 7 |
"hidden_size": 1152,
|
| 8 |
-
"image_size":
|
| 9 |
"intermediate_size": 4304,
|
| 10 |
"layer_norm_eps": 1e-06,
|
| 11 |
"model_type": "siglip_vision_model",
|
| 12 |
"num_attention_heads": 16,
|
| 13 |
"num_channels": 3,
|
| 14 |
"num_hidden_layers": 27,
|
| 15 |
-
"patch_size":
|
| 16 |
"torch_dtype": "bfloat16",
|
| 17 |
-
"transformers_version": "4.
|
| 18 |
-
}
|
|
|
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
"hidden_act": "gelu_pytorch_tanh",
|
| 7 |
"hidden_size": 1152,
|
| 8 |
+
"image_size": 512,
|
| 9 |
"intermediate_size": 4304,
|
| 10 |
"layer_norm_eps": 1e-06,
|
| 11 |
"model_type": "siglip_vision_model",
|
| 12 |
"num_attention_heads": 16,
|
| 13 |
"num_channels": 3,
|
| 14 |
"num_hidden_layers": 27,
|
| 15 |
+
"patch_size": 16,
|
| 16 |
"torch_dtype": "bfloat16",
|
| 17 |
+
"transformers_version": "4.51.3"
|
| 18 |
+
}
|
image_encoder/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc315325a08b9ada2eb1f2cf9fb1b6874defacf1f3b0ae8dc21bf021d6437db1
|
| 3 |
+
size 857600520
|