ariG23498 HF Staff commited on
Commit
8b454ed
·
verified ·
1 Parent(s): 488ec1b

Upload meituan-longcat_LongCat-Video_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. meituan-longcat_LongCat-Video_0.py +12 -12
meituan-longcat_LongCat-Video_0.py CHANGED
@@ -4,6 +4,8 @@
4
  # "torch",
5
  # "torchvision",
6
  # "transformers",
 
 
7
  # "accelerate",
8
  # "peft",
9
  # "slack-sdk",
@@ -11,13 +13,12 @@
11
  # ///
12
 
13
  try:
14
- # integration status unknown.
15
-
16
- # Please clone model and use locally.
17
 
18
- # Also feel free to open a Pull request
19
- # for integration of the huggingface model hub
20
- # into the corresponding library =)
 
21
  with open('meituan-longcat_LongCat-Video_0.txt', 'w', encoding='utf-8') as f:
22
  f.write('Everything was good in meituan-longcat_LongCat-Video_0.txt')
23
  except Exception as e:
@@ -32,13 +33,12 @@ except Exception as e:
32
  with open('meituan-longcat_LongCat-Video_0.txt', 'a', encoding='utf-8') as f:
33
  import traceback
34
  f.write('''```CODE:
35
- # integration status unknown.
36
-
37
- # Please clone model and use locally.
38
 
39
- # Also feel free to open a Pull request
40
- # for integration of the huggingface model hub
41
- # into the corresponding library =)
42
  ```
43
 
44
  ERROR:
 
4
  # "torch",
5
  # "torchvision",
6
  # "transformers",
7
+ # "diffusers",
8
+ # "sentence-transformers",
9
  # "accelerate",
10
  # "peft",
11
  # "slack-sdk",
 
13
  # ///
14
 
15
  try:
16
+ from diffusers import DiffusionPipeline
 
 
17
 
18
+ pipe = DiffusionPipeline.from_pretrained("meituan-longcat/LongCat-Video")
19
+
20
+ prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
21
+ image = pipe(prompt).images[0]
22
  with open('meituan-longcat_LongCat-Video_0.txt', 'w', encoding='utf-8') as f:
23
  f.write('Everything was good in meituan-longcat_LongCat-Video_0.txt')
24
  except Exception as e:
 
33
  with open('meituan-longcat_LongCat-Video_0.txt', 'a', encoding='utf-8') as f:
34
  import traceback
35
  f.write('''```CODE:
36
+ from diffusers import DiffusionPipeline
37
+
38
+ pipe = DiffusionPipeline.from_pretrained("meituan-longcat/LongCat-Video")
39
 
40
+ prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
41
+ image = pipe(prompt).images[0]
 
42
  ```
43
 
44
  ERROR: