-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
img2img alternative script support for SDXL #12381
Comments
Would love for this to be fixed. Very helpful for consistent animation across frames. |
Any ideas on how to fix this? |
Notify me when this is fixed I also want to animate things please! |
No news on whether this has been fixed? |
Still getting this. |
It’ll never be fixed. this tool has some of the worst code organization I’ve ever seen in my life |
I was having the same issue and searched all over the internet, eventually, figured out that only specific checkpoints can handle image-to-image alternatives, for example - arcane-diffusion-v3 worked for me. |
It looks like the original method being called for sd1.5 is in modules.sd_hijack_utils and is ldm.models.diffusion.ddpm.LatentDiffusion https://github.com/CompVis/latent-diffusion/blob/main/ldm/models/diffusion/ddpm.py which clearly does a lot more and leads to an error in forward call Similar errors also happen, but maybe not relevant Mikubill/sd-webui-controlnet#634 Mikubill/sd-webui-controlnet#5 Bigger issue might be this - class OpenAIWrapper(IdentityWrapper): So then, maybe we can do something like
but the shapes are torch.Size([2, 4, 150, 106]) and
gives s1 = einsum('b i d, b j d -> b i j', q[:, i:end], k) Honestly I feel like this is really, really close to working, I just have no Idea how to fix it. the forward definition is |
Made a fix - #16761 |
Is there an existing issue for this?
What happened?
When trying to use the img2img alternative test script with the SDXL base model this error outputs:
img2imgalt.py", line 85, in find_noise_for_image_sigma_adjustment
cond_in = torch.cat([uncond, cond])
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected Tensor as element 0 in argument 0, but got dict
Steps to reproduce the problem
What should have happened?
Script should create a noise pattern based on image.
Version or Commit where the problem happens
1.5.1
What Python version are you running on ?
Python 3.11.x (above, no supported yet)
What platforms do you use to access the UI ?
Windows
What device are you running WebUI on?
Nvidia GPUs (RTX 20 above)
Cross attention optimization
Automatic
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
List of extensions
None
Console logs
Additional information
I tried making these additions to the script:
cond_tensor = cond['crossattn']
uncond_tensor = uncond['crossattn']
cond_in = torch.cat([uncond_tensor, cond_tensor], dim=1)
cond_in = {"c_concat": cond_in}
cond['crossattn'] = cond_in
uncond['crossattn'] = cond_in
Which solved some errors but ultimately led to this error:
File "C:\X Drive\MachineLearning\Stable Diffusion\I dont even know anymore\LatestBuildForTesting\stable-diffusion-webui\repositories\generative-models\sgm\modules\diffusionmodules\wrappers.py", line 28, in forward
return self.diffusion_model(
^^^^^^^^^^^^^^^^^^^^^
File "C:\X Drive\MachineLearning\Stable Diffusion\I dont even know anymore\LatestBuildForTesting\stable-diffusion-webui\venv\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\X Drive\MachineLearning\Stable Diffusion\I dont even know anymore\LatestBuildForTesting\stable-diffusion-webui\repositories\generative-models\sgm\modules\diffusionmodules\openaimodel.py", line 979, in forward
assert (y is not None) == (
^^^^^^^^^^^^^^^^^^^^
AssertionError: must specify y if and only if the model is class-conditional
The text was updated successfully, but these errors were encountered: