shimmyshimmer commited on
Commit
65b3e21
·
verified ·
1 Parent(s): 708cfaf

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +71 -0
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - text-to-image
7
+ - image-generation
8
+ - flux
9
+ base_model:
10
+ - black-forest-labs/FLUX.1-schnell
11
+ ---
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
+ # Key Features
16
+ 1. Cutting-edge output quality and competitive prompt following, matching the performance of closed source alternatives.
17
+ 2. Trained using latent adversarial diffusion distillation, `FLUX.1 [schnell]` can generate high-quality images in only 1 to 4 steps.
18
+ 3. Released under the `apache-2.0` licence, the model can be used for personal, scientific, and commercial purposes.
19
+ # Usage
20
+ 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).
21
+ Developers and creatives looking to build on top of `FLUX.1 [schnell]` are encouraged to use this as a starting point.
22
+ ## API Endpoints
23
+ The FLUX.1 models are also available via API from the following sources
24
+ - [bfl.ml](https://docs.bfl.ml/) (currently `FLUX.1 [pro]`)
25
+ - [replicate.com](https://replicate.com/collections/flux)
26
+ - [fal.ai](https://fal.ai/models/fal-ai/flux/schnell)
27
+ - [mystic.ai](https://www.mystic.ai/black-forest-labs/flux1-schnell)
28
+ ## ComfyUI
29
+ `FLUX.1 [schnell]` is also available in [Comfy UI](https://github.com/comfyanonymous/ComfyUI) for local inference with a node-based workflow.
30
+ ## Diffusers
31
+ To use `FLUX.1 [schnell]` with the 🧨 diffusers python library, first install or upgrade diffusers
32
+ ```shell
33
+ pip install -U diffusers
34
+ ```
35
+ Then you can use `FluxPipeline` to run the model
36
+ ```python
37
+ import torch
38
+ from diffusers import FluxPipeline
39
+ pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16)
40
+ pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power
41
+
42
+ prompt = "A cat holding a sign that says hello world"
43
+ image = pipe(
44
+ prompt,
45
+ guidance_scale=0.0,
46
+ num_inference_steps=4,
47
+ max_sequence_length=256,
48
+ generator=torch.Generator("cpu").manual_seed(0)
49
+ ).images[0]
50
+ image.save("flux-schnell.png")
51
+ ```
52
+ To learn more check out the [diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) documentation
53
+
54
+ ---
55
+ # Limitations
56
+ - This model is not intended or able to provide factual information.
57
+ - As a statistical model this checkpoint might amplify existing societal biases.
58
+ - The model may fail to generate output that matches the prompts.
59
+ - Prompt following is heavily influenced by the prompting-style.
60
+
61
+ # Out-of-Scope Use
62
+ The model and its derivatives may not be used
63
+
64
+ - In any way that violates any applicable national, federal, state, local or international law or regulation.
65
+ - 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.
66
+ - To generate or disseminate verifiably false information and/or content with the purpose of harming others.
67
+ - To generate or disseminate personal identifiable information that can be used to harm an individual.
68
+ - To harass, abuse, threaten, stalk, or bully individuals or groups of individuals.
69
+ - To create non-consensual nudity or illegal pornographic content.
70
+ - For fully automated decision making that adversely impacts an individual's legal rights or otherwise creates or modifies a binding, enforceable obligation.
71
+ - Generating or facilitating large-scale disinformation campaigns.