Update README.md
Browse files
README.md
CHANGED
|
@@ -23,16 +23,17 @@ import torch
|
|
| 23 |
from diffusers import FluxPipeline
|
| 24 |
|
| 25 |
pipe = FluxPipeline.from_pretrained(
|
| 26 |
-
"Silan10/flux_quantized_half"
|
|
|
|
| 27 |
)
|
| 28 |
pipe.to("cuda") # or pipe.enable_model_cpu_offload() for low VRAM
|
| 29 |
|
| 30 |
-
prompt = "A detailed concept art of a futuristic
|
| 31 |
image = pipe(
|
| 32 |
prompt,
|
| 33 |
guidance_scale=3.5,
|
| 34 |
num_inference_steps=20,
|
| 35 |
-
|
| 36 |
).images[0]
|
| 37 |
|
| 38 |
image.save("flux_half_sample.png")
|
|
|
|
| 23 |
from diffusers import FluxPipeline
|
| 24 |
|
| 25 |
pipe = FluxPipeline.from_pretrained(
|
| 26 |
+
"Silan10/flux_quantized_half",
|
| 27 |
+
torch_dtype=torch.float16
|
| 28 |
)
|
| 29 |
pipe.to("cuda") # or pipe.enable_model_cpu_offload() for low VRAM
|
| 30 |
|
| 31 |
+
prompt = "A detailed concept art of a futuristic cat"
|
| 32 |
image = pipe(
|
| 33 |
prompt,
|
| 34 |
guidance_scale=3.5,
|
| 35 |
num_inference_steps=20,
|
| 36 |
+
generator=torch.Generator("cpu").manual_seed(0)
|
| 37 |
).images[0]
|
| 38 |
|
| 39 |
image.save("flux_half_sample.png")
|