Update demo.py
Browse filesused pipe.enable_sequential_cpu_offload() for lower vram use.
demo.py
CHANGED
@@ -10,8 +10,8 @@ pipe = DiffusionPipeline.from_pretrained(
|
|
10 |
torch_dtype=torch.bfloat16,
|
11 |
)
|
12 |
|
13 |
-
print("model initialized.
|
14 |
-
pipe.
|
15 |
|
16 |
print("Trying render now...")
|
17 |
images = pipe("a misty Tokyo alley at night",num_inference_steps=30).images
|
|
|
10 |
torch_dtype=torch.bfloat16,
|
11 |
)
|
12 |
|
13 |
+
print("model initialized.")
|
14 |
+
pipe.enable_sequential_cpu_offload()
|
15 |
|
16 |
print("Trying render now...")
|
17 |
images = pipe("a misty Tokyo alley at night",num_inference_steps=30).images
|