Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(SD) Cleanup after each test. #744

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions models/turbine_models/tests/sd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def testExportT5Model(self):
new_blob_name = new_blob_name[0] + "-pass.mlir"
turbine_tank.changeBlobName(blob_name, new_blob_name)
del current_args
del turbine

def testExportClipVitLarge14(self):
current_args = copy.deepcopy(default_arguments)
Expand Down Expand Up @@ -152,6 +153,8 @@ def testExportClipVitLarge14(self):
if platform.system() != "Windows":
os.remove(current_args["external_weight_path"])
os.remove(current_args["vmfb_path"])
del current_args
del turbine

def testExportClipModel(self):
current_args = copy.deepcopy(default_arguments)
Expand Down Expand Up @@ -190,7 +193,10 @@ def testExportClipModel(self):
if platform.system() != "Windows":
os.remove(current_args["external_weight_path"])
os.remove(current_args["vmfb_path"])
del current_args
del turbine

@unittest.expectedFailure
def testExportUnetModel(self):
current_args = copy.deepcopy(default_arguments)
blob_name = unet.export_unet_model(
Expand Down Expand Up @@ -301,6 +307,7 @@ def testExportVaeModelDecode(self):
new_blob_name = blob_name.split(".")
new_blob_name = new_blob_name[0] + "-pass.mlir"
turbine_tank.changeBlobName(blob_name, new_blob_name)
del current_args
del torch_output
del turbine
os.remove("stable_diffusion_v1_4_vae.safetensors")
Expand Down Expand Up @@ -352,6 +359,8 @@ def testExportVaeModelEncode(self):
turbine_tank.changeBlobName(blob_name, new_blob_name)
os.remove("stable_diffusion_v1_4_vae.safetensors")
os.remove("stable_diffusion_v1_4_vae.vmfb")
del current_args
del turbine

@unittest.expectedFailure
def testExportPNDMScheduler(self):
Expand Down Expand Up @@ -405,6 +414,7 @@ def testExportPNDMScheduler(self):
turbine_tank.changeBlobName(blob_name, new_blob_name)
os.remove("stable_diffusion_v1_4_scheduler.safetensors")
os.remove("stable_diffusion_v1_4_scheduler.vmfb")
del current_args
del torch_output
del turbine

Expand Down
Loading