Spaces:
Starting
on
T4
Starting
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -34,6 +34,8 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed):
|
|
34 |
return image
|
35 |
|
36 |
if Model == "Club":
|
|
|
|
|
37 |
pipe = CogView4Pipeline.from_pretrained("THUDM/CogView4-6B", torch_dtype=torch.bfloat16)
|
38 |
# Open it for reduce GPU memory usage
|
39 |
pipe.enable_model_cpu_offload()
|
|
|
34 |
return image
|
35 |
|
36 |
if Model == "Club":
|
37 |
+
torch.cuda.max_memory_allocated(device=device)
|
38 |
+
torch.cuda.empty_cache()
|
39 |
pipe = CogView4Pipeline.from_pretrained("THUDM/CogView4-6B", torch_dtype=torch.bfloat16)
|
40 |
# Open it for reduce GPU memory usage
|
41 |
pipe.enable_model_cpu_offload()
|