random seeds
This commit is contained in:
parent
179a42b9bf
commit
5ea7981a9c
|
@ -14,22 +14,63 @@ pretrained_model_name_or_path = "stabilityai/stable-diffusion-xl-base-1.0"
|
|||
|
||||
pipe = AutoPipelineForText2Image.from_pretrained(pretrained_model_name_or_path, torch_dtype=torch.float16, variant="fp16")
|
||||
pipe.to('cuda')
|
||||
be = BlendingEngine(pipe)
|
||||
|
||||
be = BlendingEngine(pipe, do_compile=True)
|
||||
be.set_negative_prompt("blurry, pale, low-res, lofi")
|
||||
# %% Let's setup the multi transition
|
||||
fps = 30
|
||||
duration_single_trans = 10
|
||||
be.set_dimensions((1024, 1024))
|
||||
nmb_prompts = 20
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Specify a list of prompts below
|
||||
#%%
|
||||
|
||||
list_prompts = []
|
||||
list_prompts.append("Photo of a house, high detail")
|
||||
list_prompts.append("Photo of an elephant in african savannah")
|
||||
list_prompts.append("photo of a house, high detail")
|
||||
list_prompts.append("high resolution ultra 8K image with lake and forest")
|
||||
# list_prompts.append("strange and alien desolate lanscapes 8K")
|
||||
# list_prompts.append("ultra high res psychedelic skyscraper city landscape 8K unreal engine")
|
||||
list_prompts = list_prompts*10
|
||||
|
||||
be.set_prompt1(list_prompts[0])
|
||||
be.compute_latents1(True)
|
||||
|
||||
#img = pipe(list_prompts[0]).images[0]
|
||||
|
||||
|
||||
#%%
|
||||
# import os
|
||||
# import random
|
||||
|
||||
# # Directory containing the text files
|
||||
# dir_prompts = "/raid/data/diffusion/flamengalo/prompts_surreal"
|
||||
|
||||
# # List to store the contents of selected text files
|
||||
# list_prompts = []
|
||||
|
||||
# # List all files in the directory
|
||||
# file_list = os.listdir(dir_prompts)
|
||||
|
||||
# # Shuffle the file list to get random files
|
||||
# random.shuffle(file_list)
|
||||
|
||||
# # Loop through the first nmb_prompts files and read their contents
|
||||
# for filename in file_list[:nmb_prompts]:
|
||||
# file_path = os.path.join(dir_prompts, filename)
|
||||
# try:
|
||||
# with open(file_path, 'r') as file:
|
||||
# content = file.read()
|
||||
# list_prompts.append(content)
|
||||
# except Exception as e:
|
||||
# print(f"except {e}")
|
||||
#%%
|
||||
fp_movie = f'surreal_nmb{len(list_prompts)}.mp4'
|
||||
# Specify the seeds
|
||||
list_seeds = np.random.randint(0, 10^9, len(list_prompts))
|
||||
fp_movie = 'movie_example2.mp4'
|
||||
list_seeds = np.random.randint(0, 1111111111111, len(list_prompts))
|
||||
|
||||
|
||||
|
||||
list_movie_parts = []
|
||||
|
|
Loading…
Reference in New Issue