There was an error while loading. Please reload this page.
1 parent d38d582 commit fe31b2dCopy full SHA for fe31b2d
1 file changed
examples/v1/z-image-turbo.py
@@ -14,7 +14,9 @@
14
15
pipe = ZImagePipeline.from_pretrained(
16
"Tongyi-MAI/Z-Image-Turbo", transformer=transformer, torch_dtype=dtype, low_cpu_mem_usage=False
17
- ).to("cuda")
+ )
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
20
21
prompt = "a young military male cooking in the kitchen for therapy"
22
0 commit comments