TypeError: __call__() got an unexpected keyword argument 'image' in Stage 2
I got the following error running stage2 as follows: (created a separate conda environment and installed all the required libraries). Stage 1 worked fine
image = stage_2(
image=image, prompt_embeds=prompt_embeds, negative_prompt_embeds=negative_embeds, generator=generator, output_type="pt"
).images
pt_to_pil(image)[0].save("./if_stage_II.png")
'''
TypeError Traceback (most recent call last)
Cell In[11], line 1
----> 1 image = stage_2(
2 image=image, prompt_embeds=prompt_embeds, negative_prompt_embeds=negative_embeds, generator=generator, output_type="pt"
3 ).images
4 pt_to_pil(image)[0].save("./if_stage_II.png")
File /opt/conda/lib/python3.9/site-packages/torch/utils/_contextlib.py:115, in context_decorator..decorate_context(*args, **kwargs)
112 @functools.wraps(func)
113 def decorate_context(*args, **kwargs):
114 with ctx_factory():
--> 115 return func(*args, **kwargs)
TypeError: call() got an unexpected keyword argument 'image'
use this at the top:
from diffusers.pipelines import IFSuperResolutionPipeline
and then replace your instantiation of the stage II pipeline with that class, eg
stage_2 = IFSuperResolutionPipeline.from_pretrained(model_id, ...)
where ... is the args you were already using for the pipeline.