Skip to content

Commit a0617d5

Browse files
committed
update example
1 parent 4d90851 commit a0617d5

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/diffusers/pipelines/cosmos/pipeline_cosmos_text2image.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,18 @@ def __init__(self, *args, **kwargs):
5454
Examples:
5555
```python
5656
>>> import torch
57-
>>> from diffusers import CosmosTextToWorldPipeline
58-
>>> from diffusers.utils import export_to_video
57+
>>> from diffusers import CosmosTextToImagePipeline
5958
60-
>>> model_id = "nvidia/Cosmos-1.0-Diffusion-7B-Text2World"
61-
>>> pipe = CosmosTextToWorldPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16)
59+
>>> # TODO(aryan): update model_id
60+
>>> model_id = "/raid/aryan/diffusers-cosmos2-t2i-2B"
61+
>>> pipe = CosmosTextToImagePipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16)
6262
>>> pipe.to("cuda")
6363
64-
>>> prompt = "A sleek, humanoid robot stands in a vast warehouse filled with neatly stacked cardboard boxes on industrial shelves. The robot's metallic body gleams under the bright, even lighting, highlighting its futuristic design and intricate joints. A glowing blue light emanates from its chest, adding a touch of advanced technology. The background is dominated by rows of boxes, suggesting a highly organized storage system. The floor is lined with wooden pallets, enhancing the industrial setting. The camera remains static, capturing the robot's poised stance amidst the orderly environment, with a shallow depth of field that keeps the focus on the robot while subtly blurring the background for a cinematic effect."
64+
>>> prompt = "A close-up shot captures a vibrant yellow scrubber vigorously working on a grimy plate, its bristles moving in circular motions to lift stubborn grease and food residue. The dish, once covered in remnants of a hearty meal, gradually reveals its original glossy surface. Suds form and bubble around the scrubber, creating a satisfying visual of cleanliness in progress. The sound of scrubbing fills the air, accompanied by the gentle clinking of the dish against the sink. As the scrubber continues its task, the dish transforms, gleaming under the bright kitchen lights, symbolizing the triumph of cleanliness over mess."
65+
>>> negative_prompt = "The video captures a series of frames showing ugly scenes, static with no motion, motion blur, over-saturation, shaky footage, low resolution, grainy texture, pixelated images, poorly lit areas, underexposed and overexposed scenes, poor color balance, washed out colors, choppy sequences, jerky movements, low frame rate, artifacting, color banding, unnatural transitions, outdated special effects, fake elements, unconvincing visuals, poorly edited content, jump cuts, visual noise, and flickering. Overall, the video is of poor quality."
6566
66-
>>> output = pipe(prompt=prompt).frames[0]
67-
>>> export_to_video(output, "output.mp4", fps=30)
67+
>>> output = pipe(prompt=prompt, height=1024, width=1024, generator=torch.Generator().manual_seed(1)).images[0]
68+
>>> output.save("output.png")
6869
```
6970
"""
7071

0 commit comments

Comments
 (0)