GithubHelp home page GithubHelp logo

Comments (5)

ninele7 avatar ninele7 commented on July 28, 2024 2
diff --git a/AITemplate/AITemplate.py b/AITemplate/AITemplate.py
index 912978b..c440350 100644
--- a/AITemplate/AITemplate.py
+++ b/AITemplate/AITemplate.py
@@ -6,6 +6,7 @@ import comfy.sample
 import comfy.utils
 import comfy.sd
 import comfy.k_diffusion.external as k_diffusion_external
+from comfy.model_base import ModelType
 # so we can import nodes and latent_preview
 sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", ".."))
 import nodes
@@ -296,11 +297,11 @@ def sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative
         # Overrides sampler's model_denoise
         sampler.model_denoise = comfy.samplers.CFGNoisePredictor(model_wrapper)
         # Overrides sampler's model_wrap
-        if real_model.parameterization == "v":
+        if real_model.model_type == ModelType.V_PREDICTION:
             sampler.model_wrap = comfy.samplers.CompVisVDenoiser(sampler.model_denoise, quantize=True)
         else:
             sampler.model_wrap = k_diffusion_external.CompVisDenoiser(sampler.model_denoise, quantize=True)
-        sampler.model_wrap.parameterization = sampler.model.parameterization
+        sampler.model_wrap.model_type = sampler.model.model_type
         # Overrides sampler's model_k
         sampler.model_k = comfy.samplers.KSamplerX0Inpaint(sampler.model_wrap)

That patch fixes it for me (only using AIT for unet). But I'm to lazy to make PR.

from ait.

IdiotSandwichTheThird avatar IdiotSandwichTheThird commented on July 28, 2024

Yeah same. RIP.

from ait.

MaxLanc avatar MaxLanc commented on July 28, 2024

code
That patch fixes it for me (only using AIT for unet). But I'm to lazy to make PR.

Tested it and can confirm it works, seems to behave well with lora too

from ait.

MaxLanc avatar MaxLanc commented on July 28, 2024

snip

I'm doing the PR for the time being, at least so that other users can use AIT with unet working

from ait.

FizzleDorf avatar FizzleDorf commented on July 28, 2024

snip

I'm doing the PR for the time being, at least so that other users can use AIT with unet working

Thanks for this! I merged the PR not too long ago after testing.

from ait.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.