Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
2df99ad
1
Parent(s):
898d15e
new file: models/vae/diffusion_pytorch_model.safetensors
Browse files- model_cards/FLUX.1-dev.md +0 -46
- model_cards/FLUX.1-schnell.md +0 -41
- models/vae/config.json +38 -0
- models/vae/diffusion_pytorch_model.safetensors +3 -0
- src/flux/__pycache__/__init__.cpython-310.pyc +0 -0
- src/flux/__pycache__/_version.cpython-310.pyc +0 -0
- src/flux/__pycache__/math.cpython-310.pyc +0 -0
- src/flux/__pycache__/model.cpython-310.pyc +0 -0
- src/flux/__pycache__/sampling.cpython-310.pyc +0 -0
- src/flux/__pycache__/util.cpython-310.pyc +0 -0
- src/flux/modules/__pycache__/autoencoder.cpython-310.pyc +0 -0
- src/flux/modules/__pycache__/conditioner.cpython-310.pyc +0 -0
- src/flux/modules/__pycache__/layers.cpython-310.pyc +0 -0
- src/flux/util.py +2 -2
model_cards/FLUX.1-dev.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
| 1 |
-
![FLUX.1 [dev] Grid](../assets/dev_grid.jpg)
|
| 2 |
-
|
| 3 |
-
`FLUX.1 [dev]` is a 12 billion parameter rectified flow transformer capable of generating images from text descriptions.
|
| 4 |
-
For more information, please read our [blog post](https://blackforestlabs.ai/announcing-black-forest-labs/).
|
| 5 |
-
|
| 6 |
-
# Key Features
|
| 7 |
-
1. Cutting-edge output quality, second only to our state-of-the-art model `FLUX.1 [pro]`.
|
| 8 |
-
2. Competitive prompt following, matching the performance of closed source alternatives.
|
| 9 |
-
3. Trained using guidance distillation, making `FLUX.1 [dev]` more efficient.
|
| 10 |
-
4. Open weights to drive new scientific research, and empower artists to develop innovative workflows.
|
| 11 |
-
5. Generated outputs can be used for personal, scientific, and commercial purposes, as described in the [flux-1-dev-non-commercial-license](./licence.md).
|
| 12 |
-
|
| 13 |
-
# Usage
|
| 14 |
-
We provide a reference implementation of `FLUX.1 [dev]`, as well as sampling code, in a dedicated [github repository](https://github.com/black-forest-labs/flux).
|
| 15 |
-
Developers and creatives looking to build on top of `FLUX.1 [dev]` are encouraged to use this as a starting point.
|
| 16 |
-
|
| 17 |
-
## API Endpoints
|
| 18 |
-
The FLUX.1 models are also available via API from the following sources
|
| 19 |
-
1. [bfl.ml](https://docs.bfl.ml/) (currently `FLUX.1 [pro]`)
|
| 20 |
-
2. [replicate.com](https://replicate.com/collections/flux)
|
| 21 |
-
3. [fal.ai](https://fal.ai/models/fal-ai/flux/dev)
|
| 22 |
-
|
| 23 |
-
## ComfyUI
|
| 24 |
-
`FLUX.1 [dev]` is also available in [Comfy UI](https://github.com/comfyanonymous/ComfyUI) for local inference with a node-based workflow.
|
| 25 |
-
|
| 26 |
-
---
|
| 27 |
-
# Limitations
|
| 28 |
-
- This model is not intended or able to provide factual information.
|
| 29 |
-
- As a statistical model this checkpoint might amplify existing societal biases.
|
| 30 |
-
- The model may fail to generate output that matches the prompts.
|
| 31 |
-
- Prompt following is heavily influenced by the prompting-style.
|
| 32 |
-
|
| 33 |
-
# Out-of-Scope Use
|
| 34 |
-
The model and its derivatives may not be used
|
| 35 |
-
|
| 36 |
-
- In any way that violates any applicable national, federal, state, local or international law or regulation.
|
| 37 |
-
- 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.
|
| 38 |
-
- To generate or disseminate verifiably false information and/or content with the purpose of harming others.
|
| 39 |
-
- To generate or disseminate personal identifiable information that can be used to harm an individual.
|
| 40 |
-
- To harass, abuse, threaten, stalk, or bully individuals or groups of individuals.
|
| 41 |
-
- To create non-consensual nudity or illegal pornographic content.
|
| 42 |
-
- For fully automated decision making that adversely impacts an individual's legal rights or otherwise creates or modifies a binding, enforceable obligation.
|
| 43 |
-
- Generating or facilitating large-scale disinformation campaigns.
|
| 44 |
-
|
| 45 |
-
# License
|
| 46 |
-
This model falls under the [`FLUX.1 [dev]` Non-Commercial License](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model_cards/FLUX.1-schnell.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
| 1 |
-
![FLUX.1 [schnell] Grid](../assets/schnell_grid.jpg)
|
| 2 |
-
|
| 3 |
-
`FLUX.1 [schnell]` is a 12 billion parameter rectified flow transformer capable of generating images from text descriptions.
|
| 4 |
-
For more information, please read our [blog post](https://blackforestlabs.ai/announcing-black-forest-labs/).
|
| 5 |
-
|
| 6 |
-
# Key Features
|
| 7 |
-
1. Cutting-edge output quality and competitive prompt following, matching the performance of closed source alternatives.
|
| 8 |
-
2. Trained using latent adversarial diffusion distillation, `FLUX.1 [schnell]` can generate high-quality images in only 1 to 4 steps.
|
| 9 |
-
3. Released under the `apache-2.0` licence, the model can be used for personal, scientific, and commercial purposes.
|
| 10 |
-
|
| 11 |
-
# Usage
|
| 12 |
-
We provide a reference implementation of `FLUX.1 [schnell]`, as well as sampling code, in a dedicated [github repository](https://github.com/black-forest-labs/flux).
|
| 13 |
-
Developers and creatives looking to build on top of `FLUX.1 [schnell]` are encouraged to use this as a starting point.
|
| 14 |
-
|
| 15 |
-
## API Endpoints
|
| 16 |
-
The FLUX.1 models are also available via API from the following sources
|
| 17 |
-
1. [bfl.ml](https://docs.bfl.ml/) (currently `FLUX.1 [pro]`)
|
| 18 |
-
2. [replicate.com](https://replicate.com/collections/flux)
|
| 19 |
-
3. [fal.ai](https://fal.ai/models/fal-ai/flux/schnell)
|
| 20 |
-
|
| 21 |
-
## ComfyUI
|
| 22 |
-
`FLUX.1 [schnell]` is also available in [Comfy UI](https://github.com/comfyanonymous/ComfyUI) for local inference with a node-based workflow.
|
| 23 |
-
|
| 24 |
-
---
|
| 25 |
-
# Limitations
|
| 26 |
-
- This model is not intended or able to provide factual information.
|
| 27 |
-
- As a statistical model this checkpoint might amplify existing societal biases.
|
| 28 |
-
- The model may fail to generate output that matches the prompts.
|
| 29 |
-
- Prompt following is heavily influenced by the prompting-style.
|
| 30 |
-
|
| 31 |
-
# Out-of-Scope Use
|
| 32 |
-
The model and its derivatives may not be used
|
| 33 |
-
|
| 34 |
-
- In any way that violates any applicable national, federal, state, local or international law or regulation.
|
| 35 |
-
- 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.
|
| 36 |
-
- To generate or disseminate verifiably false information and/or content with the purpose of harming others.
|
| 37 |
-
- To generate or disseminate personal identifiable information that can be used to harm an individual.
|
| 38 |
-
- To harass, abuse, threaten, stalk, or bully individuals or groups of individuals.
|
| 39 |
-
- To create non-consensual nudity or illegal pornographic content.
|
| 40 |
-
- For fully automated decision making that adversely impacts an individual's legal rights or otherwise creates or modifies a binding, enforceable obligation.
|
| 41 |
-
- Generating or facilitating large-scale disinformation campaigns.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
models/vae/config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKL",
|
| 3 |
+
"_diffusers_version": "0.30.0.dev0",
|
| 4 |
+
"_name_or_path": "../checkpoints/flux-dev",
|
| 5 |
+
"act_fn": "silu",
|
| 6 |
+
"block_out_channels": [
|
| 7 |
+
128,
|
| 8 |
+
256,
|
| 9 |
+
512,
|
| 10 |
+
512
|
| 11 |
+
],
|
| 12 |
+
"down_block_types": [
|
| 13 |
+
"DownEncoderBlock2D",
|
| 14 |
+
"DownEncoderBlock2D",
|
| 15 |
+
"DownEncoderBlock2D",
|
| 16 |
+
"DownEncoderBlock2D"
|
| 17 |
+
],
|
| 18 |
+
"force_upcast": true,
|
| 19 |
+
"in_channels": 3,
|
| 20 |
+
"latent_channels": 16,
|
| 21 |
+
"latents_mean": null,
|
| 22 |
+
"latents_std": null,
|
| 23 |
+
"layers_per_block": 2,
|
| 24 |
+
"mid_block_add_attention": true,
|
| 25 |
+
"norm_num_groups": 32,
|
| 26 |
+
"out_channels": 3,
|
| 27 |
+
"sample_size": 1024,
|
| 28 |
+
"scaling_factor": 0.3611,
|
| 29 |
+
"shift_factor": 0.1159,
|
| 30 |
+
"up_block_types": [
|
| 31 |
+
"UpDecoderBlock2D",
|
| 32 |
+
"UpDecoderBlock2D",
|
| 33 |
+
"UpDecoderBlock2D",
|
| 34 |
+
"UpDecoderBlock2D"
|
| 35 |
+
],
|
| 36 |
+
"use_post_quant_conv": false,
|
| 37 |
+
"use_quant_conv": false
|
| 38 |
+
}
|
models/vae/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f5b59a26851551b67ae1fe58d32e76486e1e812def4696a4bea97f16604d40a3
|
| 3 |
+
size 167666902
|
src/flux/__pycache__/__init__.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/__init__.cpython-310.pyc and b/src/flux/__pycache__/__init__.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/_version.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/_version.cpython-310.pyc and b/src/flux/__pycache__/_version.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/math.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/math.cpython-310.pyc and b/src/flux/__pycache__/math.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/model.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/model.cpython-310.pyc and b/src/flux/__pycache__/model.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/sampling.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/sampling.cpython-310.pyc and b/src/flux/__pycache__/sampling.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/util.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/util.cpython-310.pyc and b/src/flux/__pycache__/util.cpython-310.pyc differ
|
|
|
src/flux/modules/__pycache__/autoencoder.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/modules/__pycache__/autoencoder.cpython-310.pyc and b/src/flux/modules/__pycache__/autoencoder.cpython-310.pyc differ
|
|
|
src/flux/modules/__pycache__/conditioner.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/modules/__pycache__/conditioner.cpython-310.pyc and b/src/flux/modules/__pycache__/conditioner.cpython-310.pyc differ
|
|
|
src/flux/modules/__pycache__/layers.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/modules/__pycache__/layers.cpython-310.pyc and b/src/flux/modules/__pycache__/layers.cpython-310.pyc differ
|
|
|
src/flux/util.py
CHANGED
|
@@ -148,8 +148,8 @@ def load_ae(name: str, device: str | torch.device = "cuda", hf_download: bool =
|
|
| 148 |
and configs[name].repo_ae is not None
|
| 149 |
and hf_download
|
| 150 |
):
|
| 151 |
-
ckpt_path = hf_hub_download(configs[name].repo_id, configs[name].repo_ae)
|
| 152 |
-
|
| 153 |
|
| 154 |
# Loading the autoencoder
|
| 155 |
print("Init AE")
|
|
|
|
| 148 |
and configs[name].repo_ae is not None
|
| 149 |
and hf_download
|
| 150 |
):
|
| 151 |
+
#ckpt_path = hf_hub_download(configs[name].repo_id, configs[name].repo_ae)
|
| 152 |
+
ckpt_path = "/home/user/app/models/vae/diffusion_pytorch_model.safetensors"
|
| 153 |
|
| 154 |
# Loading the autoencoder
|
| 155 |
print("Init AE")
|