parsee-mizuhashi commited on
Commit
7222f5b
1 Parent(s): 6cf3c37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -18,7 +18,8 @@ if not Path("model.safetensors").exists():
18
  with open("model.safetensors", "wb") as f:
19
  f.write(requests.get("https://huggingface.co/parsee-mizuhashi/mangaka/resolve/main/mangaka.safetensors?download=true").content)
20
  MODEL_FILE = "model.safetensors"
21
- unet, clip, vae = comfy.sd.load_checkpoint_guess_config(MODEL_FILE, output_vae=True, output_clip=True)[:3]# :3
 
22
  BASE_NEG = "(low-quality worst-quality:1.4 (bad-anatomy (inaccurate-limb:1.2 bad-composition inaccurate-eyes extra-digit fewer-digits (extra-arms:1.2)"
23
  DEVICE = "cpu" if not torch.cuda.is_available() else "cuda"
24
 
 
18
  with open("model.safetensors", "wb") as f:
19
  f.write(requests.get("https://huggingface.co/parsee-mizuhashi/mangaka/resolve/main/mangaka.safetensors?download=true").content)
20
  MODEL_FILE = "model.safetensors"
21
+ with torch.no_grad():
22
+ unet, clip, vae = comfy.sd.load_checkpoint_guess_config(MODEL_FILE, output_vae=True, output_clip=True)[:3]# :3
23
  BASE_NEG = "(low-quality worst-quality:1.4 (bad-anatomy (inaccurate-limb:1.2 bad-composition inaccurate-eyes extra-digit fewer-digits (extra-arms:1.2)"
24
  DEVICE = "cpu" if not torch.cuda.is_available() else "cuda"
25