Unverified Commit 1e5eaca7 authored by Will Berman's avatar Will Berman Committed by GitHub
Browse files

stable unclip integration tests turn on memory saving (#2408)

* stable unclip integration tests turn on memory saving

* add note on turning on memory saving
parent 55de5092
......@@ -189,6 +189,10 @@ class StableUnCLIPPipelineIntegrationTests(unittest.TestCase):
pipe = StableUnCLIPPipeline.from_pretrained("fusing/stable-unclip-2-1-l", torch_dtype=torch.float16)
pipe.to(torch_device)
pipe.set_progress_bar_config(disable=None)
# stable unclip will oom when integration tests are run on a V100,
# so turn on memory savings
pipe.enable_attention_slicing()
pipe.enable_sequential_cpu_offload()
generator = torch.Generator(device="cpu").manual_seed(0)
output = pipe("anime turle", generator=generator, output_type="np")
......
......@@ -185,6 +185,10 @@ class StableUnCLIPImg2ImgPipelineIntegrationTests(unittest.TestCase):
)
pipe.to(torch_device)
pipe.set_progress_bar_config(disable=None)
# stable unclip will oom when integration tests are run on a V100,
# so turn on memory savings
pipe.enable_attention_slicing()
pipe.enable_sequential_cpu_offload()
generator = torch.Generator(device="cpu").manual_seed(0)
output = pipe("anime turle", image=input_image, generator=generator, output_type="np")
......@@ -209,6 +213,10 @@ class StableUnCLIPImg2ImgPipelineIntegrationTests(unittest.TestCase):
)
pipe.to(torch_device)
pipe.set_progress_bar_config(disable=None)
# stable unclip will oom when integration tests are run on a V100,
# so turn on memory savings
pipe.enable_attention_slicing()
pipe.enable_sequential_cpu_offload()
generator = torch.Generator(device="cpu").manual_seed(0)
output = pipe("anime turle", image=input_image, generator=generator, output_type="np")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment