Compare commits

..

1 Commits

Author SHA1 Message Date
Pam
957c6892ff
Merge fa87f263ce into 4209edf48d 2025-01-07 00:12:43 -07:00
2 changed files with 3 additions and 9 deletions

View File

@ -1,7 +1,6 @@
import os import os
import json import json
from aiohttp import web from aiohttp import web
import logging
class AppSettings(): class AppSettings():
@ -12,12 +11,8 @@ class AppSettings():
file = self.user_manager.get_request_user_filepath( file = self.user_manager.get_request_user_filepath(
request, "comfy.settings.json") request, "comfy.settings.json")
if os.path.isfile(file): if os.path.isfile(file):
try:
with open(file) as f: with open(file) as f:
return json.load(f) return json.load(f)
except:
logging.error(f"The user settings file is corrupted: {file}")
return {}
else: else:
return {} return {}

View File

@ -227,9 +227,8 @@ class T5(torch.nn.Module):
super().__init__() super().__init__()
self.num_layers = config_dict["num_layers"] self.num_layers = config_dict["num_layers"]
model_dim = config_dict["d_model"] model_dim = config_dict["d_model"]
inner_dim = config_dict["d_kv"] * config_dict["num_heads"]
self.encoder = T5Stack(self.num_layers, model_dim, inner_dim, config_dict["d_ff"], config_dict["dense_act_fn"], config_dict["is_gated_act"], config_dict["num_heads"], config_dict["model_type"] != "umt5", dtype, device, operations) self.encoder = T5Stack(self.num_layers, model_dim, model_dim, config_dict["d_ff"], config_dict["dense_act_fn"], config_dict["is_gated_act"], config_dict["num_heads"], config_dict["model_type"] != "umt5", dtype, device, operations)
self.dtype = dtype self.dtype = dtype
self.shared = operations.Embedding(config_dict["vocab_size"], model_dim, device=device, dtype=dtype) self.shared = operations.Embedding(config_dict["vocab_size"], model_dim, device=device, dtype=dtype)