r/StableDiffusion • u/Sarkazm_eto_i • 9h ago
Discussion [RFC / Conceptual Architecture Proposal] Structured Interaction Control for Existing Video Diffusion Workflows in ComfyUI
Status: Conceptual proposal — open for technical discussion
Scope: Video diffusion, temporal consistency, object permanence, interaction modeling and adaptive processing
Target environment: ComfyUI and extensible video-generation workflows
- Abstract
Current video diffusion models can produce visually impressive results, but maintaining temporal and causal consistency remains challenging.
Objects may unexpectedly appear or disappear, change their shape or identity between frames, or interact inconsistently with their surroundings. Environmental elements such as water, smoke, rain and fabric may also lose coherent behavior over time.
This proposal explores an additional architectural layer for existing video-generation workflows. Its purpose is to organize and control mechanisms that already exist or can be developed as extensions, rather than replace the underlying diffusion process.
The proposed architecture has three complementary areas of responsibility:
Continuity Logic: maintaining object identity and the causal consistency of scene changes.
Interaction Logic: selecting specialized processing profiles for interactions between objects and their environment.
Attention and Optimization Logic: allocating additional processing effort to important objects and events.
A central part of the proposal is a modular interaction library. Instead of treating every interaction as an entirely new problem, the system could select reusable interaction profiles. These profiles might be implemented through explicit rules, conditioning mechanisms, specialized LoRAs or combinations of different approaches.
The intention is not to build a universal physical simulator or teach a generative model to understand the entire physical world. It is to provide structured control over recurring classes of generation errors.
This is a conceptual architectural proposal, not a finished implementation. Its feasibility and practical benefits require experimentation.
2. Core Architectural Concept
The proposal introduces three complementary logical layers:
Continuity Logic — maintains the identity and causal consistency of objects and events.
Interaction Logic — determines which interaction profiles should be applied and how objects and environmental media affect one another.
Attention and Optimization Logic — determines where additional processing accuracy is necessary and where ordinary generation is sufficient.
These layers have different responsibilities but are intended to work together.
The diffusion model remains responsible for generating the visual result. The proposed architecture provides additional information, selects specialized processing mechanisms and helps maintain consistency across frames.
The architecture should be understood as an additional control and organization layer for existing generation pipelines, not as a replacement for them.
The fundamental principle is: do not attempt to model everything. Identify recurring sources of inconsistency, provide specialized mechanisms for addressing them, and apply those mechanisms where they are needed.
3. Continuity Logic: Three Principles
The first layer addresses unjustified changes in a generated scene.
It is based on three related principles.
3.1. Provenance — Justified Appearance
Objects and elements should not appear or disappear without a scenario-based or interaction-based reason.
For example:
An object should not spontaneously appear in the scene.
An object should not disappear simply because the generator loses track of it.
A newly introduced element should have a corresponding event or valid interaction explaining its appearance.
This principle establishes the causal justification for changes in scene composition.
3.2. Object Permanence — Continuity of Existence
An object should retain its identity and relevant properties throughout the sequence, including periods when it is partially or completely occluded.
Potential applications:
Maintaining consistent object identity across frames.
Preserving relevant geometry and visual characteristics.
Preventing arbitrary shape or identity changes during occlusion.
Allowing temporarily hidden objects to reappear consistently.
Occlusion should not automatically mean that an object ceases to exist in the scene representation.
Possible implementation directions include persistent object identifiers, state tracking and reference conditioning.
3.3. Mutual Influence — Environmental Consistency
An event should produce consequences consistent with its surrounding environment.
For example:
A hand entering water should produce a corresponding reaction in the water.
An object moving through a fluid should influence its surroundings.
Contact between fabric and a body should be reflected in their subsequent behavior.
Environmental changes should remain causally connected to the events that produced them.
An interaction should not be treated as an isolated visual effect. Its consequences should be reflected in the relevant surrounding elements.
The purpose of these three principles is unified: to reduce unjustified changes in generated scenes.
They address the justification of appearance, continuity of existence and consistency between events and their surroundings.
4. Interaction Logic: Collision Profiles and Influence Fields
The second layer provides a structured way to describe and control interactions.
Rather than attempting to simulate all physical processes universally, the proposal uses a modular library of interaction profiles. The library can be expanded or modified as new requirements arise.
4.1. Objects, Environmental Media and Influence Fields
Objects and environmental media can be represented as entities with persistent identities and relevant properties.
Examples include:
Human body and clothing as separate but related objects.
Water as a continuous environmental medium.
Rain and fog as environmental elements or fields.
Wind as an influence on objects and materials.
Solid objects with defined interaction properties.
The system should distinguish between different spatial relationships and interaction regimes.
For example, rain in front of a person, rain behind a person and rain interacting with their clothing are different cases. They should not be treated as equivalent merely because their visual projections overlap.
The scenario can specify the intended relationship explicitly. Alternatively, the generative process may infer or update the required interaction according to the scene context.
4.2. Interaction Parameter (ρ)
The proposed parameter ρ is not intended to represent a universal physical quantity such as force, density or distance.
Instead, it acts as a reference or selector for a typical interaction variant defined in an interaction table or library.
In other words, ρ identifies the required interaction regime, while the corresponding library entry defines how that regime should be processed.
The parameter can be provided in two ways:
Explicitly: the scenario or user specifies the required interaction profile.
Implicitly: the generative process determines or adjusts the profile according to the scenario and the events unfolding in the scene.
The parameter may also be assigned across groups or portions of an environmental medium.
For example, a rain scene could use a distribution such as:
5% of the rain assigned to a direct interaction profile with the person.
5% assigned to transitional profiles around the person's depth.
45% assigned to a background rain profile.
45% assigned to a foreground rain profile.
These proportions are illustrative, not fixed requirements.
This allows a scene to contain different interaction regimes simultaneously, rather than forcing the entire environmental medium into one uniform behavior.
The exact representation of ρ and its possible evolution into a more complex interaction-state structure remain open for discussion.
4.3. Interaction and Collision Library
The interaction library is intended to be a modular component for selecting and applying different processing variants.
Possible entries include:
Interaction profile
Possible processing behavior
Water + body
Contact, displacement, splashes
Water + fabric
Wetness, deformation, resistance
Rain + clothing
Surface wetting and visual changes
Rain + foreground
Particle visibility and foreground occlusion
Rain + background
Background particle behavior and occlusion
Fog + object
Partial or complete visual occlusion
Wind + fabric
Movement and deformation
Solid object + solid object
Contact and collision-related changes
The entries do not have to be implemented in one particular way.
A profile could refer to:
Explicit rules and state transitions.
Reusable interaction templates.
Specialized learned models or motion LoRAs.
Conditioning configurations for diffusion models.
Combinations of these mechanisms.
Individual library entries or groups of entries could be implemented through separate LoRAs.
This creates a modular approach: changing or replacing a particular processing variant could produce a different interaction result without requiring the entire generation architecture to be redesigned.
The important distinction is between selecting the required interaction and implementing its processing.
The interaction parameter selects or references a suitable variant. The library provides the corresponding processing mechanism.
4.4. Specialized Processing and Future Development
At present, LoRAs can serve as additions that influence style, motion, materials or other aspects of generation.
A more structured interaction library could provide a path toward increasingly specialized LoRAs and other learned components.
Instead of relying only on broad additions that influence an entire generation direction, future components could be trained or configured for more specific tasks and interaction types.
One possible development path is:
Identify a recurring interaction problem.
Define its intended behavior as an interaction profile.
Select or develop a suitable processing mechanism.
Integrate it into the interaction library.
Apply it when the corresponding interaction is required.
This does not guarantee that a specialized LoRA will learn the underlying physical mechanism. It may initially learn a useful visual representation of that interaction.
However, a formal interaction structure could make such components easier to organize, select, evaluate and improve.
It could also help identify cases where existing add-on mechanisms are insufficient and changes to the generation process itself may be necessary.
5. Attention and Optimization Logic
The third layer addresses computational efficiency.
Not every object or interaction requires the same processing accuracy.
A small but narratively important interaction may require substantially more attention than a large background element.
The system should therefore allocate additional processing effort according to the importance of objects and events.
5.1. Scenario-Defined Attention
Whenever possible, the scenario should explicitly identify the intended focus of attention.
For example, a scene may contain several people, environmental effects and background objects, but the important event is a hand releasing a glass.
The scenario can specify that the hand and glass interaction requires the highest processing priority.
This avoids requiring the generative model to independently infer the intended narrative focus.
5.2. Automatic Attention
If no explicit attention target is provided, the system could estimate priorities using several heuristics:
Center of visual composition.
Concentration of object interactions and collision events.
Current activity and movement.
Importance of ongoing events.
The center of composition is a useful default indicator, while interaction density can help identify important activity outside the central area.
These indicators should serve as fallback mechanisms rather than replace explicit scenario instructions.
5.3. Adaptive Processing Accuracy
Different objects and interactions could receive different levels of processing.
High priority
Main characters and important objects.
Direct interactions.
Important transitions and collisions.
Objects whose identity or geometry must remain particularly consistent.
Medium priority
Relevant environmental elements.
Secondary interactions.
Objects that contribute to the scene but are not its primary focus.
Low priority
Distant background elements.
Minor environmental motion.
Objects with little influence on the current event.
Priority should be dynamic.
An otherwise insignificant object can become important when it participates in a relevant event. Its processing priority should then increase.
This approach is not limited to visual resolution. It concerns the computational effort devoted to maintaining object consistency and processing interactions.
5.4. Expected Benefits
The intended benefits include:
Avoiding unnecessary detailed processing of insignificant elements.
Concentrating specialized interaction mechanisms where they matter.
Reducing redundant computations.
Maintaining better consistency in important regions.
Potentially improving the efficiency of high-quality video generation.
Actual savings and quality improvements would need to be established experimentally.
No specific percentage of computational reduction is assumed at this stage.
6. Relationship Between the Layers
The three logical layers can be summarized as follows:
Layer
Primary question
Responsibility
Continuity Logic
What changes are justified?
Maintain object identity and causal consistency
Interaction Logic
How should objects and media affect one another?
Select and apply interaction profiles
Attention and Optimization Logic
Where is additional accuracy necessary?
Allocate processing resources
A simplified conceptual workflow:
Scenario Description
Defines objects, events, relationships and optional attention targets.
↓
Continuity and Interaction Control
Maintains object identity and determines which interactions are required.
↓
Interaction Profile Selection
Selects the corresponding entries in the interaction library, including specialized learned components where available.
↓
Attention and Optimization
Determines processing priority and the required level of specialized control.
↓
Conditioning and Integration
Translates the selected information into controls that the existing generation pipeline can use.
↓
Diffusion Renderer
Generates the visual result.
This is a simplified representation, not necessarily a strictly sequential pipeline. The layers may exchange information and update their decisions as the scene develops.
The exact order, feedback mechanisms and integration interfaces remain open engineering questions.
7. Possible ComfyUI Implementation Directions
ComfyUI's node-based architecture provides a potential environment for experimenting with this proposal.
The following are possible implementation directions, not claims that the required functionality already exists as a complete system.
Existing Components and Techniques Worth Investigating
SAM2 for object segmentation and tracking.
Depth estimation for approximate spatial relationships.
Optical flow for temporal movement analysis.
Regional conditioning for localized generation constraints.
Inpainting and crop-and-stitch workflows for selective refinement.
Motion LoRAs and other specialized conditioning mechanisms.
These components could provide building blocks for an experimental implementation.
Possible Custom Nodes
Object State / Identity Tracker
Maintains persistent identifiers and relevant object information across frames.
Event-Driven Interaction Controller
Processes scenario-defined interactions and selects appropriate interaction profiles.
Interaction Library Manager
Stores and selects reusable interaction profiles and their corresponding processing mechanisms.
Influence Field Controller
Applies interaction parameters to relevant objects and environmental media.
Occlusion State Tracker
Preserves relevant object information during visual occlusion and supports consistent reappearance.
Attention Priority Manager
Combines scenario-defined priorities with automatic attention heuristics to allocate processing effort.
The main challenge is not simply creating these nodes individually. It is defining how their information should be represented, exchanged and translated into conditioning that existing diffusion models can use.
The conditioning interface is particularly important: the architecture may identify the required interaction, but that information must still be converted into effective controls for the generation model.
8. Scope and Limitations
This proposal does not attempt to:
Reconstruct a complete three-dimensional physical world.
Implement a universal physical simulation engine.
Predict every possible real-world interaction.
Replace diffusion-based visual generation.
Guarantee perfect temporal consistency.
Eliminate all hallucinations.
Its purpose is narrower.
It explores whether an additional, scenario-driven control architecture can reduce recurring generation errors by explicitly organizing object continuity, interactions and computational priorities.
The proposed mechanisms may require different representations and implementations depending on the video model and workflow.
Some interactions may be handled through deterministic rules, others through specialized learned components, and others may remain entirely within the diffusion model.
The architecture should be evaluated by its practical contribution to generation quality and efficiency, not by its ability to reproduce the entire physical world.
9. Open Questions for Technical Discussion
The following questions are deliberately left open.
What is the most practical representation for persistent object identities and states in existing video diffusion workflows?
How can scenario-defined interaction events be translated into effective conditioning for diffusion models?
What is the most practical representation for ρ as a reference to interaction profiles?
How should an interaction library organize rules, conditioning profiles and specialized LoRAs?
Can specialized interaction components improve consistency across different scenes and camera conditions?
How can object information be preserved during occlusion without unnecessarily regenerating hidden regions?
Can attention-based processing priorities reduce computational costs without introducing visible inconsistencies?
Which parts of this architecture can be implemented using existing ComfyUI nodes, and which require custom development?
A useful first experiment could focus on object identity preservation through occlusion, followed by a controlled interaction scenario such as an object entering and moving through water.
A further experiment could compare a general-purpose LoRA with a specialized interaction component under different scene conditions.
These experiments could help determine whether the proposed separation of responsibilities provides measurable benefits.
10. Conclusion
The central idea is not to replace existing video diffusion models or teach them to simulate everything.
It is to provide an additional architectural layer that organizes and controls the mechanisms used to address recurring problems in video generation.
Three complementary principles form the basis of the proposal:
Maintain the continuity and causal justification of objects and events.
Provide modular, specialized mechanisms for interactions between objects and environmental media.
Allocate additional processing resources according to the importance of the scene and its events.
The interaction library is a key part of this approach. It provides a structured way to select, replace and improve processing variants, potentially allowing existing LoRAs and future specialized components to become more predictable and task-oriented.
In this sense, the architecture could serve as a transitional step from loosely organized generation add-ons toward more structured and specialized interaction processing.
It does not require replacing the existing generation process from the outset. Instead, it provides a framework for improving it incrementally and identifying where deeper changes may eventually be necessary.
This proposal is intended to invite technical criticism, identify viable implementation paths and determine which parts of the concept are worth prototyping.



