Skip to content

Commit

Permalink
use better context manager to fix potential problems
Browse files Browse the repository at this point in the history
  • Loading branch information
lllyasviel committed Feb 8, 2024
1 parent 760f727 commit 291ec74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules_forge/forge_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class WeightsLoader(torch.nn.Module):
return ForgeSD(model_patcher, clip, vae, clipvision)


@torch.inference_mode()
@torch.no_grad()
def load_model_for_a1111(timer, checkpoint_info=None, state_dict=None):
a1111_config_filename = find_checkpoint_config(state_dict, checkpoint_info)
a1111_config = OmegaConf.load(a1111_config_filename)
Expand Down

0 comments on commit 291ec74

Please sign in to comment.