azadef / scenegenie

MIT License
2 stars 0 forks source link

Error while running txt2img.py #2

Open Saumya-Gupta-26 opened 1 month ago

Saumya-Gupta-26 commented 1 month ago

Hello again! I tried running txt2img.py as per the command in the README.md. I am getting a few errors, I was wondering if you could help me resolve them :D

Case 1

If I run the command with the --data_source coco argument, then I get the following error. Looks like a particular folder is missing.

Command: python scripts/txt2img.py --scene_genie --data_source coco --ddim_eta 0.0 --n_samples 4 --n_iter 4 --scale 5.0 --ddim_steps 50 --prompt "two eggs in a pan" --outdir "my-outputs/"

Error:

Traceback (most recent call last):
  File "scripts/txt2img.py", line 174, in <module>
    with open(
FileNotFoundError: [Errno 2] No such file or directory: './scenegenie/predicted_1110/SG2IM_CLIP/COCO//caption/0_caption'

Case 2

If I run the command with the --data_source xyz argument, then I get the following error. I am not sure what it means.

Command: python scripts/txt2img.py --scene_genie --data_source xyz --ddim_eta 0.0 --n_samples 4 --n_iter 4 --scale 5.0 --ddim_steps 50 --prompt "two eggs in a pan" --outdir "my-outputs/"

Error:

Sampling:   0%|                                                                                                                                             | 0/4 [00:00<?, ?it/s]Data shape for DDIM sampling is (4, 4, 32, 32), eta 0.0
Running DDIM Sampling with 50 timesteps
DDIM Sampler:   0%|                                                                                                                                        | 0/50 [00:01<?, ?it/s]
Sampling:   0%|                                                                                                                                             | 0/4 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "scripts/txt2img.py", line 244, in <module>
    samples_ddim, _ = sampler.sample(S=opt.ddim_steps,
  File "/home/saumgupta/.conda/envs/ldm/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/data/saumgupta/diffusion-repositories/scenegenie/ldm/models/diffusion/ddim.py", line 95, in sample
    samples, intermediates = self.ddim_sampling(conditioning, size,
  File "/home/saumgupta/.conda/envs/ldm/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/data/saumgupta/diffusion-repositories/scenegenie/ldm/models/diffusion/ddim.py", line 148, in ddim_sampling
    outs = self.p_sample_ddim(img, cond, ts, index=index, use_original_steps=ddim_use_original_steps,
  File "/home/saumgupta/.conda/envs/ldm/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/data/saumgupta/diffusion-repositories/scenegenie/ldm/models/diffusion/ddim.py", line 181, in p_sample_ddim
    e_t = score_corrector.modify_score(self.model, e_t, x, t, c, **corrector_kwargs)
TypeError: modify_score() argument after ** must be a mapping, not NoneType

I would really appreciate it if you could help me with this. Thank you ^^