1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-10-27 21:33:02 +03:00

step by step debug

This commit is contained in:
sayakpaul
2023-10-09 15:36:27 +02:00
parent 86f5980ce8
commit 4087dbfbb6

View File

@@ -722,6 +722,7 @@ class ControlNetModel(
timesteps = timesteps.expand(sample.shape[0])
t_emb = self.time_proj(timesteps)
print(f"t_emb: {t_emb}")
# timesteps does not contain any weights and will always return f32 tensors
# but time_embedding might actually be running in fp16. so we need to cast here.
@@ -729,6 +730,8 @@ class ControlNetModel(
t_emb = t_emb.to(dtype=sample.dtype)
emb = self.time_embedding(t_emb, timestep_cond)
print(f"emb: {emb}")
aug_emb = None
if self.class_embedding is not None: