diff --git a/api/requirements.txt b/api/requirements.txt new file mode 100644 index 00000000..2a5295ab --- /dev/null +++ b/api/requirements.txt @@ -0,0 +1,10 @@ +### AI packages ### +diffusers +numpy +onnx +onnxruntime +transformers + +### Server packages ### +flask +stringcase \ No newline at end of file diff --git a/api/test-setup.py b/api/test-setup.py index 7c9739d3..fa01feb1 100644 --- a/api/test-setup.py +++ b/api/test-setup.py @@ -1,11 +1,11 @@ from diffusers import OnnxStableDiffusionPipeline -cfg=8 -steps=22 -height=512 -width=512 +cfg = 8 +steps = 22 +height = 512 +width = 512 prompt = "an astronaut eating a hamburger" pipe = OnnxStableDiffusionPipeline.from_pretrained("../../stable_diffusion_onnx", provider="DmlExecutionProvider", safety_checker=None) image = pipe(prompt, height, width, num_inference_steps=steps, guidance_scale=cfg).images[0] -image.save("test.png") \ No newline at end of file +image.save("../test.png") \ No newline at end of file