lzyvegetable commited on
Commit
e75fa33
1 Parent(s): 98dbe65

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.sft filter=lfs diff=lfs merge=lfs -text
37
+ schnell_grid.png filter=lfs diff=lfs merge=lfs -text
38
+ schnell_grid.jpeg filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - text-to-image
7
+ - image-generation
8
+ - flux
9
+ ---
10
+
11
+ ![FLUX.1 [schnell] Grid](./schnell_grid.jpeg)
12
+
13
+ `FLUX.1 [schnell]` is a 12 billion parameter rectified flow transformer capable of generating images from text descriptions.
14
+ For more information, please read our [blog post](https://blackforestlabs.ai/announcing-black-forest-labs/).
15
+
16
+ # Key Features
17
+ 1. Cutting-edge output quality and competitive prompt following, matching the performance of closed source alternatives.
18
+ 2. Trained using latent adversarial diffusion distillation, `FLUX.1 [schnell]` can generate high-quality images in only 1 to 4 steps.
19
+ 3. Released under the `apache-2.0` licence, the model can be used for personal, scientific, and commercial purposes.
20
+
21
+ # Usage
22
+ 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).
23
+ Developers and creatives looking to build on top of `FLUX.1 [schnell]` are encouraged to use this as a starting point.
24
+
25
+ ## API Endpoints
26
+ The FLUX.1 models are also available via API from the following sources
27
+ - [bfl.ml](https://docs.bfl.ml/) (currently `FLUX.1 [pro]`)
28
+ - [replicate.com](https://replicate.com/collections/flux)
29
+ - [fal.ai](https://fal.ai/models/fal-ai/flux/schnell)
30
+ - [mystic.ai](https://www.mystic.ai/black-forest-labs/flux1-schnell)
31
+
32
+ ## ComfyUI
33
+ `FLUX.1 [schnell]` is also available in [Comfy UI](https://github.com/comfyanonymous/ComfyUI) for local inference with a node-based workflow.
34
+
35
+ ## Diffusers
36
+ To use `FLUX.1 [schnell]` with the 🧨 diffusers python library, first install or upgrade diffusers
37
+
38
+ ```shell
39
+ pip install -U diffusers
40
+ ```
41
+
42
+ Then you can use `FluxPipeline` to run the model
43
+
44
+ ```python
45
+ import torch
46
+ from diffusers import FluxPipeline
47
+
48
+ pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16)
49
+ pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power
50
+
51
+ prompt = "A cat holding a sign that says hello world"
52
+ image = pipe(
53
+ prompt,
54
+ guidance_scale=0.0,
55
+ num_inference_steps=4,
56
+ max_sequence_length=256,
57
+ generator=torch.Generator("cpu").manual_seed(0)
58
+ ).images[0]
59
+ image.save("flux-schnell.png")
60
+ ```
61
+
62
+ To learn more check out the [diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) documentation
63
+
64
+ ---
65
+ # Limitations
66
+ - This model is not intended or able to provide factual information.
67
+ - As a statistical model this checkpoint might amplify existing societal biases.
68
+ - The model may fail to generate output that matches the prompts.
69
+ - Prompt following is heavily influenced by the prompting-style.
70
+
71
+ # Out-of-Scope Use
72
+ The model and its derivatives may not be used
73
+
74
+ - In any way that violates any applicable national, federal, state, local or international law or regulation.
75
+ - 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.
76
+ - To generate or disseminate verifiably false information and/or content with the purpose of harming others.
77
+ - To generate or disseminate personal identifiable information that can be used to harm an individual.
78
+ - To harass, abuse, threaten, stalk, or bully individuals or groups of individuals.
79
+ - To create non-consensual nudity or illegal pornographic content.
80
+ - For fully automated decision making that adversely impacts an individual's legal rights or otherwise creates or modifies a binding, enforceable obligation.
81
+ - Generating or facilitating large-scale disinformation campaigns.
ae.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afc8e28272cd15db3919bacdb6918ce9c1ed22e96cb12c4d5ed0fba823529e38
3
+ size 335304388
vae/config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "AutoencoderKL",
3
+ "_diffusers_version": "0.30.0.dev0",
4
+ "act_fn": "silu",
5
+ "block_out_channels": [
6
+ 128,
7
+ 256,
8
+ 512,
9
+ 512
10
+ ],
11
+ "down_block_types": [
12
+ "DownEncoderBlock2D",
13
+ "DownEncoderBlock2D",
14
+ "DownEncoderBlock2D",
15
+ "DownEncoderBlock2D"
16
+ ],
17
+ "force_upcast": true,
18
+ "in_channels": 3,
19
+ "latent_channels": 16,
20
+ "latents_mean": null,
21
+ "latents_std": null,
22
+ "layers_per_block": 2,
23
+ "mid_block_add_attention": true,
24
+ "norm_num_groups": 32,
25
+ "out_channels": 3,
26
+ "sample_size": 1024,
27
+ "scaling_factor": 0.3611,
28
+ "shift_factor": 0.1159,
29
+ "up_block_types": [
30
+ "UpDecoderBlock2D",
31
+ "UpDecoderBlock2D",
32
+ "UpDecoderBlock2D",
33
+ "UpDecoderBlock2D"
34
+ ],
35
+ "use_post_quant_conv": false,
36
+ "use_quant_conv": false
37
+ }
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