mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
add demofusion
This commit is contained in:
@@ -757,6 +757,8 @@ def validate_sample(tensor):
|
||||
sample = 255.0 * np.moveaxis(tensor.cpu().numpy(), 0, 2)
|
||||
else:
|
||||
sample = 255.0 * tensor
|
||||
if isinstance(tensor, torch.Tensor):
|
||||
sample = sample.detach().cpu().numpy()
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
cast = sample.astype(np.uint8)
|
||||
if len(w) > 0:
|
||||
|
||||
Reference in New Issue
Block a user