Repository navigation
Conversation
204f121 to
0da4595
Compare
pengcuo
left a comment
There was a problem hiding this comment.
Review notes (docs/skill only; I did not run on XPU).
-
The validation claim cannot be right. The PR says it was validated with "Diffusers
0.35.2" (README,SKILL.md, andreferences/diffusers.md, three places).Cosmos3OmniPipeline(src/diffusers/pipelines/cosmos/pipeline_cosmos3_omni.py) does not exist atv0.35.2(404 on the tag). The first release that has it is later; current isv0.42.1. The install command also usesdiffusers @ git+https://github.com/huggingface/diffusers.git, not0.35.2. Please correct the version (and the PyTorch nightly one if it is also from a different environment) to the actual combination you ran, or drop the version claim. -
The Diffusers quickstart now defaults to Edge.
references/diffusers.mdQuickstart used Nano at 720p with the Super variation. It now loadsnvidia/Cosmos3-Edgeand the "To run Super / To run Edge instead" lines are deleted. That regresses the default NVIDIA-GPU example to support one device. Keep the Nano example and add a separate short Edge/XPU block. -
Safety checker on XPU is unaddressed.
get_pipe()loads withenable_safety_checker=True(guardrails), and the skill installscosmos_guardrail. The XPU snippet at the end of the file passessafety_checker=None, enable_safety_checker=False, so what was validated skipped the guardrail. If the guardrail models are CUDA-only, the notebook's XPU path fails or silently stays on CPU. Please state what was run (guardrail on or off) and, if it is off, say so in the XPU section. -
Hard-coded CUDA remains in the same file.
pipe.to("cuda")/Generator(device="cuda")at the Nano snippet around line 474 and thetorch.cuda.*device-check cell around line 175 are untouched, andrelease_pipe()only callstorch.cuda.empty_cache(). If XPU is Edge-only, say so at those snippets. Otherwise anyone following the notebook on XPU hits them. -
Low:
inference_device()in the notebook is Edge-only on purpose, but the README snippet picksxpufor any model. Pick one rule.
ec15ca6 to
a658b3f
Compare
Signed-off-by: padatta <103029195+padatta@users.noreply.github.com>
…XPU to Edge - Replace the incorrect Diffusers 0.35.2 / torch nightly claim with the stack actually validated from a fresh install (torch 2.15.0+xpu, Diffusers 0.42.0.dev0 @ 86ef420), stated once in the setup guide. - Restore the Nano quickstart and add a separate Cosmos3-Edge XPU block. - State guardrail status: XPU block validated with the guardrail off. - Revert the notebook-verbatim runner to CUDA and mark CUDA-only cells. - Use one rule: XPU applies to Cosmos3-Edge only. - Document the 480p VAE decode limit (>=33 frames) on the Arc iGPU. Signed-off-by: padatta <103029195+padatta@users.noreply.github.com>
Enabling the guardrail fails on hosts without CUDA because cosmos_guardrail 0.3.2 loads the CUDA-saved face-blur checkpoint with torch.load and no map_location. With that load mapped to CPU, the guardrail ran on XPU (text and video checks on xpu:0), so state that in place of 'not run on XPU yet'. Signed-off-by: padatta <103029195+padatta@users.noreply.github.com>
Thanks for the thorough review. All points are addressed in the follow-up commits.
I then tested it on. It fails on XPU, and on any host without CUDA, inside cosmos_guardrail 0.3.2: cosmos_utils.load_model calls torch.load(path, weights_only=True) without map_location, and the RetinaFace face-blur checkpoint was saved with CUDA tensors. So CosmosSafetyChecker() raises Attempting to deserialize object on a CUDA device. With only that load mapped to CPU (map_location="cpu"), the guardrail works on XPU: CosmosSafetyChecker loaded, and both check_text_safety and check_video_safety ran on xpu:0 and passed. The docs describe this and point to enable_safety_checker=True once cosmos_guardrail is fixed. The older cosmos-predict1 guardrail already handles this through load_to_cpu; the pip package seems to have dropped it. Could you route this to whoever maintains cosmos_guardrail? I couldn't find a public repo for it.
Also found during validation: on the Arc iGPU, VAE decode at 480p with 33 or more frames, including Edge's default 121, never finishes, with or without vae.enable_tiling(). This happened on both torch 2.13 and 2.15. 17 frames decodes in about 14 s, so the XPU block uses num_frames=17 and the limit is documented. |
Summary
Validation
Previously validated on Intel Arc Graphics with PyTorch
2.13.0.dev20260530+xpuand Diffusers0.35.2. Documentation diff passesgit show --check.Related
Resubmits NVIDIA/cosmos#368, which was closed after the cookbook content moved to this repository.