kenken999 commited on
Commit
5528d9e
1 Parent(s): 706b15d
Files changed (2) hide show
  1. polls/llm/movie.py +13 -0
  2. requirements.txt +10 -0
polls/llm/movie.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from diffusers import StableDiffusion3Pipeline
3
+
4
+ pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16)
5
+ pipe = pipe.to("cuda")
6
+
7
+ image = pipe(
8
+ "A cat holding a sign that says hello world",
9
+ negative_prompt="",
10
+ num_inference_steps=28,
11
+ guidance_scale=7.0,
12
+ ).images[0]
13
+ image
requirements.txt CHANGED
@@ -44,3 +44,13 @@ whitenoise==6.6.0 ; python_version >= "3.10" and python_version < "4.0"
44
  llamafactory
45
  gradio==4.31.5
46
  aiofiles
 
 
 
 
 
 
 
 
 
 
 
44
  llamafactory
45
  gradio==4.31.5
46
  aiofiles
47
+ diffusers
48
+ psycopg2-binary
49
+ accelerate==0.17.1
50
+ git+https://github.com/huggingface/diffusers@9dc8444
51
+ gradio==3.23.0
52
+ huggingface-hub==0.13.3
53
+ imageio[ffmpeg]==2.26.1
54
+ torch==2.0.0
55
+ torchvision==0.15.1
56
+ transformers==4.27.2