Mass scale anime waifu profile generator, run in Google Colab
Examples of generated results are placed in the above examples
folder. At default configuration (like in the examples), it takes about 10 secs each 10 pics.
You just need that aWaifu.ipynb
file, nothing more. Upload it to your Google Colab, and you are ready to go.
wget https://raw.githubusercontent.com/git-akihakune/aWaifu-Colab/main/aWaifu.ipynb
For those who just want to try it out, there are 3 switches right at the top of the script.
# Turn these on if you are too lazy to read the code
autoRun = False
autoSave = False
verbose = False
Ctrl+F9 to run all cells. As fast, as easy as possible.
For those who want to dig in, first create an Waifus
object:
waifuGen = Waifus(outputPath:str, numberOfProfiles:int, verbosity:bool, bigWaifu:bool, noProfile:bool, noImage:bool)
Here are the default arguments' values:
So there should be no problem if you define it with:
waifuGen = Waifus()
In short, here is the fundamental workflow:
waifuGen = Waifus(*whatever_option_you_want_here*) # configuring
waifuGen.generateProfiles() # Generating
waifuGen.getAllInfo() # Downloading
A list of available methods and their accepted arguments:
Waifus.cleanUpPreviousRuns() -> None # Delete data from previous executions
Waifus.showWaifuImages() -> None # Display all suitable images from 'waifus/' directory
Waifus.getAllInfo() -> None # Download 'waifus/' directory under zip format
Waifus.getRandomAge() -> None # Randomly generate an age
Waifus.getRandomRace(age:int) -> str # Randomly choose a race based on age
Waifus._vbose(contextType:str, context) -> None # Verbose logging 'context', based on its defined 'contextType'
Waifus._getRandomProfile(imagePath:str) -> 'json data' # Randomly generate a female profile
Waifus._getRandomImages(filename:str) -> None # Randomly generate a waifu image
Waifus.generateProfiles() -> None # Generate waifu images and profile
Not a lot of functions, but to save your precious time, in short, you just need Waifus.generateProfiles()
.
Ain't much. It uses Python WaifuLabs wrapper as well as Name Fake API - free to use and no token needed.
In my opinion, approximately 1 profile/sec is a pretty decent speed. But if you still want to go faster, you can look for a sleep
statement in the code, and remove it. However, this is not recommended.
Feel free to contribute, either by more codes or reporting issues. I know my code is not-very-readable,...
... but any help would be very appreciated.