Update README.md
Browse files
README.md
CHANGED
|
@@ -57,7 +57,7 @@ You can run the smashed model with these steps:
|
|
| 57 |
- Option 1 - Use command line interface (CLI):
|
| 58 |
```bash
|
| 59 |
mkdir SG161222-Realistic_Vision_V1.4-turbo-tiny-green-smashed
|
| 60 |
-
huggingface-cli download PrunaAI/
|
| 61 |
```
|
| 62 |
- Option 2 - Use Python:
|
| 63 |
```python
|
|
@@ -71,7 +71,7 @@ You can run the smashed model with these steps:
|
|
| 71 |
```python
|
| 72 |
|
| 73 |
import torch
|
| 74 |
-
|
| 75 |
from optimum.quanto import freeze, qfloat8, quantize
|
| 76 |
|
| 77 |
from diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKL
|
|
@@ -104,17 +104,17 @@ You can run the smashed model with these steps:
|
|
| 104 |
)
|
| 105 |
pipe.text_encoder_2 = text_encoder_2
|
| 106 |
pipe.transformer = transformer
|
| 107 |
-
pipe.enable_model_cpu_offload()
|
| 108 |
-
|
|
|
|
| 109 |
generator = torch.Generator().manual_seed(12345)
|
| 110 |
-
|
| 111 |
"a cute apple smiling",
|
| 112 |
guidance_scale=0.0,
|
| 113 |
num_inference_steps=4,
|
| 114 |
max_sequence_length=256,
|
| 115 |
generator=torch.Generator("cpu").manual_seed(0)
|
| 116 |
).images[0]
|
| 117 |
-
image.save("flux-schnell.png")
|
| 118 |
```
|
| 119 |
|
| 120 |
## Configurations
|
|
|
|
| 57 |
- Option 1 - Use command line interface (CLI):
|
| 58 |
```bash
|
| 59 |
mkdir SG161222-Realistic_Vision_V1.4-turbo-tiny-green-smashed
|
| 60 |
+
huggingface-cli download PrunaAI/FLUX.1-schnell-8bit --local-dir FLUX.1-schnell-8bit --local-dir-use-symlinks False
|
| 61 |
```
|
| 62 |
- Option 2 - Use Python:
|
| 63 |
```python
|
|
|
|
| 71 |
```python
|
| 72 |
|
| 73 |
import torch
|
| 74 |
+
|
| 75 |
from optimum.quanto import freeze, qfloat8, quantize
|
| 76 |
|
| 77 |
from diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKL
|
|
|
|
| 104 |
)
|
| 105 |
pipe.text_encoder_2 = text_encoder_2
|
| 106 |
pipe.transformer = transformer
|
| 107 |
+
# pipe.enable_model_cpu_offload()
|
| 108 |
+
pipe.to('cuda')
|
| 109 |
+
print('done')
|
| 110 |
generator = torch.Generator().manual_seed(12345)
|
| 111 |
+
pipe(
|
| 112 |
"a cute apple smiling",
|
| 113 |
guidance_scale=0.0,
|
| 114 |
num_inference_steps=4,
|
| 115 |
max_sequence_length=256,
|
| 116 |
generator=torch.Generator("cpu").manual_seed(0)
|
| 117 |
).images[0]
|
|
|
|
| 118 |
```
|
| 119 |
|
| 120 |
## Configurations
|