Jordan Legg commited on
Commit
f37eddd
Β·
1 Parent(s): fd56722
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -95,8 +95,9 @@ def infer(prompt, init_image=None, seed=42, randomize_seed=False, width=1024, he
95
 
96
  try:
97
  print("Calling the transformer with latents")
98
- # Dummy call to transformer to understand the shape requirement
99
- _ = pipe.transformer(latents)
 
100
  print("Transformer call succeeded")
101
  except Exception as e:
102
  print(f"Transformer call failed with error: {e}")
@@ -120,9 +121,6 @@ def infer(prompt, init_image=None, seed=42, randomize_seed=False, width=1024, he
120
  print("Inference complete")
121
  return image, seed
122
 
123
-
124
-
125
-
126
  # Define example prompts
127
  examples = [
128
  "a tiny astronaut hatching from an egg on the moon",
 
95
 
96
  try:
97
  print("Calling the transformer with latents")
98
+ # Initialize timestep variable
99
+ timestep = torch.tensor([num_inference_steps], device=device, dtype=dtype)
100
+ _ = pipe.transformer(latents, timestep=timestep)
101
  print("Transformer call succeeded")
102
  except Exception as e:
103
  print(f"Transformer call failed with error: {e}")
 
121
  print("Inference complete")
122
  return image, seed
123
 
 
 
 
124
  # Define example prompts
125
  examples = [
126
  "a tiny astronaut hatching from an egg on the moon",