markod0925 commited on
Commit
9b963b6
·
verified ·
1 Parent(s): 8e25a30

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -2
README.md CHANGED
@@ -18,10 +18,21 @@ Make everything as Yarn Art Syle.
18
 
19
  ```python
20
  !pip install -U diffusers bitsandbytes
21
- from diffusers import AutoPipelineForText2Image
 
 
22
  repo_id = "markod0925/yarn_flux"
23
 
24
- pipeline = AutoPipelineForText2Image.from_pretrained(repo_id)
 
 
 
 
 
 
 
 
 
25
  pipeline.enable_model_cpu_offload()
26
 
27
  image = pipeline(
 
18
 
19
  ```python
20
  !pip install -U diffusers bitsandbytes
21
+
22
+ from diffusers import AutoPipelineForText2Image, BitsAndBytesConfig
23
+ import torch
24
  repo_id = "markod0925/yarn_flux"
25
 
26
+ bnb_4bit_compute_dtype = torch.float16
27
+ nf4_config = BitsAndBytesConfig(
28
+ load_in_4bit=True,
29
+ bnb_4bit_quant_type="nf4",
30
+ bnb_4bit_compute_dtype=bnb_4bit_compute_dtype,
31
+ )
32
+
33
+ pipeline = AutoPipelineForText2Image.from_pretrained(repo_id,
34
+ torch_dtype=bnb_4bit_compute_dtype
35
+ )
36
  pipeline.enable_model_cpu_offload()
37
 
38
  image = pipeline(