Skip to content

Commit

Permalink
Fix optimization eval
Browse files Browse the repository at this point in the history
  • Loading branch information
carson-katri committed Apr 29, 2023
1 parent a11bc18 commit db77f56
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions diffusers_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def list_schedulers(self, context) -> List[str]:
def optimizations(self) -> Optimizations:
optimizations = Optimizations()
for prop in dir(self):
if hasattr(optimizations, prop):
if hasattr(optimizations, prop) and not prop.startswith('__'):
setattr(optimizations, prop, getattr(self, prop))
if self.attention_slice_size_src == 'auto':
optimizations.attention_slice_size = 'auto'
Expand All @@ -126,10 +126,6 @@ def generate(self, task: Task, model: Model, prompt: Prompt, size: Tuple[int, in
future: Future
match task:
case PromptToImage():
print(common_kwargs)
import pickle
del common_kwargs['optimizations'].__annotations__
print(pickle.dumps(common_kwargs))
future = gen.prompt_to_image(**common_kwargs)
case ImageToImage(image=image, strength=strength, fit=fit):
future = gen.image_to_image(image=image, fit=fit, strength=strength, **common_kwargs)
Expand Down

0 comments on commit db77f56

Please sign in to comment.