Giter Club home page Giter Club logo

Comments (9)

FizzleDorf avatar FizzleDorf commented on September 23, 2024 2

I've fixed the issue with the value schedule in the latest commit. I'll be uploading example workflows today. I'll see about adding the smooth transition code to the repo as well in alternate nodes. Thanks for the info.

from comfyui_fizznodes.

FourTest avatar FourTest commented on September 23, 2024 1

Thank u tobiaswuerth.

I don't want to use transition effects
So I rewrote the prompt word,as:
"0": "AAAAAAAAAA",
"24": "AAAAAAAAAA",
"25": "BBBBBBBBBB",
"36": "BBBBBBBBBB"

So, I only need to discard 2 frames (24 and 25)

from comfyui_fizznodes.

FizzleDorf avatar FizzleDorf commented on September 23, 2024 1

I agree, the default behaviour is confusing. One would assume that it automatically interpolates smoothly from one prompt to the other. But actually it just decreases one prompt until its strength reaches 0 and then uses the next prompt.
...
Is this intended behaviour? Can you provide an example what the easiest way is to achieve such smooth transitions using your framework? Thanks

this is because the schedule is using composable diffusion, not changing the individual prompt weights. This is automating the Conditioning (Average) node to string many interpolations in a row. If you want to do the weights separately, you can use outside tools like Parseq to interpolate the weights per frame. this is also using the value schedule and the prompt weight variables and the prompt schedule. I'll make sure I make note of this in the wiki/README update.

from comfyui_fizznodes.

tobiaswuerth avatar tobiaswuerth commented on September 23, 2024

I agree, the default behaviour is confusing. One would assume that it automatically interpolates smoothly from one prompt to the other. But actually it just decreases one prompt until its strength reaches 0 and then uses the next prompt. See this example I made:

"0": "AAAAAAAAAA",
"4": "BBBBBBBBBB",
"8":"CCCCCCCCCC",

prints

 Max Frames:  8
 frame index:  0
 Current Prompt:  pre  AAAAAAAAAA  app
 Next Prompt:  pre  BBBBBBBBBB  app
 Strength :  1.0

 Max Frames:  8
 frame index:  1
 Current Prompt:  pre  AAAAAAAAAA  app
 Next Prompt:  pre  BBBBBBBBBB  app
 Strength :  0.75

 Max Frames:  8
 frame index:  2
 Current Prompt:  pre  AAAAAAAAAA  app
 Next Prompt:  pre  BBBBBBBBBB  app
 Strength :  0.5

 Max Frames:  8
 frame index:  3
 Current Prompt:  pre  AAAAAAAAAA  app
 Next Prompt:  pre  BBBBBBBBBB  app
 Strength :  0.25

 Max Frames:  8
 frame index:  4
 Current Prompt:  pre  BBBBBBBBBB  app
 Next Prompt:  pre  CCCCCCCCCC  app
 Strength :  1.0

 Max Frames:  8
 frame index:  5
 Current Prompt:  pre  BBBBBBBBBB  app
 Next Prompt:  pre  CCCCCCCCCC  app
 Strength :  0.75

 Max Frames:  8
 frame index:  6
 Current Prompt:  pre  BBBBBBBBBB  app
 Next Prompt:  pre  CCCCCCCCCC  app
 Strength :  0.5

 Max Frames:  8
 frame index:  7
 Current Prompt:  pre  BBBBBBBBBB  app
 Next Prompt:  pre  CCCCCCCCCC  app
 Strength :  0.25

but what I actually want is this:

 Max Frames:  8
 frame index:  0
 Current Prompt:  pre  AAAAAAAAAA  app
 Next Prompt:  pre  (AAAAAAAAAA: 0.75), (BBBBBBBBBB: 0.25)  app
 Strength :  1.0

 Max Frames:  8
 frame index:  1
 Current Prompt:  pre  (AAAAAAAAAA: 0.75), (BBBBBBBBBB: 0.25)  app
 Next Prompt:  pre  (AAAAAAAAAA: 0.5), (BBBBBBBBBB: 0.5)  app
 Strength :  1.0

 Max Frames:  8
 frame index:  2
 Current Prompt:  pre  (AAAAAAAAAA: 0.5), (BBBBBBBBBB: 0.5)  app
 Next Prompt:  pre  (AAAAAAAAAA: 0.25), (BBBBBBBBBB: 0.75)  app
 Strength :  1.0

 Max Frames:  8
 frame index:  3
 Current Prompt:  pre  (AAAAAAAAAA: 0.25), (BBBBBBBBBB: 0.75)  app
 Next Prompt:  pre  BBBBBBBBBB  app
 Strength :  1.0

 Max Frames:  8
 frame index:  4
 Current Prompt:  pre  BBBBBBBBBB  app
 Next Prompt:  pre  (BBBBBBBBBB: 0.75), (CCCCCCCCCC: 0.25)  app
 Strength :  1.0

 Max Frames:  8
 frame index:  5
 Current Prompt:  pre  (BBBBBBBBBB: 0.75), (CCCCCCCCCC: 0.25)  app
 Next Prompt:  pre  (BBBBBBBBBB: 0.5), (CCCCCCCCCC: 0.5)  app
 Strength :  1.0

 Max Frames:  8
 frame index:  6
 Current Prompt:  pre  (BBBBBBBBBB: 0.5), (CCCCCCCCCC: 0.5)  app
 Next Prompt:  pre  (BBBBBBBBBB: 0.25), (CCCCCCCCCC: 0.75)  app
 Strength :  1.0

 Max Frames:  8
 frame index:  7
 Current Prompt:  pre  (BBBBBBBBBB: 0.25), (CCCCCCCCCC: 0.75)  app
 Next Prompt:  pre  CCCCCCCCCC  app
 Strength :  1.0

