sayakpaul HF Staff commited on
Commit
1adac55
·
verified ·
1 Parent(s): 0a64cad

Update optimization.py

Browse files
Files changed (1) hide show
  1. optimization.py +2 -2
optimization.py CHANGED
@@ -123,8 +123,8 @@ def optimize_pipeline_(pipeline: Callable[P, Any], *args: P.args, **kwargs: P.kw
123
  transformer_dtype = pipeline.transformer.dtype
124
  cache_context = pipeline.transformer.cache_context
125
 
126
- with torch.no_grad():
127
- combined_transformer(**call.kwargs)
128
 
129
  pipeline.transformer = combined_transformer
130
  # pipeline.transformer = cudagraph(combined_transformer)
 
123
  transformer_dtype = pipeline.transformer.dtype
124
  cache_context = pipeline.transformer.cache_context
125
 
126
+ # with torch.no_grad():
127
+ # combined_transformer(**call.kwargs)
128
 
129
  pipeline.transformer = combined_transformer
130
  # pipeline.transformer = cudagraph(combined_transformer)