Collective acceleration of protons and deuterons is compared in the same geometry of a Luce diode with a polyethylene anode at an accelerating diode voltage of 250 kV, current and pulse duration of relativistic electrons up to 30 kA and 90 ns, respectively. The accelerated ions were intercepted by B4C, BN, and AlN plates, in which analytical radionuclides were produced according to nuclear reactions 10B( p , α)7Be, 12C( p, γ)13N, 10B( d , n )11C, 12C( d , n )13N, 14N( d , n )15O and 27Al( d , p )28Al. The ion energy was determined according to the ratios of activity of the analytical radionuclides, while the number of accelerated ions was calculated from the number of induced nuclei of the radionuclides. It was found that the velocities of the main group of protons and deuterons were the same within the measurement error, and the average number of ions accelerated in one pulse was, on average, 3 times higher when protons were accelerated.