VideoStory/main.py

67 lines
3.3 KiB
Python
Raw Normal View History

2025-04-20 11:29:26 +02:00
import gen
import torch
import video
import os
SYSTEMPROMPTT = ""
SYSTEMPROMPTI = ""
SDBAD = "lowres, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature"
with open("promptUtoT.txt", "r") as file:
SYSTEMPROMPTT = file.readlines()[0]
with open("promptTtoI.txt", "r") as file:
SYSTEMPROMPTI = file.readlines()[0]
def main(prompt):
llm = gen.loadllama()
raw_text = gen.generate_story(prompt, SYSTEMPROMPTT, model=llm)
image_prompts = []
raw_text = raw_text.split("\n")
raw_text = [item for item in raw_text if item != ""]
for i in range(len(raw_text)):
promptimg = "Context:\n"
for l in range(0, i - 1):
promptimg += raw_text[l] + " "
promptimg += "Current Scene:\n" + raw_text[i]
image_prompts.append(gen.generate_story(promptimg, SYSTEMPROMPTI, model=llm).strip("\n"))
llm, speaker = gen.loadtts()
for i in range(len(raw_text)):
try:
gen.text_to_speech(raw_text[i], llm, speaker, i)
except:
pass
del llm
del speaker
torch.cuda.empty_cache()
llm = gen.loadsdxl()
for elem in range(len(image_prompts)):
gen.stableDiffusion(image_prompts[elem], SDBAD, llm, elem)
del llm
torch.cuda.empty_cache()
"""
llm = gen.loadsvd()
for elem in range(len([name for name in os.listdir('./images')])):
gen.stableVideoDiffusion(llm, f"./images/{elem}.png", elem)
del llm
torch.cuda.empty_cache()
"""
video.create_video_from_images_and_audio(".", ".", "out.mp4")
return None
main("Wirte an erotic story about a teenager girl who love sex. In this world, females are object who need to have sex to live. They love it and dream of sex since their childhood. Our protagonist live in the world of pokemons. The story start in her peacefull hometown. She meet friends, live a normale life. One day, when she was in her garden watering plants, an army from the next kingdom attacked the village. The vilage was easilly defeated. Females, childs and adults alike, got rape by the soldiers and their pokemons, and she wasn't an exception, she was forced to have sex with a pokemon for five straight days [Describe thouroughly the sex scene]. And she loved it, as always. After this event, the soldiers brought all the females in underground prison, converted in a breeding farm to make new solldiers and pokemons fasters. Here, she had sex non stop with a lots of differents pokemons [Decribe a least 3 sex scene here with description like, the look of the pokemon, how the pokemon genitals penetrated her, the look of here pussy while having sex, etc, pokemon can have tentacles or mate like dogs, decribe the mating method of each of them]. During 1 year she had non stop sex, until the kingdom lose. Now she enjoy the life of national slut, and only mate with the finest pokemons and peoples, in a new kingdom, but now she have no rights and love that.")