Skip to content

Commit

Permalink
turn off whisper app index refresh; it's too slow (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
thundergolfer authored Apr 10, 2024
1 parent 3e5523a commit 55684c7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Binary file added 06_gpu_and_ml/comfyui/comfyui_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 06_gpu_and_ml/comfyui/comfyui_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions 06_gpu_and_ml/openai_whisper/pod_transcriber/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
Image,
Mount,
NetworkFileSystem,
Period,
Secret,
Stub,
asgi_app,
Expand All @@ -36,6 +35,7 @@
"jiwer",
"ffmpeg-python",
"gql[all]~=3.0.0a5",
"python-multipart~=0.0.9",
"pandas",
"loguru==0.6.0",
"torchaudio==2.1.0",
Expand All @@ -56,7 +56,9 @@
secrets=[Secret.from_name("podchaser")],
)

in_progress = Dict.from_name("pod-transcriber-in-progress")
in_progress = Dict.from_name(
"pod-transcriber-in-progress", create_if_missing=True
)


def utc_now() -> datetime.datetime:
Expand Down Expand Up @@ -143,7 +145,6 @@ def search_podcast(name):

@stub.function(
image=search_image,
schedule=Period(hours=4),
network_file_systems={config.CACHE_DIR: volume},
timeout=(400 * 60),
)
Expand Down Expand Up @@ -289,6 +290,7 @@ def split_silences(
image=app_image,
network_file_systems={config.CACHE_DIR: volume},
cpu=2,
timeout=400,
)
def transcribe_segment(
start: float,
Expand Down
1 change: 1 addition & 0 deletions 06_gpu_and_ml/stable_diffusion/foo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"last_node_id": 9, "last_link_id": 9, "nodes": [{"id": 7, "type": "CLIPTextEncode", "pos": [413, 389], "size": {"0": 425.27801513671875, "1": 180.6060791015625}, "flags": {}, "order": 3, "mode": 0, "inputs": [{"name": "clip", "type": "CLIP", "link": 5}], "outputs": [{"name": "CONDITIONING", "type": "CONDITIONING", "links": [6], "slot_index": 0}], "properties": {"Node name for S&R": "CLIPTextEncode"}, "widgets_values": ["text, watermark"]}, {"id": 6, "type": "CLIPTextEncode", "pos": [415, 186], "size": {"0": 422.84503173828125, "1": 164.31304931640625}, "flags": {}, "order": 2, "mode": 0, "inputs": [{"name": "clip", "type": "CLIP", "link": 3}], "outputs": [{"name": "CONDITIONING", "type": "CONDITIONING", "links": [4], "slot_index": 0}], "properties": {"Node name for S&R": "CLIPTextEncode"}, "widgets_values": ["beautiful scenery nature glass bottle landscape, , purple galaxy bottle,"]}, {"id": 5, "type": "EmptyLatentImage", "pos": [473, 609], "size": {"0": 315, "1": 106}, "flags": {}, "order": 0, "mode": 0, "outputs": [{"name": "LATENT", "type": "LATENT", "links": [2], "slot_index": 0}], "properties": {"Node name for S&R": "EmptyLatentImage"}, "widgets_values": [512, 512, 1]}, {"id": 3, "type": "KSampler", "pos": [863, 186], "size": {"0": 315, "1": 262}, "flags": {}, "order": 4, "mode": 0, "inputs": [{"name": "model", "type": "MODEL", "link": 1}, {"name": "positive", "type": "CONDITIONING", "link": 4}, {"name": "negative", "type": "CONDITIONING", "link": 6}, {"name": "latent_image", "type": "LATENT", "link": 2}], "outputs": [{"name": "LATENT", "type": "LATENT", "links": [7], "slot_index": 0}], "properties": {"Node name for S&R": "KSampler"}, "widgets_values": [156680208700286, "randomize", 20, 8, "euler", "normal", 1]}, {"id": 8, "type": "VAEDecode", "pos": [1209, 188], "size": {"0": 210, "1": 46}, "flags": {}, "order": 5, "mode": 0, "inputs": [{"name": "samples", "type": "LATENT", "link": 7}, {"name": "vae", "type": "VAE", "link": 8}], "outputs": [{"name": "IMAGE", "type": "IMAGE", "links": [9], "slot_index": 0}], "properties": {"Node name for S&R": "VAEDecode"}}, {"id": 9, "type": "SaveImage", "pos": [1451, 189], "size": {"0": 210, "1": 58}, "flags": {}, "order": 6, "mode": 0, "inputs": [{"name": "images", "type": "IMAGE", "link": 9}], "properties": {}, "widgets_values": ["ComfyUI"]}, {"id": 4, "type": "CheckpointLoaderSimple", "pos": [26, 474], "size": {"0": 315, "1": 98}, "flags": {}, "order": 1, "mode": 0, "outputs": [{"name": "MODEL", "type": "MODEL", "links": [1], "slot_index": 0}, {"name": "CLIP", "type": "CLIP", "links": [3, 5], "slot_index": 1}, {"name": "VAE", "type": "VAE", "links": [8], "slot_index": 2}], "properties": {"Node name for S&R": "CheckpointLoaderSimple"}, "widgets_values": ["dreamlike-photoreal-2.0.safetensors"]}], "links": [[1, 4, 0, 3, 0, "MODEL"], [2, 5, 0, 3, 3, "LATENT"], [3, 4, 1, 6, 0, "CLIP"], [4, 6, 0, 3, 1, "CONDITIONING"], [5, 4, 1, 7, 0, "CLIP"], [6, 7, 0, 3, 2, "CONDITIONING"], [7, 3, 0, 8, 0, "LATENT"], [8, 4, 2, 8, 1, "VAE"], [9, 8, 0, 9, 0, "IMAGE"]], "groups": [], "config": {}, "extra": {}, "version": 0.4}

0 comments on commit 55684c7

Please sign in to comment.