Skip to content

Commit fe31b2d

Browse files
committed
modify example
1 parent d38d582 commit fe31b2d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

examples/v1/z-image-turbo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
pipe = ZImagePipeline.from_pretrained(
1616
"Tongyi-MAI/Z-Image-Turbo", transformer=transformer, torch_dtype=dtype, low_cpu_mem_usage=False
17-
).to("cuda")
17+
)
18+
pipe.enable_sequential_cpu_offload() # enable sequential CPU offload for low vram
19+
# pipe = pipe.to("cuda") # or else comment the line above and uncomment this line to put all components to GPU
1820

1921
prompt = "a young military male cooking in the kitchen for therapy"
2022

0 commit comments

Comments
 (0)