Linoy Tsaban commited on
Commit
4809200
1 Parent(s): 7d42e44

Update tokenflow_pnp.py

Browse files
Files changed (1) hide show
  1. tokenflow_pnp.py +3 -2
tokenflow_pnp.py CHANGED
@@ -24,6 +24,7 @@ VAE_BATCH_SIZE = 10
24
 
25
  class TokenFlow(nn.Module):
26
  def __init__(self, config,
 
27
  frames=None,
28
  # latents = None,
29
  inverted_latents = None):
@@ -47,8 +48,8 @@ class TokenFlow(nn.Module):
47
  # Create SD models
48
  print('Loading SD model')
49
 
50
- pipe = StableDiffusionPipeline.from_pretrained(model_key, torch_dtype=torch.float16).to("cuda")
51
- pipe.enable_xformers_memory_efficient_attention()
52
 
53
  self.vae = pipe.vae
54
  self.tokenizer = pipe.tokenizer
 
24
 
25
  class TokenFlow(nn.Module):
26
  def __init__(self, config,
27
+ pipe,
28
  frames=None,
29
  # latents = None,
30
  inverted_latents = None):
 
48
  # Create SD models
49
  print('Loading SD model')
50
 
51
+ # pipe = StableDiffusionPipeline.from_pretrained(model_key, torch_dtype=torch.float16).to("cuda")
52
+ # pipe.enable_xformers_memory_efficient_attention()
53
 
54
  self.vae = pipe.vae
55
  self.tokenizer = pipe.tokenizer