Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

img2img_k.py - variable typo: Line 282: x_samples should be: x_samples_ddim #124

Closed
Tollanador opened this issue Aug 30, 2022 · 1 comment

Comments

@Tollanador
Copy link

Simple typo in img2img_k.py as per below.
line 282: x_samples should be: x_samples_ddim

                    samples_ddim = K.sampling.sample_lms(model_wrap_cfg, xi, sigma_sched, extra_args=extra_args, disable=not accelerator.is_main_process)
                    x_samples_ddim = model.decode_first_stage(samples_ddim)
                    x_samples_ddim = torch.clamp((x_samples_ddim + 1.0) / 2.0, min=0.0, max=1.0)
                    x_samples_ddim = accelerator.gather(x_samples_ddim)

                    if accelerator.is_main_process and not opt.skip_save:
                        for x_sample in x_samples:
                            x_sample = 255. * rearrange(x_sample.cpu().numpy(), 'c h w -> h w c')
                            Image.fromarray(x_sample.astype(np.uint8)).save(
                                os.path.join(sample_path, f"{base_count:05}.png"))
                            base_count += 1
                            
                    if accelerator.is_main_process and not opt.skip_grid:
                        all_samples.append(x_samples_ddim)

image

@hlky
Copy link

hlky commented Aug 30, 2022

Legacy script, unsupported. I don't know why you are trying to use that.

@hlky hlky closed this as completed Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants