Git Product home page Git Product logo

Comments (10)

liangbingzhao avatar liangbingzhao commented on May 7, 2024 22

@moonnnpie in the ptp_util.py, omit extra_set_kwargs = {"offset": 1}, and change model.scheduler.set_timesteps(num_inference_steps, **extra_set_kwargs) to model.scheduler.set_timesteps(num_inference_steps). This error is because in the previous diffusers, scheduler's set_timesteps function has a param offset.

from prompt-to-prompt.

eps696 avatar eps696 commented on May 7, 2024 7

ok fixed my case by reversing the advice - renamed the stuff in register_attention_control function.
context => encoder_hidden_states, mask => attention_mask, CrossAttention => AttentionBlock

from prompt-to-prompt.

bonlime avatar bonlime commented on May 7, 2024 7

On latest 0.13.1 diffusers version I had to:
rename context => encoder_hidden_states, mask => attention_mask, self.reshape_heads_to_batch_dim -> self.head_to_batch_dim, self.reshape_batch_dim_to_heads -> self.batch_to_head_dim in register_attention_control and it started working correctly

from prompt-to-prompt.

moonnnpie avatar moonnnpie commented on May 7, 2024 3

i also use 0.13.1 diffusers version but got a problem

TypeError: PNDMScheduler.set_timesteps() got an unexpected keyword argument 'offset'

how should i fix it

from prompt-to-prompt.

liangbingzhao avatar liangbingzhao commented on May 7, 2024 2

@eps696 I followed your advice, but found if change CrossAttention to AttentionBlock, the attention_store would be none. So in my case, I renamed context and mask, and stay with CrossAttention.

from prompt-to-prompt.

eps696 avatar eps696 commented on May 7, 2024

hello, could you explain this issue a bit more?
i believe i have run into it in some "updated" form, getting the error forward() got an unexpected keyword argument 'encoder_hidden_states' when running register_attention_control on null-inversion - yet i don't quite catch what and where should be changed to avoid that. do you mean changing the original diffusers code?

from prompt-to-prompt.

eps696 avatar eps696 commented on May 7, 2024

@liangbingzhao @bonlime you are definitely right, i didn't notice that changing the block effectively disabled main workflow. yet the CrossAttention refactoring after 0.11.1 was quite gross, so i'm afraid more issues might appear

from prompt-to-prompt.

moonnnpie avatar moonnnpie commented on May 7, 2024

@liangbingzhao thanks a lot

from prompt-to-prompt.

JiauZhang avatar JiauZhang commented on May 7, 2024

Hi, all, I have tried to port to diffusers==0.14.0, there is no runing error, but the result is actually bad...
https://github.com/JiauZhang/prompt-to-prompt for now, I just simple replace attention map.
Could anyone give me some advice?

from prompt-to-prompt.

pikeyang avatar pikeyang commented on May 7, 2024

Hi, all, I have tried to port to diffusers==0.14.0, there is no runing error, but the result is actually bad... https://github.com/JiauZhang/prompt-to-prompt for now, I just simple replace attention map. Could anyone give me some advice?

Is it solved?

from prompt-to-prompt.

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.