Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
Β·
20f9740
1
Parent(s):
408fc5d
Update app.py
Browse files
app.py
CHANGED
@@ -338,6 +338,11 @@ def load_image( infilename ) :
|
|
338 |
data = np.asarray( img, dtype="int32" )
|
339 |
return data
|
340 |
def throttled_inference(text, seed, step_size, max_iterations, width, height):
|
|
|
|
|
|
|
|
|
|
|
341 |
global inferences_running
|
342 |
current = inferences_running
|
343 |
if current >= 2:
|
|
|
338 |
data = np.asarray( img, dtype="int32" )
|
339 |
return data
|
340 |
def throttled_inference(text, seed, step_size, max_iterations, width, height):
|
341 |
+
t = torch.cuda.get_device_properties(0).total_memory
|
342 |
+
r = torch.cuda.memory_reserved(0)
|
343 |
+
a = torch.cuda.memory_allocated(0)
|
344 |
+
f = r-a # free inside reserved
|
345 |
+
print(f)
|
346 |
global inferences_running
|
347 |
current = inferences_running
|
348 |
if current >= 2:
|