akhaliq HF Staff commited on
Commit
b5f13cd
·
verified ·
1 Parent(s): b4de670

Update app.py from anycoder

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -74,14 +74,22 @@ def get_duration(
74
  width: int,
75
  num_inference_steps: int,
76
  guidance_scale: float,
77
- seed: int
 
78
  ) -> int:
79
  """
80
  Dynamic duration function for ZeroGPU.
81
  Calculates estimated runtime based on inference steps.
82
 
83
  Args:
84
- Same inputs as process_image function
 
 
 
 
 
 
 
85
 
86
  Returns:
87
  Estimated duration in seconds
 
74
  width: int,
75
  num_inference_steps: int,
76
  guidance_scale: float,
77
+ seed: int,
78
+ progress: gr.Progress = None
79
  ) -> int:
80
  """
81
  Dynamic duration function for ZeroGPU.
82
  Calculates estimated runtime based on inference steps.
83
 
84
  Args:
85
+ image: Input PIL Image
86
+ prompt: Text prompt describing the desired transformation
87
+ height: Output height (must be multiple of 32)
88
+ width: Output width (must be multiple of 32)
89
+ num_inference_steps: Number of diffusion steps
90
+ guidance_scale: Guidance scale for diffusion
91
+ seed: Random seed for reproducibility
92
+ progress: Gradio progress tracker (passed automatically by Gradio 6)
93
 
94
  Returns:
95
  Estimated duration in seconds