-
Notifications
You must be signed in to change notification settings - Fork 2
Update Deforum_SD script #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… update initialization logic
📝 WalkthroughWalkthrough
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 confusionPip 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-endThe new
enable_schedule_samplersandsampler_scheduleimply 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 fallbackIf both
animation_promptsandneg_animation_promptsare empty, consider falling back toargs.promptto 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
📒 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+cu116Triton 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 reasonableThe 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_framesBumping to 20 is reasonable and aligns with smoother outputs by default.
166-169: LGTM: Introduces negative prompts and passthrough argsThese 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 alignmentCalls now pass
(root, anim_args, args, cond, uncond). Ensurehelpers.renderfunctions 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.
… 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.