Commit ccfcd437 authored by kurumuz's avatar kurumuz

fix ddim img2img

parent c1b0e089
......@@ -210,6 +210,8 @@ class StableDiffusionModel(nn.Module):
#request.sampler = "ddim_img2img" #enforce ddim for now
if request.sampler == "plms":
request.sampler = "k_lms"
if request.sampler == "ddim":
request.sampler = "ddim_img2img"
self.ddim.make_schedule(ddim_num_steps=request.steps, ddim_eta=request.ddim_eta, verbose=False)
start_code = encode_image(request.image, self.model.first_stage_model).to(self.device)
start_code = self.model.get_first_stage_encoding(start_code)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment