Abstract
CookingDiffusion is a novel framework designed to generate sequences of photo-realistic images corresponding to each step of a recipe. By integrating specialized "Memory Nets" into the Stable Diffusion architecture, the model maintains visual and logical consistency throughout the cooking process. This approach ensures that ingredients, utensils, and backgrounds remain stable across steps, effectively addressing the "hallucination" issues common in standard text-to-image models.
The Challenge of Sequential Consistency
While modern text-to-image (T2I) models like Stable Diffusion produce high-quality individual images, they often fail at sequential consistency. In a multi-step recipe, a standard model treats each instruction as an isolated prompt. Consequently, the visual state of ingredients (e.g., moving from raw to chopped) or the kitchen environment might change drastically between steps.
The authors define this specific challenge as cooking procedural image generation. Unlike standard T2I, this task requires the model to track the "state" of ingredients and resolve linguistic references (e.g., "the mixture") that point to results of previous actions. It also differs from video generation; while video focuses on smooth temporal continuity, cooking involves discrete, significant visual transformations from one step to the next.
Methodology: Introducing Memory Nets
To solve the consistency problem, CookingDiffusion augments Stable Diffusion with three types of Memory Nets that provide historical context:
- Text Memory Net (TMN): This module processes previous instructions to resolve co-references and maintain linguistic context.
- Image Memory Net (IMN): By using previous images as visual anchors, this net ensures that the style of the kitchen, the specific bowls used, and the appearance of ingredients remain consistent.
- Multi-modality Memory Net (MMN): This hybrid approach fuses both text and image history, providing flexibility for scenarios where only partial visual data is available.
Technically, these Memory Nets act as parallel modules to the standard time encoder in the Diffusion UNet. Utilizing CLIP-based encoders, they inject "procedural representations" into the denoising process, guiding the model to produce images that are logically connected to the preceding steps.
Data and Benchmarking
The researchers utilized the YouCookII dataset, a collection of thousands of cooking videos, to create a new benchmark for procedural image generation. The preprocessing involved:
- Segmentation: Dividing videos based on step-specific timestamps.
- Keyframe Selection: Using CLIP scores to automatically identify the most representative frame for each step's action and outcome.
- Final Dataset: The benchmark comprises 1,185 training videos (9,171 pairs) and 446 validation videos.
Key Insights and Results
The core innovation of CookingDiffusion is treating the cooking process as a conditional sequence rather than independent events. This allows the model to learn the "cause-and-effect" relationships inherent in culinary tasks.
Quantitative Performance
CookingDiffusion significantly outperformed baselines such as StackGAN, VQ Diffusion, and standard fine-tuned Stable Diffusion:
- Image Quality: The model achieved a Frechet Inception Distance (FID) of 34.29, notably better than the fine-tuned Stable Diffusion baseline of 40.39.
- Consistency: To measure procedural alignment, the authors introduced Average Procedure Consistency (Avg-PCon). CookingDiffusion reached a score of 18.75, the highest among all models, confirming the effectiveness of Memory Nets in anchoring the generation process.
Qualitative Success
Visual evaluations demonstrate that CookingDiffusion maintains the identity of the dish and the kitchen setting throughout a sequence. Unlike baseline models that might change the lighting or the type of pan used, CookingDiffusion preserves these elements, creating a cohesive visual narrative of the recipe.
Conclusion and Future Directions
CookingDiffusion represents a significant step forward in generating consistent visual sequences from complex procedural text. While currently focused on static images, the framework provides a foundation for future work in step-wise cooking video generation, aiming to move from snapshots to fully simulated, continuous visual cooking experiences.
Summary updated