The Communications Act does not contain a specific definition of the key terms used in the definition of the offence in section 127(1),
A person is guilty of an offence if he—
(a) sends by means of a public electronic communications network a message or other matter that is grossly offensive or of an indecent, obscene or menacing character; or
(b) causes any such message or matter to be so sent.
These words, "grossly offensive", "indecent", "obscene" and "menacing" fall to be interpreted as normal English words. In contrast, there is an obscenity test in the Obscene Publications Act 1959, s.1(1): that's met when the article has an effect "such as to tend to deprave and corrupt persons who are likely, having regard to all relevant circumstances, to read, see or hear the matter contained or embodied in it". (But then "deprave" and "corrupt" aren't defined terms.) Some other potentially overlapping offences are in the Malicious Communications Act 1988, and the Protection of Children Act 1978, similarly using undefined notions of indecency. There are also English common-law offences of outraging public decency, and of corrupting public morals, which are potentially salient. In Scotland, the common-law indecency offences have generally now been reformed into statutory offences specific to sexual indecency or abuse, which is not relevant to the videos being asked about here.
It is a question of fact whether a particular message has the character of being offensive, obscene, etc. Compare the speech by Lord Reid in Brutus v Cozens [1972] UKHL 6 on the word "insulting" (as used in the Public Order Act 1936):
The meaning of an ordinary word of the English language is not a question of law. [...] It is for the tribunal which decides the case to consider, not as law but as fact, whether in the whole circumstances the words of the statute do or do not as a matter of ordinary usage of the English language cover or apply to the facts which have been proved. [...]
Were it otherwise we should reach an impossible position. When considering the meaning of a word one often goes to a dictionary. There one finds other words set out. And if one wants to pursue the matter and find the meaning of those other words the dictionary will give the meaning of those other words in still farther words which often include the word for whose meaning one is searching. [...]
We were referred to a number of dictionary meanings of "insult" such as treating with insolence or contempt or indignity or derision or dishonour or offensive disrespect. Many things otherwise unobjectionable may be said or done in an insulting way. There can be no definition. But an ordinary sensible man knows an insult when he sees or hears it.
The authorities in this context also agree that it is not permissible for judges to try to elaborate on the statutory definition by providing their own form of words. The words that Parliament used are the ones which must be employed.
In relation to section 127 specifically, Lord Bingham ruled in DPP v Collins [2006] UKHL 40
that:
There can be no yardstick of gross offensiveness otherwise than by the application of reasonably enlightened, but not perfectionist, contemporary standards to the particular message sent in its particular context.
The House of Lords also agreed in that case that this offence has a mens rea element (not explicitly stated in the text of the Act). In addition to the message itself being offensive, the sender must intend it to be offensive, or be aware that it would be taken as such. That is not the case with outraging public decency, which can be found regardless of intent (R v Gibson and Sylveire [1990] 1 All ER 439), but is meant to refer to conduct which is so blatantly indecent that people are bound to be outraged (Knuller v DPP [1972] 2 All ER 898).
For the videos referred to in this question, the fact that they are AI-generated is irrelevant to whether they can be found to be obscene. Perhaps some people would find the use of AI to be tasteless in context. The extent to which the videos describe or depict violence against a child, and the nature of that coverage, is likely to be important in whether people would deem them grossly offensive. But as already described, there is no statutory test that elaborates on the specific terms used.