pip install accelerate from diffusers import DiffusionPipeline pipeline=DiffusionPipeline.from_pretrained("THUDM/CogVideoX-2b") def generate_output(): output = pipeline("your input prompt here") return output if __name__ == "__main__": result = generate_output() print(result)