File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
shark/examples/shark_inference/stable_diffusion Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11import os
2+ import sys
3+
4+ if "AMD_ENABLE_LLPC" not in os .environ :
5+ os .environ ["AMD_ENABLE_LLPC" ] = "1"
26
3- os .environ ["AMD_ENABLE_LLPC" ] = "1"
7+ if sys .platform == "darwin" :
8+ os .environ ["DYLD_LIBRARY_PATH" ] = "/usr/local/lib"
49
510from transformers import CLIPTextModel , CLIPTokenizer
611import torch
4853 SharkEulerDiscreteScheduler ,
4954)
5055import time
51- import sys
5256from shark .iree_utils .compile_utils import dump_isas
5357
5458# Helper function to profile the vulkan device.
Original file line number Diff line number Diff line change 11import os
2+ import sys
23from pathlib import Path
34
4- os .environ ["AMD_ENABLE_LLPC" ] = "1"
5+ if "AMD_ENABLE_LLPC" not in os .environ :
6+ os .environ ["AMD_ENABLE_LLPC" ] = "1"
7+
8+ if sys .platform == "darwin" :
9+ os .environ ["DYLD_LIBRARY_PATH" ] = "/usr/local/lib"
10+
511import gradio as gr
612from PIL import Image
713from models .stable_diffusion .resources import resource_path , prompt_examples
You can’t perform that action at this time.
0 commit comments