Lmxyy commited on
Commit
05eea96
·
verified ·
1 Parent(s): 1357abf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -62,13 +62,13 @@ Please follow the instructions in [mit-han-lab/nunchaku](https://github.com/mit-
62
 
63
  ```python
64
  import torch
 
65
 
66
- from nunchaku.pipelines import flux as nunchaku_flux
67
 
68
- pipeline = nunchaku_flux.from_pretrained(
69
- "black-forest-labs/FLUX.1-dev",
70
- torch_dtype=torch.bfloat16,
71
- qmodel_path="mit-han-lab/svdq-int4-flux.1-dev", # download from Huggingface
72
  ).to("cuda")
73
  image = pipeline("A cat holding a sign that says hello world", num_inference_steps=50, guidance_scale=3.5).images[0]
74
  image.save("example.png")
 
62
 
63
  ```python
64
  import torch
65
+ from diffusers import FluxPipeline
66
 
67
+ from nunchaku.models.transformer_flux import NunchakuFluxTransformer2dModel
68
 
69
+ transformer = NunchakuFluxTransformer2dModel.from_pretrained("mit-han-lab/svdq-int4-flux.1-dev")
70
+ pipeline = FluxPipeline.from_pretrained(
71
+ "black-forest-labs/FLUX.1-dev", transformer=transformer, torch_dtype=torch.bfloat16
 
72
  ).to("cuda")
73
  image = pipeline("A cat holding a sign that says hello world", num_inference_steps=50, guidance_scale=3.5).images[0]
74
  image.save("example.png")