Skip to content

Commit

Permalink
update test with compile
Browse files Browse the repository at this point in the history
  • Loading branch information
um1 committed Dec 28, 2023
1 parent dc4d53f commit c1da1fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ def get_id(img_path):
#if opt.fp16:
# model_structure = network_to_half(model_structure)

#if torch.cuda.get_device_capability()[0]>6: # should be >=7
# print("Compiling model...")
if torch.cuda.get_device_capability()[0]>6: # should be >=7
print("Compiling model...")
# https://huggingface.co/docs/diffusers/main/en/optimization/torch2.0
# model_structure = torch.compile(model_structure, mode="reduce-overhead", fullgraph=True) # pytorch 2.0
model_structure = torch.compile(model_structure, mode="reduce-overhead", fullgraph=True) # pytorch 2.0

model = load_network(model_structure)

Expand Down

0 comments on commit c1da1fc

Please sign in to comment.