Update worker_runpod.py
Browse files- worker_runpod.py +3 -9
worker_runpod.py
CHANGED
@@ -71,17 +71,11 @@ def download_image(url, download_dir="asset"):
|
|
71 |
# validation_image_start = values.get("validation_image_start", "https://example.com/path/to/image.png")
|
72 |
# downloaded_image_path = download_image(validation_image_start)
|
73 |
model_id = "/content/model"
|
74 |
-
transformer = CogVideoXTransformer3DModel.from_pretrained_2d(
|
75 |
-
model_id, subfolder="transformer", torch_dtype=torch.bfloat16
|
76 |
-
).to(torch.bfloat16)
|
77 |
|
78 |
-
vae = AutoencoderKLCogVideoX.from_pretrained(
|
79 |
-
model_id, subfolder="vae"
|
80 |
-
).to(torch.bfloat16)
|
81 |
|
82 |
-
text_encoder = T5EncoderModel.from_pretrained(
|
83 |
-
model_id, subfolder="text_encoder", torch_dtype=torch.bfloat16
|
84 |
-
)
|
85 |
|
86 |
sampler_dict = {
|
87 |
"Euler": EulerDiscreteScheduler,
|
|
|
71 |
# validation_image_start = values.get("validation_image_start", "https://example.com/path/to/image.png")
|
72 |
# downloaded_image_path = download_image(validation_image_start)
|
73 |
model_id = "/content/model"
|
74 |
+
transformer = CogVideoXTransformer3DModel.from_pretrained_2d(model_id, subfolder="transformer").to(torch.bfloat16)
|
|
|
|
|
75 |
|
76 |
+
vae = AutoencoderKLCogVideoX.from_pretrained(model_id, subfolder="vae").to(torch.bfloat16)
|
|
|
|
|
77 |
|
78 |
+
text_encoder = T5EncoderModel.from_pretrained(model_id, subfolder="text_encoder")
|
|
|
|
|
79 |
|
80 |
sampler_dict = {
|
81 |
"Euler": EulerDiscreteScheduler,
|