Skip to content

Conversation

@avi-007
Copy link
Contributor

@avi-007 avi-007 commented Aug 13, 2025

… update initialization logic

Legal Boilerplate

Look, I get it. The entity doing business as “Gooey.AI” and/or “Dara.network” was incorporated in the State of Delaware in 2020 as Dara Network Inc. and is gonna need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Dara Network Inc can use, modify, copy, and redistribute my contributions, under its choice of terms.

@coderabbitai
Copy link

coderabbitai bot commented Aug 13, 2025

📝 Walkthrough

Walkthrough

  • Dockerfile: switched clone source to official deforum repository; removed command that emptied k_diffusion/init.py.
  • deforum_sd/init.py: after seed initialization, merges inputs.args into args via args.dict.update(inputs.args).
  • deforum_sd/deforum_script.py: removed unused base64 import; added Prompts import and used to build cond/uncond via Prompts(...).as_dict(); updated calls to render_animation/render_input_video/render_interpolation/render_image_batch to include new root-first and cond/uncond parameters; adjusted messages and video creation logic; expanded/renamed DeforumAnimArgs and DeforumArgs fields and defaults.
  • requirements.txt: added extra-index-url line; updated triton to 2.0.0; added clean-fid ~= 0.1.35.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch deforum-update

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@avi-007 avi-007 requested a review from devxpy August 13, 2025 04:22
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (3)
deforum_sd/requirements.txt (1)

15-15: Drop redundant extra-index-url to PyPI to avoid confusion

Pip already uses PyPI as the default index. Adding it again as an extra index is redundant and can mask resolution problems.

Apply this minimal clean-up:

--- a/deforum_sd/requirements.txt
+++ b/deforum_sd/requirements.txt
@@
- --extra-index-url https://pypi.python.org/simple/
deforum_sd/deforum_script.py (2)

102-105: Sampler scheduling: ensure parsing avoids eval and is integrated end-to-end

The new enable_schedule_samplers and sampler_schedule imply parsing expressions like "0:('euler'),10:('dpm2'),...". If downstream code uses eval, that’s a code-injection vector. Prefer a purpose-built parser.

I can provide a small parser that tokenizes epoch:('sampler') entries into a dict/list without eval.


342-346: Prompts construction: add a backward-compatible fallback

If both animation_prompts and neg_animation_prompts are empty, consider falling back to args.prompt to preserve legacy behavior.

--- a/deforum_sd/deforum_script.py
+++ b/deforum_sd/deforum_script.py
@@
-    cond, uncond = Prompts(
-        prompt=anim_args.animation_prompts, neg_prompt=anim_args.neg_animation_prompts
-    ).as_dict()
+    cond, uncond = Prompts(
+        prompt=anim_args.animation_prompts, neg_prompt=anim_args.neg_animation_prompts
+    ).as_dict()
+    # Back-compat: if no dict-based prompts provided, fall back to single-string prompt
+    if not cond and getattr(args, "prompt", ""):
+        cond = {0: args.prompt}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d8f095b and 053b6ef.

📒 Files selected for processing (4)
  • deforum_sd/Dockerfile (1 hunks)
  • deforum_sd/__init__.py (1 hunks)
  • deforum_sd/deforum_script.py (11 hunks)
  • deforum_sd/requirements.txt (2 hunks)
🔇 Additional comments (5)
deforum_sd/requirements.txt (2)

17-17: Verify Triton 2.0.0 compatibility with torch==1.13.1+cu116

Triton 2.x is primarily aligned with PyTorch 2.x. While it can work with 1.13.1 in some environments, there have been incompatibilities on certain CUDA/driver stacks. If Triton is not strictly required for this workflow, consider unpinning it or pinning to a proven version in your environment.

Would you like me to propose a compatibility matrix and/or a fallback (e.g., removing the line or pinning to a known-good build for CUDA 11.6)?


50-50: LGTM: clean-fid addition is reasonable

The clean-fid pin is consistent with the existing scikit-image constraint and should be safe.

deforum_sd/deforum_script.py (3)

157-157: LGTM: Increased default interpolate_x_frames

Bumping to 20 is reasonable and aligns with smoother outputs by default.


166-169: LGTM: Introduces negative prompts and passthrough args

These additions align with the new Prompts flow and with the merge step in init.py.


349-356: Render function signature changes: confirm helpers.render API alignment

Calls now pass (root, anim_args, args, cond, uncond). Ensure helpers.render functions accept the new parameters in that order in the deforum repo you clone in the Dockerfile.

If they differ (e.g., cond/uncond last, or missing), I can generate targeted patches for helpers.render stubs in this repo to adapt.

@avi-007 avi-007 merged commit dc76c33 into main Aug 13, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants