You can install comfyui
You must be registered to see the links
or A1111 stable diffusion web ui
You must be registered to see the links
these projects are open source and runs localy, just need to keep in mind you will need to download the pretrained models, you can train your own models there but actually on civitai exist a wide range curated models with so cool results...
Both projects has modules to run on command line to ask your prompts and take the generated art on your own app or game... if you only want to experiment i recomend comfy, is very easy to start... and kinda fun to use... but if you want to help with research, generate images with pretrained models is not really help... i mean.... if you really want to help on research, is better you try to train your own models there is where you can help others with your own experiments making models capable to generate stuff no one see before