The model and pipe is here
https://github.com/NVlabs/Sana
How i tried is below. the app works, but 0 difference on VRAM or output
def load_model(config_path, model_path):
global pipe
if pipe is None:
if torch.cuda.is_available():
try:
pipe = SanaPipeline(config_path)
pipe.from_pretrained(model_path)
pipe.register_progress_bar(gr.Progress())
pipe = convert_model(pipe, splits=4)
print("model converted")
return True, "Model loaded successfully"
except Exception as e:
return False, f"Error loading model: {str(e)}"
return True, "Model already loaded"