Commit 26f041c6 authored by wuxk1's avatar wuxk1
Browse files

fix optim for test6

parent 000fbec3
...@@ -292,7 +292,7 @@ def test2(server_url: str): ...@@ -292,7 +292,7 @@ def test2(server_url: str):
logger.info(f'\n========> {os.path.basename(workflow_file)} <========') logger.info(f'\n========> {os.path.basename(workflow_file)} <========')
recorder = TimingRecorder() recorder = TimingRecorder()
for idx, (image1, image2) in enumerate(test_images[:2]): for idx, (image1, image2) in enumerate(test_images):
api_prompt["158"]["inputs"]["image"] = image1 api_prompt["158"]["inputs"]["image"] = image1
api_prompt["161"]["inputs"]["image"] = image2 api_prompt["161"]["inputs"]["image"] = image2
task_id = str(uuid.uuid4()).replace('-', '') task_id = str(uuid.uuid4()).replace('-', '')
...@@ -435,7 +435,8 @@ def test5(server_url: str): ...@@ -435,7 +435,8 @@ def test5(server_url: str):
def test6(server_url: str): def test6(server_url: str):
"""Test Qwen image edit workflow with different weight types""" """Test Qwen image edit workflow with different weight types"""
workflow_name = "6-qwen-image-edit.json" #workflow_name = "6-qwen-image-edit.json"
workflow_name = "6-qwen-image-edit_torchcompile.json"
workflow_file = os.path.join(CURRENT_DIR, "workflows", workflow_name) workflow_file = os.path.join(CURRENT_DIR, "workflows", workflow_name)
with open(workflow_file) as f: with open(workflow_file) as f:
...@@ -460,9 +461,12 @@ def test6(server_url: str): ...@@ -460,9 +461,12 @@ def test6(server_url: str):
image_mapping = {} image_mapping = {}
for weight_dtype in ['default', 'fp8_e4m3fn', 'fp8_e4m3fn_fast']: for weight_dtype in ['default', 'fp8_e4m3fn', 'fp8_e4m3fn_fast'][::2]:
logger.info(f'\n========> {workflow_name} {weight_dtype} <========') logger.info(f'\n========> {workflow_name} {weight_dtype} <========')
recorder = TimingRecorder() recorder = TimingRecorder()
if weight_dtype == "fp8_e4m3fn_fast":
api_prompt["236"]["inputs"]["unet_name"] = "Qwen-Image-Edit-2509-smooth-int8.safetensors"
for idx, (image1, image2) in enumerate(test_cases): for idx, (image1, image2) in enumerate(test_cases):
api_prompt["247"]["inputs"]["image"] = image1 api_prompt["247"]["inputs"]["image"] = image1
...@@ -587,7 +591,7 @@ if __name__ == "__main__": ...@@ -587,7 +591,7 @@ if __name__ == "__main__":
#test1(server_url) #test1(server_url)
# Test clothing change workflow # Test clothing change workflow
test2(server_url) #test2(server_url)
# Test flux.1-dev t2i workflows # Test flux.1-dev t2i workflows
#os.path.join(CURRENT_DIR, "workflows", "3-flux.1-dev-t2i.json"), #os.path.join(CURRENT_DIR, "workflows", "3-flux.1-dev-t2i.json"),
...@@ -606,13 +610,13 @@ if __name__ == "__main__": ...@@ -606,13 +610,13 @@ if __name__ == "__main__":
# ) # )
# Test golden human portrait workflow # Test golden human portrait workflow
#test5(server_url) test5(server_url)
# Test Qwen image edit workflow # Test Qwen image edit workflow
#test6(server_url) #test6(server_url)
# Test old photo restoration workflow # Test old photo restoration workflow
#test7(server_url) test7(server_url)
#test7(server_url) #test7(server_url)
#test7(server_url) #test7(server_url)
......
...@@ -266,8 +266,8 @@ ...@@ -266,8 +266,8 @@
"backend": "inductor", "backend": "inductor",
"fullgraph": false, "fullgraph": false,
"mode": "default", "mode": "default",
"compile_encoder": true, "compile_encoder": false,
"compile_decoder": true, "compile_decoder": false,
"vae": [ "vae": [
"238", "238",
0 0
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
"backend": "inductor", "backend": "inductor",
"fullgraph": false, "fullgraph": false,
"mode": "default", "mode": "default",
"dynamic": false, "dynamic": true,
"compile_transformer_blocks_only": true, "compile_transformer_blocks_only": true,
"dynamo_cache_size_limit": 64, "dynamo_cache_size_limit": 64,
"model": [ "model": [
...@@ -296,4 +296,4 @@ ...@@ -296,4 +296,4 @@
"title": "TorchCompileModelQwenImage" "title": "TorchCompileModelQwenImage"
} }
} }
} }
\ No newline at end of file
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