Wan2.1¶
Wan-2.1 by the Wan Team.
This report presents Wan, a comprehensive and open suite of video foundation models designed to push the boundaries of video generation. Built upon the mainstream diffusion transformer paradigm, Wan achieves significant advancements in generative capabilities through a series of innovations, including our novel VAE, scalable pre-training strategies, large-scale data curation, and automated evaluation metrics. These contributions collectively enhance the model's performance and versatility. Specifically, Wan is characterized by four key features: Leading Performance: The 14B model of Wan, trained on a vast dataset comprising billions of images and videos, demonstrates the scaling laws of video generation with respect to both data and model size. It consistently outperforms the existing open-source models as well as state-of-the-art commercial solutions across multiple internal and external benchmarks, demonstrating a clear and significant performance superiority. Comprehensiveness: Wan offers two capable models, i.e., 1.3B and 14B parameters, for efficiency and effectiveness respectively. It also covers multiple downstream applications, including image-to-video, instruction-guided video editing, and personal video generation, encompassing up to eight tasks. Consumer-Grade Efficiency: The 1.3B model demonstrates exceptional resource efficiency, requiring only 8.19 GB VRAM, making it compatible with a wide range of consumer-grade GPUs. Openness: We open-source the entire series of Wan, including source code and all models, with the goal of fostering the growth of the video generation community. This openness seeks to significantly expand the creative possibilities of video production in the industry and provide academia with high-quality video foundation models. All the code and models are available at this https URL.
You can find all the original Wan2.1 checkpoints under the Wan-AI organization.
The following Wan models are supported in Diffusers:
- Wan 2.1 T2V 1.3B
- Wan 2.1 T2V 14B
- Wan 2.1 I2V 14B - 480P
- Wan 2.1 I2V 14B - 720P
- Wan 2.1 FLF2V 14B - 720P
- Wan 2.1 VACE 1.3B
- Wan 2.1 VACE 14B
- Wan 2.2 T2V 14B
- Wan 2.2 I2V 14B
- Wan 2.2 TI2V 5B
Tip
Click on the Wan2.1 models in the right sidebar for more examples of video generation.
Text-to-Video Generation¶
The example below demonstrates how to generate a video from text optimized for memory or inference speed.
Refer to the Reduce memory usage guide for more details about the various memory saving techniques.
The Wan2.1 text-to-video model below requires ~13GB of VRAM.
# pip install ftfy
import mindspore as ms
import numpy as np
from mindone.diffusers import AutoModel, WanPipeline
from mindone.diffusers.utils import export_to_video, load_image
from mindone.transformers import UMT5EncoderModel
text_encoder = UMT5EncoderModel.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", subfolder="text_encoder", mindspore_dtype=ms.float16)
vae = AutoModel.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", subfolder="vae", mindspore_dtype=ms.float32)
transformer = AutoModel.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", subfolder="transformer", mindspore_dtype=ms.float16)
pipeline = WanPipeline.from_pretrained(
"Wan-AI/Wan2.1-T2V-14B-Diffusers",
vae=vae,
transformer=transformer,
text_encoder=text_encoder,
mindspore_dtype=ms.float16
)
prompt = """
The camera rushes from far to near in a low-angle shot,
revealing a white ferret on a log. It plays, leaps into the water, and emerges, as the camera zooms in
for a close-up. Water splashes berry bushes nearby, while moss, snow, and leaves blanket the ground.
Birch trees and a light blue sky frame the scene, with ferns in the foreground. Side lighting casts dynamic
shadows and warm highlights. Medium composition, front view, low angle, with depth of field.
"""
negative_prompt = """
Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality,
low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured,
misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards
"""
output = pipeline(
prompt=prompt,
negative_prompt=negative_prompt,
num_frames=81,
guidance_scale=5.0,
)[0][0]
export_to_video(output, "output.mp4", fps=16)
# pip install ftfy
import mindspore as ms
import numpy as np
from mindone.diffusers import AutoModel, WanPipeline
from mindone.diffusers.hooks.group_offloading import apply_group_offloading
from mindone.diffusers.utils import export_to_video, load_image
from mindone.transformers import UMT5EncoderModel
text_encoder = UMT5EncoderModel.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", subfolder="text_encoder", mindspore_dtype=ms.float16)
vae = AutoModel.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", subfolder="vae", mindspore_dtype=ms.float32)
transformer = AutoModel.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", subfolder="transformer", mindspore_dtype=ms.float16)
pipeline = WanPipeline.from_pretrained(
"Wan-AI/Wan2.1-T2V-14B-Diffusers",
vae=vae,
transformer=transformer,
text_encoder=text_encoder,
mindspore_dtype=ms.float16
)
pipeline.transformer.construct = ms.jit(pipeline.transformer.construct)
prompt = """
The camera rushes from far to near in a low-angle shot,
revealing a white ferret on a log. It plays, leaps into the water, and emerges, as the camera zooms in
for a close-up. Water splashes berry bushes nearby, while moss, snow, and leaves blanket the ground.
Birch trees and a light blue sky frame the scene, with ferns in the foreground. Side lighting casts dynamic
shadows and warm highlights. Medium composition, front view, low angle, with depth of field.
"""
negative_prompt = """
Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality,
low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured,
misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards
"""
output = pipeline(
prompt=prompt,
negative_prompt=negative_prompt,
num_frames=81,
guidance_scale=5.0,
)[0][0]
export_to_video(output, "output.mp4", fps=16)
Any-to-Video Controllable Generation¶
Wan VACE supports various generation techniques which achieve controllable video generation. Some of the capabilities include: - Control to Video (Depth, Pose, Sketch, Flow, Grayscale, Scribble, Layout, Boundary Box, etc.). Recommended library for preprocessing videos to obtain control videos: huggingface/controlnet_aux - Image/Video to Video (first frame, last frame, starting clip, ending clip, random clips) - Inpainting and Outpainting - Subject to Video (faces, object, characters, etc.) - Composition to Video (reference anything, animate anything, swap anything, expand anything, move anything, etc.)
The code snippets available in this pull request demonstrate some examples of how videos can be generated with controllability signals.
The general rule of thumb to keep in mind when preparing inputs for the VACE pipeline is that the input images, or frames of a video that you want to use for conditioning, should have a corresponding mask that is black in color. The black mask signifies that the model will not generate new content for that area, and only use those parts for conditioning the generation process. For parts/frames that should be generated by the model, the mask should be white in color.
Notes¶
- Wan2.1 supports LoRAs with
load_lora_weights
.
Show example code
# pip install ftfy
import mindspore as ms
from mindone.diffusers import AutoModel, WanPipeline
from mindone.diffusers.schedulers.scheduling_unipc_multistep import UniPCMultistepScheduler
from mindone.diffusers.utils import export_to_video
vae = AutoModel.from_pretrained(
"Wan-AI/Wan2.1-T2V-1.3B-Diffusers", subfolder="vae", mindspore_dtype=ms.float32
)
pipeline = WanPipeline.from_pretrained(
"Wan-AI/Wan2.1-T2V-1.3B-Diffusers", vae=vae, mindspore_dtype=ms.float16
)
pipeline.scheduler = UniPCMultistepScheduler.from_config(
pipeline.scheduler.config, flow_shift=5.0
)
pipeline.load_lora_weights("benjamin-paine/steamboat-willie-1.3b", adapter_name="steamboat-willie")
pipeline.set_adapters("steamboat-willie")
# use "steamboat willie style" to trigger the LoRA
prompt = """
steamboat willie style, golden era animation, The camera rushes from far to near in a low-angle shot,
revealing a white ferret on a log. It plays, leaps into the water, and emerges, as the camera zooms in
for a close-up. Water splashes berry bushes nearby, while moss, snow, and leaves blanket the ground.
Birch trees and a light blue sky frame the scene, with ferns in the foreground. Side lighting casts dynamic
shadows and warm highlights. Medium composition, front view, low angle, with depth of field.
"""
output = pipeline(
prompt=prompt,
num_frames=81,
guidance_scale=5.0,
)[0][0]
export_to_video(output, "output.mp4", fps=16)
- [
WanTransformer3DModel
] and [AutoencoderKLWan
] supports loading from single files withfrom_single_file
.
Show example code
# pip install ftfy
import mindspore as ms
from mindone.diffusers import WanPipeline, WanTransformer3DModel, AutoencoderKLWan
vae = AutoencoderKLWan.from_single_file(
"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/vae/wan_2.1_vae.safetensors"
)
transformer = WanTransformer3DModel.from_single_file(
"https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/diffusion_models/wan2.1_t2v_1.3B_bf16.safetensors",
mindspore_dtype=ms.float16
)
pipeline = WanPipeline.from_pretrained(
"Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
vae=vae,
transformer=transformer,
mindspore_dtype=ms.float16
)
-
Set the [
AutoencoderKLWan
] dtype tomindspore.float32
for better decoding quality. -
The number of frames per second (fps) or
k
should be calculated by4 * k + 1
. -
Try lower
shift
values (2.0
to5.0
) for lower resolution videos and highershift
values (7.0
to12.0
) for higher resolution images. -
Wan 2.1 and 2.2 support using LightX2V LoRAs to speed up inference. Using them on Wan 2.2 is slightly more involed. Refer to this code snippet to learn more.
-
Wan 2.2 has two denoisers. By default, LoRAs are only loaded into the first denoiser. One can set
load_into_transformer_2=True
to load LoRAs into the second denoiser. Refer to this and this examples to learn more.
mindone.diffusers.WanPipeline
¶
Bases: DiffusionPipeline
, WanLoraLoaderMixin
Pipeline for text-to-video generation using Wan.
This model inherits from [DiffusionPipeline
]. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).
PARAMETER | DESCRIPTION |
---|---|
tokenizer
|
Tokenizer from T5, specifically the google/umt5-xxl variant.
TYPE:
|
text_encoder
|
T5, specifically the google/umt5-xxl variant.
TYPE:
|
transformer
|
Conditional Transformer to denoise the input latents.
TYPE:
|
scheduler
|
A scheduler to be used in combination with
TYPE:
|
vae
|
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.
TYPE:
|
transformer_2
|
Conditional Transformer to denoise the input latents during the low-noise stage. If provided, enables
two-stage denoising where
TYPE:
|
boundary_ratio
|
Ratio of total timesteps to use as the boundary for switching between transformers in two-stage denoising.
The actual boundary timestep is calculated as
TYPE:
|
Source code in mindone/diffusers/pipelines/wan/pipeline_wan.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
|
mindone.diffusers.WanPipeline.__call__(prompt=None, negative_prompt=None, height=480, width=832, num_frames=81, num_inference_steps=50, guidance_scale=5.0, guidance_scale_2=None, num_videos_per_prompt=1, generator=None, latents=None, prompt_embeds=None, negative_prompt_embeds=None, output_type='np', return_dict=False, attention_kwargs=None, callback_on_step_end=None, callback_on_step_end_tensor_inputs=['latents'], max_sequence_length=512)
¶
The call function to the pipeline for generation.
PARAMETER | DESCRIPTION |
---|---|
prompt
|
The prompt or prompts to guide the image generation. If not defined, pass
TYPE:
|
negative_prompt
|
The prompt or prompts to avoid during image generation. If not defined, pass
TYPE:
|
height
|
The height in pixels of the generated image.
TYPE:
|
width
|
The width in pixels of the generated image.
TYPE:
|
num_frames
|
The number of frames in the generated video.
TYPE:
|
num_inference_steps
|
The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference.
TYPE:
|
guidance_scale
|
Guidance scale as defined in Classifier-Free Diffusion
Guidance.
TYPE:
|
guidance_scale_2
|
Guidance scale for the low-noise stage transformer (
TYPE:
|
num_videos_per_prompt
|
The number of images to generate per prompt.
TYPE:
|
generator
|
A
TYPE:
|
latents
|
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random
TYPE:
|
prompt_embeds
|
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the
TYPE:
|
output_type
|
The output format of the generated image. Choose between
TYPE:
|
return_dict
|
Whether or not to return a [
TYPE:
|
attention_kwargs
|
A kwargs dictionary that if specified is passed along to the
TYPE:
|
callback_on_step_end
|
A function or a subclass of
TYPE:
|
callback_on_step_end_tensor_inputs
|
The list of tensor inputs for the
TYPE:
|
max_sequence_length
|
The maximum sequence length of the text encoder. If the prompt is longer than this, it will be truncated. If the prompt is shorter, it will be padded to this length.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
[ |
Source code in mindone/diffusers/pipelines/wan/pipeline_wan.py
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
|
mindone.diffusers.WanPipeline.encode_prompt(prompt, negative_prompt=None, do_classifier_free_guidance=True, num_videos_per_prompt=1, prompt_embeds=None, negative_prompt_embeds=None, max_sequence_length=226, dtype=None)
¶
Encodes the prompt into text encoder hidden states.
PARAMETER | DESCRIPTION |
---|---|
prompt
|
prompt to be encoded
TYPE:
|
negative_prompt
|
The prompt or prompts not to guide the image generation. If not defined, one has to pass
TYPE:
|
do_classifier_free_guidance
|
Whether to use classifier free guidance or not.
TYPE:
|
num_videos_per_prompt
|
Number of videos that should be generated per prompt.
TYPE:
|
prompt_embeds
|
Pre-generated text embeddings. Can be used to easily tweak text inputs, e.g. prompt weighting. If not
provided, text embeddings will be generated from
TYPE:
|
negative_prompt_embeds
|
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, e.g. prompt
weighting. If not provided, negative_prompt_embeds will be generated from
TYPE:
|
dtype
|
(
TYPE:
|
Source code in mindone/diffusers/pipelines/wan/pipeline_wan.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
|
mindone.diffusers.WanImageToVideoPipeline
¶
Bases: DiffusionPipeline
, WanLoraLoaderMixin
Pipeline for image-to-video generation using Wan.
This model inherits from [DiffusionPipeline
]. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).
PARAMETER | DESCRIPTION |
---|---|
tokenizer
|
Tokenizer from T5, specifically the google/umt5-xxl variant.
TYPE:
|
text_encoder
|
T5, specifically the google/umt5-xxl variant.
TYPE:
|
image_encoder
|
CLIP, specifically the clip-vit-huge-patch14 variant.
TYPE:
|
transformer
|
Conditional Transformer to denoise the input latents.
TYPE:
|
scheduler
|
A scheduler to be used in combination with
TYPE:
|
vae
|
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.
TYPE:
|
transformer_2
|
Conditional Transformer to denoise the input latents during the low-noise stage. In two-stage denoising,
TYPE:
|
boundary_ratio
|
Ratio of total timesteps to use as the boundary for switching between transformers in two-stage denoising.
The actual boundary timestep is calculated as
TYPE:
|
Source code in mindone/diffusers/pipelines/wan/pipeline_wan_i2v.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 |
|
mindone.diffusers.WanImageToVideoPipeline.__call__(image, prompt=None, negative_prompt=None, height=480, width=832, num_frames=81, num_inference_steps=50, guidance_scale=5.0, guidance_scale_2=None, num_videos_per_prompt=1, generator=None, latents=None, prompt_embeds=None, negative_prompt_embeds=None, image_embeds=None, last_image=None, output_type='np', return_dict=False, attention_kwargs=None, callback_on_step_end=None, callback_on_step_end_tensor_inputs=['latents'], max_sequence_length=512)
¶
The call function to the pipeline for generation.
PARAMETER | DESCRIPTION |
---|---|
image
|
The input image to condition the generation on. Must be an image, a list of images or a
TYPE:
|
prompt
|
The prompt or prompts to guide the image generation. If not defined, one has to pass
TYPE:
|
negative_prompt
|
The prompt or prompts not to guide the image generation. If not defined, one has to pass
TYPE:
|
height
|
The height of the generated video.
TYPE:
|
width
|
The width of the generated video.
TYPE:
|
num_frames
|
The number of frames in the generated video.
TYPE:
|
num_inference_steps
|
The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference.
TYPE:
|
guidance_scale
|
Guidance scale as defined in Classifier-Free Diffusion
Guidance.
TYPE:
|
guidance_scale_2
|
Guidance scale for the low-noise stage transformer (
TYPE:
|
num_videos_per_prompt
|
The number of images to generate per prompt.
TYPE:
|
generator
|
A
TYPE:
|
latents
|
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random
TYPE:
|
prompt_embeds
|
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the
TYPE:
|
negative_prompt_embeds
|
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the
TYPE:
|
image_embeds
|
Pre-generated image embeddings. Can be used to easily tweak image inputs (weighting). If not provided,
image embeddings are generated from the
TYPE:
|
output_type
|
The output format of the generated image. Choose between
TYPE:
|
return_dict
|
Whether or not to return a [
TYPE:
|
attention_kwargs
|
A kwargs dictionary that if specified is passed along to the
TYPE:
|
callback_on_step_end
|
A function or a subclass of
TYPE:
|
callback_on_step_end_tensor_inputs
|
The list of tensor inputs for the
TYPE:
|
max_sequence_length
|
The maximum sequence length of the text encoder. If the prompt is longer than this, it will be truncated. If the prompt is shorter, it will be padded to this length.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
[ |
Source code in mindone/diffusers/pipelines/wan/pipeline_wan_i2v.py
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 |
|
mindone.diffusers.WanImageToVideoPipeline.encode_prompt(prompt, negative_prompt=None, do_classifier_free_guidance=True, num_videos_per_prompt=1, prompt_embeds=None, negative_prompt_embeds=None, max_sequence_length=226, dtype=None)
¶
Encodes the prompt into text encoder hidden states.
PARAMETER | DESCRIPTION |
---|---|
prompt
|
prompt to be encoded
TYPE:
|
negative_prompt
|
The prompt or prompts not to guide the image generation. If not defined, one has to pass
TYPE:
|
do_classifier_free_guidance
|
Whether to use classifier free guidance or not.
TYPE:
|
num_videos_per_prompt
|
Number of videos that should be generated per prompt.
TYPE:
|
prompt_embeds
|
Pre-generated text embeddings. Can be used to easily tweak text inputs, e.g. prompt weighting. If not
provided, text embeddings will be generated from
TYPE:
|
negative_prompt_embeds
|
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, e.g. prompt
weighting. If not provided, negative_prompt_embeds will be generated from
TYPE:
|
dtype
|
(
TYPE:
|
Source code in mindone/diffusers/pipelines/wan/pipeline_wan_i2v.py
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
|
mindone.diffusers.WanVACEPipeline
¶
Bases: DiffusionPipeline
, WanLoraLoaderMixin
Pipeline for controllable generation using Wan.
This model inherits from [DiffusionPipeline
]. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, etc.).
PARAMETER | DESCRIPTION |
---|---|
tokenizer
|
Tokenizer from T5, specifically the google/umt5-xxl variant.
TYPE:
|
text_encoder
|
T5, specifically the google/umt5-xxl variant.
TYPE:
|
transformer
|
Conditional Transformer to denoise the input latents.
TYPE:
|
scheduler
|
A scheduler to be used in combination with
TYPE:
|
vae
|
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.
TYPE:
|
Source code in mindone/diffusers/pipelines/wan/pipeline_wan_vace.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
|
mindone.diffusers.WanVACEPipeline.__call__(prompt=None, negative_prompt=None, video=None, mask=None, reference_images=None, conditioning_scale=1.0, height=480, width=832, num_frames=81, num_inference_steps=50, guidance_scale=5.0, num_videos_per_prompt=1, generator=None, latents=None, prompt_embeds=None, negative_prompt_embeds=None, output_type='np', return_dict=False, attention_kwargs=None, callback_on_step_end=None, callback_on_step_end_tensor_inputs=['latents'], max_sequence_length=512)
¶
The call function to the pipeline for generation.
PARAMETER | DESCRIPTION |
---|---|
prompt
|
The prompt or prompts to guide the image generation. If not defined, one has to pass
TYPE:
|
negative_prompt
|
The prompt or prompts not to guide the image generation. If not defined, one has to pass
TYPE:
|
video
|
The input video or videos to be used as a starting point for the generation. The video should be a list of PIL images, a numpy array, or a mindspore tensor. Currently, the pipeline only supports generating one video at a time.
TYPE:
|
mask
|
The input mask defines which video regions to condition on and which to generate. Black areas in the mask indicate conditioning regions, while white areas indicate regions for generation. The mask should be a list of PIL images, a numpy array, or a mindspore tensor. Currently supports generating a single video at a time.
TYPE:
|
reference_images
|
A list of one or more reference images as extra conditioning for the generation. For example, if you are trying to inpaint a video to change the character, you can pass reference images of the new character here. Refer to the Diffusers examples and original user guide for a full list of supported tasks and use cases.
TYPE:
|
conditioning_scale
|
The conditioning scale to be applied when adding the control conditioning latent stream to the
denoising latent stream in each control layer of the model. If a float is provided, it will be applied
uniformly to all layers. If a list or tensor is provided, it should have the same length as the number
of control layers in the model (
TYPE:
|
height
|
The height in pixels of the generated image.
TYPE:
|
width
|
The width in pixels of the generated image.
TYPE:
|
num_frames
|
The number of frames in the generated video.
TYPE:
|
num_inference_steps
|
The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference.
TYPE:
|
guidance_scale
|
Guidance scale as defined in Classifier-Free Diffusion Guidance.
TYPE:
|
num_videos_per_prompt
|
The number of images to generate per prompt.
TYPE:
|
generator
|
A [
TYPE:
|
latents
|
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random
TYPE:
|
prompt_embeds
|
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the
TYPE:
|
output_type
|
The output format of the generated image. Choose between
TYPE:
|
return_dict
|
Whether or not to return a [
TYPE:
|
attention_kwargs
|
A kwargs dictionary that if specified is passed along to the
TYPE:
|
callback_on_step_end
|
A function or a subclass of
TYPE:
|
callback_on_step_end_tensor_inputs
|
The list of tensor inputs for the
TYPE:
|
max_sequence_length
|
The maximum sequence length of the text encoder. If the prompt is longer than this, it will be truncated. If the prompt is shorter, it will be padded to this length.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
[ |
Source code in mindone/diffusers/pipelines/wan/pipeline_wan_vace.py
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
|
mindone.diffusers.WanVACEPipeline.encode_prompt(prompt, negative_prompt=None, do_classifier_free_guidance=True, num_videos_per_prompt=1, prompt_embeds=None, negative_prompt_embeds=None, max_sequence_length=226, dtype=None)
¶
Encodes the prompt into text encoder hidden states.
PARAMETER | DESCRIPTION |
---|---|
prompt
|
prompt to be encoded
TYPE:
|
negative_prompt
|
The prompt or prompts not to guide the image generation. If not defined, one has to pass
TYPE:
|
do_classifier_free_guidance
|
Whether to use classifier free guidance or not.
TYPE:
|
num_videos_per_prompt
|
Number of videos that should be generated per prompt.
TYPE:
|
prompt_embeds
|
Pre-generated text embeddings. Can be used to easily tweak text inputs, e.g. prompt weighting. If not
provided, text embeddings will be generated from
TYPE:
|
negative_prompt_embeds
|
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, e.g. prompt
weighting. If not provided, negative_prompt_embeds will be generated from
TYPE:
|
dtype
|
(
TYPE:
|
Source code in mindone/diffusers/pipelines/wan/pipeline_wan_vace.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
|
mindone.diffusers.WanVideoToVideoPipeline
¶
Bases: DiffusionPipeline
, WanLoraLoaderMixin
Pipeline for video-to-video generation using Wan.
This model inherits from [DiffusionPipeline
]. Check the superclass documentation for the generic methods
implemented for all pipelines (downloading, saving, running on a particular device, etc.).
PARAMETER | DESCRIPTION |
---|---|
tokenizer
|
Tokenizer from T5, specifically the google/umt5-xxl variant.
TYPE:
|
text_encoder
|
T5, specifically the google/umt5-xxl variant.
TYPE:
|
transformer
|
Conditional Transformer to denoise the input latents.
TYPE:
|
scheduler
|
A scheduler to be used in combination with
TYPE:
|
vae
|
Variational Auto-Encoder (VAE) Model to encode and decode videos to and from latent representations.
TYPE:
|
Source code in mindone/diffusers/pipelines/wan/pipeline_wan_video2video.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 |
|
mindone.diffusers.WanVideoToVideoPipeline.__call__(video=None, prompt=None, negative_prompt=None, height=480, width=832, num_inference_steps=50, timesteps=None, guidance_scale=5.0, strength=0.8, num_videos_per_prompt=1, generator=None, latents=None, prompt_embeds=None, negative_prompt_embeds=None, output_type='np', return_dict=False, attention_kwargs=None, callback_on_step_end=None, callback_on_step_end_tensor_inputs=['latents'], max_sequence_length=512)
¶
The call function to the pipeline for generation.
PARAMETER | DESCRIPTION |
---|---|
prompt
|
The prompt or prompts to guide the image generation. If not defined, one has to pass
TYPE:
|
height
|
The height in pixels of the generated image.
TYPE:
|
width
|
The width in pixels of the generated image.
TYPE:
|
num_frames
|
The number of frames in the generated video.
TYPE:
|
num_inference_steps
|
The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference.
TYPE:
|
guidance_scale
|
Guidance scale as defined in Classifier-Free Diffusion
Guidance.
TYPE:
|
strength
|
Higher strength leads to more differences between original image and generated video.
TYPE:
|
num_videos_per_prompt
|
The number of images to generate per prompt.
TYPE:
|
generator
|
A
TYPE:
|
latents
|
Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor is generated by sampling using the supplied random
TYPE:
|
prompt_embeds
|
Pre-generated text embeddings. Can be used to easily tweak text inputs (prompt weighting). If not
provided, text embeddings are generated from the
TYPE:
|
output_type
|
The output format of the generated image. Choose between
TYPE:
|
return_dict
|
Whether or not to return a [
TYPE:
|
attention_kwargs
|
A kwargs dictionary that if specified is passed along to the
TYPE:
|
callback_on_step_end
|
A function or a subclass of
TYPE:
|
callback_on_step_end_tensor_inputs
|
The list of tensor inputs for the
TYPE:
|
max_sequence_length
|
The maximum sequence length of the text encoder. If the prompt is longer than this, it will be truncated. If the prompt is shorter, it will be padded to this length.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
[ |
Source code in mindone/diffusers/pipelines/wan/pipeline_wan_video2video.py
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 |
|
mindone.diffusers.WanVideoToVideoPipeline.encode_prompt(prompt, negative_prompt=None, do_classifier_free_guidance=True, num_videos_per_prompt=1, prompt_embeds=None, negative_prompt_embeds=None, max_sequence_length=226, dtype=None)
¶
Encodes the prompt into text encoder hidden states.
PARAMETER | DESCRIPTION |
---|---|
prompt
|
prompt to be encoded
TYPE:
|
negative_prompt
|
The prompt or prompts not to guide the image generation. If not defined, one has to pass
TYPE:
|
do_classifier_free_guidance
|
Whether to use classifier free guidance or not.
TYPE:
|
num_videos_per_prompt
|
Number of videos that should be generated per prompt.
TYPE:
|
prompt_embeds
|
Pre-generated text embeddings. Can be used to easily tweak text inputs, e.g. prompt weighting. If not
provided, text embeddings will be generated from
TYPE:
|
negative_prompt_embeds
|
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, e.g. prompt
weighting. If not provided, negative_prompt_embeds will be generated from
TYPE:
|
dtype
|
(
TYPE:
|
Source code in mindone/diffusers/pipelines/wan/pipeline_wan_video2video.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
|
mindone.diffusers.pipelines.wan.pipeline_output.WanPipelineOutput
dataclass
¶
Bases: BaseOutput
Output class for Wan pipelines.
PARAMETER | DESCRIPTION |
---|---|
frames
|
List of video outputs - It can be a nested list of length
TYPE:
|
Source code in mindone/diffusers/pipelines/wan/pipeline_output.py
10 11 12 13 14 15 16 17 18 19 20 21 22 |
|