Which I only managed to achieve when configuring each frame manually like:

"0": "AAAAAAAAAA",
"1": "(AAAAAAAAAA: `0.75`), (BBBBBBBBBB: `0.25`)",
"2": "(AAAAAAAAAA: `0.5`), (BBBBBBBBBB: `0.5`)",
"3": "(AAAAAAAAAA: `0.25`), (BBBBBBBBBB: `0.75`)",
"4": "BBBBBBBBBB",
"5": "(BBBBBBBBBB: `0.75`), (CCCCCCCCCC: `0.25`)",
"6": "(BBBBBBBBBB: `0.5`), (CCCCCCCCCC: `0.5`)",
"7": "(BBBBBBBBBB: `0.25`), (CCCCCCCCCC: `0.75`)",
"8":"CCCCCCCCCC",

Is this intended behaviour?
Can you provide an example what the easiest way is to achieve such smooth transitions using your framework?
Thanks

from comfyui_fizznodes.

tobiaswuerth avatar tobiaswuerth commented on September 23, 2024

meanwhile I've create a utility function for myself to generate the prompt schedule like I want it to:

def create_smooth_transition_schedule(prompts, key_frame_interval):
    import numpy as np
    interval = np.linspace(0, 1, key_frame_interval+1)[1:-1]
    interval_reversed = interval[::-1]

    schedule = []
    for i in range(len(prompts)-1):
        p1 = prompts[i]
        schedule.append(p1)

        p2 = prompts[i+1]
        for w1, w2 in zip(interval_reversed, interval):
            s = f'({p1}: `{w1:0.3f}`), ({p2}: `{w2:0.3f}`)'
            schedule.append(s)
    
    schedule.append(prompts[-1])

    for i in range(len(schedule)):
        print(f'"{i}": "{schedule[i]}",')

create_smooth_transition_schedule([
    "AAAAAAAAAA",
    "BBBBBBBBBB",
    "CCCCCCCCCC",
], key_frame_interval=4)

prints

"0": "AAAAAAAAAA",
"1": "(AAAAAAAAAA: `0.750`), (BBBBBBBBBB: `0.250`)",
"2": "(AAAAAAAAAA: `0.500`), (BBBBBBBBBB: `0.500`)",
"3": "(AAAAAAAAAA: `0.250`), (BBBBBBBBBB: `0.750`)",
"4": "BBBBBBBBBB",
"5": "(BBBBBBBBBB: `0.750`), (CCCCCCCCCC: `0.250`)",
"6": "(BBBBBBBBBB: `0.500`), (CCCCCCCCCC: `0.500`)",
"7": "(BBBBBBBBBB: `0.250`), (CCCCCCCCCC: `0.750`)",
"8": "CCCCCCCCCC",

.. for your case this prints:

"0": "yellow dress",
"1": "(yellow dress: `0.917`), (red dress: `0.083`)",
"2": "(yellow dress: `0.833`), (red dress: `0.167`)",
"3": "(yellow dress: `0.750`), (red dress: `0.250`)",
"4": "(yellow dress: `0.667`), (red dress: `0.333`)",
"5": "(yellow dress: `0.583`), (red dress: `0.417`)",
"6": "(yellow dress: `0.500`), (red dress: `0.500`)",
"7": "(yellow dress: `0.417`), (red dress: `0.583`)",
"8": "(yellow dress: `0.333`), (red dress: `0.667`)",
"9": "(yellow dress: `0.250`), (red dress: `0.750`)",
"10": "(yellow dress: `0.167`), (red dress: `0.833`)",
"11": "(yellow dress: `0.083`), (red dress: `0.917`)",
"12": "red dress",

is this what you want?

from comfyui_fizznodes.

FizzleDorf avatar FizzleDorf commented on September 23, 2024

#64 fixed this issue

from comfyui_fizznodes.

Herambnaik avatar Herambnaik commented on September 23, 2024

@FizzleDorf unable to use prompt scheduler could you please check?
image

from comfyui_fizznodes.

FizzleDorf avatar FizzleDorf commented on September 23, 2024

hey @Herambnaik, I'll look into it. thanks for reporting the issue.

from comfyui_fizznodes.

FizzleDorf avatar FizzleDorf commented on September 23, 2024

this seems to be a conflict with the naming conventions of this node https://github.com/Big-Idea-Technology/ComfyUI-Book-Tools

from comfyui_fizznodes.

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.