Skip to content

Commit

Permalink
benchmark: add revsiion when loading pretrianed models for half preci…
Browse files Browse the repository at this point in the history
…sion benchmark
  • Loading branch information
chuanli11 committed Oct 3, 2022
1 parent 37b5afd commit 2469d61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def get_inference_pipeline(precision, backend):
if backend == "pytorch":
pipe = StableDiffusionPipeline.from_pretrained(
"CompVis/stable-diffusion-v1-4",
revision="main" if precision == "single" else "fp16",
use_auth_token=os.environ["ACCESS_TOKEN"],
torch_dtype=torch.float32 if precision == "single" else torch.float16,
)
Expand Down

0 comments on commit 2469d61

Please sign in to comment.