(model, class_label, bs)
| 56 | |
| 57 | |
| 58 | def get_condition(model, class_label, bs): |
| 59 | uc = model.get_learned_conditioning( |
| 60 | {model.cond_stage_key: torch.tensor(bs * [1000]).to(model.device)} |
| 61 | ) |
| 62 | print("model.cond_stage_key: ", model.cond_stage_key) |
| 63 | c = model.get_learned_conditioning({model.cond_stage_key: class_label}) |
| 64 | print("c.shape: ", c.shape) |
| 65 | print('-' * 50) |
| 66 | return c, uc |
| 67 | |
| 68 | |
| 69 | def convsample_ddim_conditional(model, steps, shape, x_T, eta, scale, class_label): |
no test coverage detected