diff --git a/.drone.yml b/.drone.yml index 7a0df50..762b411 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,7 +5,9 @@ name: default clone: disable: true -# 私有镜像拉取凭证密钥 +# 私有仓库的拉取凭证密钥,在服务器登录私有仓库:docker login 私有仓库地址 +# 然后复制 /root/.docker/config.json 里面的所有内容,到 drone 项目的 Secrets +# 中,新建 Secrets,名字填 docker_auth_config,值 是刚复制的内容 image_pull_secrets: - docker_auth_config diff --git a/__pycache__/main.cpython-310.pyc b/__pycache__/main.cpython-310.pyc new file mode 100644 index 0000000..cbe8a9a Binary files /dev/null and b/__pycache__/main.cpython-310.pyc differ diff --git a/ai/__pycache__/__init__.cpython-310.pyc b/ai/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..7a4e85e Binary files /dev/null and b/ai/__pycache__/__init__.cpython-310.pyc differ diff --git a/ai/__pycache__/checkHandStatic.cpython-310.pyc b/ai/__pycache__/checkHandStatic.cpython-310.pyc new file mode 100644 index 0000000..7d6a522 Binary files /dev/null and b/ai/__pycache__/checkHandStatic.cpython-310.pyc differ diff --git a/ai/black-forest-labs.py b/ai/black-forest-labs.py index e69de29..8e046df 100644 --- a/ai/black-forest-labs.py +++ b/ai/black-forest-labs.py @@ -0,0 +1,18 @@ +import torch +from diffusers import FluxPipeline + +access_token = "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" +pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16, token=access_token) +pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power + +prompt = "A cat holding a sign that says hello world" +image = pipe( + prompt, + height=1024, + width=1024, + guidance_scale=3.5, + num_inference_steps=50, + max_sequence_length=512, + generator=torch.Generator("cpu").manual_seed(0) +).images[0] +image.save("flux-dev.png") \ No newline at end of file