Diffusers
Safetensors
English
wanghaofan commited on
Commit
7997454
·
verified ·
1 Parent(s): 91b0e78

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -5
README.md CHANGED
@@ -1,5 +1,45 @@
1
- ---
2
- license: other
3
- license_name: flux-1-dev-non-commercial-license
4
- license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: flux-1-dev-non-commercial-license
4
+ license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
5
+ language:
6
+ - en
7
+ base_model:
8
+ - black-forest-labs/FLUX.1-dev
9
+ library_name: diffusers
10
+ ---
11
+
12
+ ## Model Details
13
+ This is a diffusers version of [nyanko7/flux-dev-de-distill](https://huggingface.co/nyanko7/flux-dev-de-distill).
14
+
15
+ ## Usage
16
+ ```python
17
+ import torch
18
+ from diffusers import FluxTransformer2DModel
19
+ from pipeline_flux_de_distill import FluxPipeline
20
+
21
+ model_path = "black-forest-labs/FLUX.1-dev"
22
+
23
+ transformer = FluxTransformer2DModel.from_pretrained(
24
+ "InstantX/flux-dev-de-distill-diffusers",
25
+ torch_dtype=torch.bfloat16
26
+ )
27
+
28
+ pipeline = FluxPipeline.from_pretrained(model_path, transformer=transformer, torch_dtype=torch.bfloat16).to("cuda")
29
+
30
+ prompt = "a tiny astronaut hatching from an egg on the moon"
31
+ negative_prompt = "bad photo"
32
+
33
+ image = pipeline(
34
+ prompt=prompt,
35
+ negative_prompt=negative_prompt,
36
+ guidance_scale=3.5,
37
+ num_inference_steps=24,
38
+ ).images[0]
39
+
40
+ image.save("de-distill.jpg")
41
+ ```
42
+
43
+ ## Other Resources
44
+ - [ashen0209/Flux-Dev2Pro](https://huggingface.co/ashen0209/Flux-Dev2Pro)
45
+