The usage of WxNb(1−x)Se2 nanosheets as a rising ultrafast photonic device to generate high power mode-locked and Q-switched pulses in a fiber laser is demonstrated.