Timesteps is not constant. #981
Unanswered
Prashant0664
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using https://colab.research.google.com/github/deforum-art/deforum-stable-diffusion/blob/main/Deforum_Stable_Diffusion.ipynb to generate small clip.
Using ddim sampler.
First image get generated with 50 timesteps, but after that images started generating using 17 timesteps(destroying quality). How to prevent this so that timesteps remain constant.
Please help!
My settings:
`def DeforumAnimArgs():
Load Settings:
`
#@markdown Load Settings
override_settings_with_file = False #@param {type:"boolean"}
settings_file = "custom" #@param ["custom", "512x512_aesthetic_0.json","512x512_aesthetic_1.json","512x512_colormatch_0.json","512x512_colormatch_1.json","512x512_colormatch_2.json","512x512_colormatch_3.json"]
custom_settings_file = "/content/drive/MyDrive/Settings.txt"#@param {type:"string"}
def DeforumArgs():
#@markdown Image Settings
W = 512 #@param
H = 512 #@param
W, H = map(lambda x: x - x % 64, (W, H)) # resize to integer multiple of 64
bit_depth_output = 8 #@param [8, 16, 32] {type:"raw"}
args_dict = DeforumArgs()
anim_args_dict = DeforumAnimArgs()
if override_settings_with_file:
load_args(args_dict, anim_args_dict, settings_file, custom_settings_file, verbose=False)
args = SimpleNamespace(**args_dict)
anim_args = SimpleNamespace(**anim_args_dict)
args.timestring = time.strftime('%Y%m%d%H%M%S')
args.strength = max(0.0, min(1.0, args.strength))
Load clip model if using clip guidance
if (args.clip_scale > 0) or (args.aesthetics_scale > 0):
root.clip_model = clip.load(args.clip_name, jit=False)[0].eval().requires_grad_(False).to(root.device)
if (args.aesthetics_scale > 0):
root.aesthetics_model = load_aesthetics_model(args, root)
if args.seed == -1:
args.seed = random.randint(0, 2**32 - 1)
if not args.use_init:
args.init_image = None
if args.sampler == 'plms' and (args.use_init or anim_args.animation_mode != 'None'):
print(f"Init images aren't supported with PLMS yet, switching to KLMS")
args.sampler = 'klms'
if args.sampler != 'ddim':
args.ddim_eta = 0
if anim_args.animation_mode == 'None':
anim_args.max_frames = 1
elif anim_args.animation_mode == 'Video Input':
args.use_init = True
clean up unused memory
gc.collect()
torch.cuda.empty_cache()
get prompts
cond, uncond = Prompts(prompt=prompts,neg_prompt=neg_prompts).as_dict()
dispatch to appropriate renderer
if anim_args.animation_mode == '2D' or anim_args.animation_mode == '3D':
render_animation(root, anim_args, args, cond, uncond)
elif anim_args.animation_mode == 'Video Input':
render_input_video(root, anim_args, args, cond, uncond)
elif anim_args.animation_mode == 'Interpolation':
render_interpolation(root, anim_args, args, cond, uncond)
else:
render_image_batch(root, args, cond, uncond)
`
Beta Was this translation helpful? Give feedback.
All reactions