Update README.md
Browse files
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.
|
67 |
|
68 |
-
|
69 |
-
|
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")
|