text
stringlengths 0
284
|
|---|
if(output_dir==""):
|
output_dir = str(p.seed)
|
else:
|
output_dir = output_dir + "-" + str(p.seed)
|
loopback_wave_path = os.path.join(p.outpath_samples, "loopback-wave")
|
loopback_wave_images_path = os.path.join(loopback_wave_path, output_dir)
|
os.makedirs(loopback_wave_images_path, exist_ok=True)
|
p.outpath_samples = loopback_wave_images_path
|
prompts = prompts.strip()
|
if save_prompts:
|
with open(loopback_wave_images_path + "-prompts.txt", "w") as f:
|
generation_settings = [
|
"Generation Settings",
|
f"Total Frames: {frames}",
|
f"Frames Per Wave: {frames_per_wave}",
|
f"Wave Offset: {denoising_strength_change_offset}",
|
f"Base Denoising Strength: {initial_denoising_strength}",
|
f"Max Additional Denoise: {denoising_strength_change_amplitude}",
|
f"Initial Image Number: {initial_image_number}",
|
"",
|
"Video Encoding Settings",
|
f"Save Video: {save_video}"
|
]
|
if save_video:
|
generation_settings = generation_settings + [
|
f"Framerate: {video_fps}",
|
f"Quality: {video_quality}",
|
f"Encoding: {video_encoding}",
|
f"Create Segmented Video: {segment_video}"
|
]
|
if segment_video:
|
generation_settings = generation_settings + [f"Segment Duration: {video_segment_duration}"]
|
generation_settings = generation_settings + [
|
"",
|
"Prompt Details",
|
"Initial Prompt:" + p.prompt,
|
"",
|
"Negative Prompt:" + p.negative_prompt,
|
"",
|
"Frame change prompts:",
|
prompts
|
]
|
f.write('\n'.join(generation_settings))
|
if prompts:
|
lines = prompts.split("\n")
|
for prompt_line in lines:
|
params = prompt_line.split("::")
|
if len(params) == 2:
|
changes_dict[params[0]] = { "prompt": params[1] }
|
elif len(params) == 3:
|
changes_dict[params[0]] = { "seed": params[1], "prompt": params[2] }
|
else:
|
raise IOError(f"Invalid input in prompt line: {prompt_line}")
|
raw_prompt = p.prompt
|
for n in range(batch_count):
|
history = []
|
# Reset to original init image at the start of each batch
|
p.init_images = original_init_image
|
seed_state = "adding"
|
current_seed = p.seed
|
for i in range(frames):
|
current_seed = p.seed
|
state.job = ""
|
if str(i) in changes_dict:
|
raw_prompt = changes_dict[str(i)]["prompt"]
|
state.job = "New prompt: %s\n" % raw_prompt
|
if "seed" in changes_dict[str(i)]:
|
current_seed = changes_dict[str(i)]["seed"]
|
if current_seed.startswith("+"):
|
seed_state = "adding"
|
current_seed = current_seed.strip("+")
|
elif current_seed.startswith("-"):
|
seed_state = "subtracting"
|
current_seed = current_seed.strip("-")
|
else:
|
seed_state = "constant"
|
current_seed = int(current_seed)
|
p.seed = current_seed
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.