Fix Qwen Decode

This commit is contained in:
JasonHoku
2026-02-06 15:47:57 -08:00
parent 04386c19b7
commit 22ecccfbb8
2 changed files with 12 additions and 13 deletions
+11 -12
View File
@@ -78,10 +78,18 @@ def decode_latent_with_vae(vae, latent_samples):
# Convert to PIL Image
img_np = decoded.cpu().numpy()
img_np = np.clip(img_np[0] * 255, 0, 255).astype(np.uint8)
# Remove extra dimensions (handle shapes like (1, 1, H, W, C) or (1, H, W, C))
while img_np.ndim > 3:
img_np = img_np[0]
# Now should be (H, W, C) or (C, H, W)
img_np = np.clip(img_np * 255, 0, 255).astype(np.uint8)
# Handle different channel orders
if img_np.shape[0] == 3: # CHW format
if img_np.shape[0] == 3 and img_np.ndim == 3: # CHW format
img_np = np.transpose(img_np, (1, 2, 0))
elif img_np.shape[-1] != 3 and img_np.ndim == 3: # Not HWC format
img_np = np.transpose(img_np, (1, 2, 0))
return Image.fromarray(img_np)
@@ -293,24 +301,15 @@ def flush_batch_with_vae(pending_batch, vae, img_dir, existing_data, session_nam
# Get meta, use empty dict if not present
manifest_meta = existing_data.get("meta", {})
# Debug: print what we're sending
print(f"[GridTester] 📡 Sending dashboard update for node: {unique_id}")
PromptServer.instance.send_sync("ultimate_grid.update", {
"node": unique_id,
"session_name": session_name,
"new_items": [meta],
"meta": manifest_meta
})
print(f"[GridTester] ✅ Dashboard update sent successfully")
except (ImportError, KeyError) as e:
except (ImportError, KeyError):
# Silently ignore dashboard update errors
print(f"[GridTester] ⚠️ Dashboard update error (silently ignored): {e}")
pass
except Exception as e:
print(f"[GridTester] ⚠️ Unexpected dashboard error: {e}")
import traceback
traceback.print_exc()
saved_count += 1
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "ultimate-auto-sampler-config-grid-testing-suite"
description = "ComfyUI Sampler testing & benchmarking tool for testing Stable Diffusion samplers, schedulers, CFG scales, prompts, img2img denoise values, and LoRA combinations. Features infinite-canvas dashboard image grids with virtual scrolling that can handle thousands of images, multi-model comparison, automatic resume on interrupt, and real-time visualization. Test entire checkpoint folders, stack multiple LoRAs, generate random seed variations, and export optimized configs. Includes fullscreen mode, keyboard navigation, smart filtering by parameters, and one-click regeneration workflow. Perfect for sampler output optimization and hyperparameter tuning."
version = "1.1.3"
version = "1.1.4"
license = {file = "LICENSE"}
classifiers = [
# # For OS-independent nodes (works on all operating systems)