yeonghoon.kim

  • 게시판
  • 갤러리
  • aws

Stable Diffusion 설치 - rockylinux9 [테스트 - 나 / 정리 -chatgpt]

김영훈 2024.01.02 15:27 조회 수 : 738

0. 환경 설정

  • 시스템: Rocky Linux 9
  • Python 버전: 3.9
  • 기타 설정: SELinux 및 방화벽 비활성화

1. Pip 설치

  1. Python 패키지 관리자 Pip 설치:
    dnf install -y python-pip   
  2. Pip 업그레이드:
    python -m pip install --upgrade pip   

2. Git 설치

  • Git 설치:
    dnf install -y git   

3. Stable Diffusion 소스 다운로드

  • Stable Diffusion 리포지토리 클론:
    git clone https://github.com/Stability-AI/stablediffusion   

4. Python 모듈 설치

  1. 클론된 디렉토리로 이동:
    cd stablediffusion   
  2. 필요한 Python 모듈 설치:
    pip install -r requirements.txt   

5. Classic Img2Img 사용 방법

  • 명령어:
    python scripts/img2img.py --prompt "A fantasy landscape, trending on artstation" --init-img <path-to-img.jpg> --strength 0.8 --ckpt <path/to/model.ckpt>   

6. Text-to-Image 사용 방법

  • 가중치 파일(SD2.1-v, SD2.1-base) 다운로드 필요
  • 명령어:
    python scripts/txt2img.py --prompt "a professional photograph of an astronaut riding a horse" --ckpt <path/to/768model.ckpt/> --config configs/stable-diffusion/v2-inference-v.yaml --H 768 --W 768    

참고사항:

  • SELinux 및 방화벽 비활성화는 시스템 보안에 영향을 줄 수 있으므로, 필요에 따라 적절한 보안 조치를 취하는 것이 중요합니다.
  • Stable Diffusion의 사용과 관련하여 추가 설정이 필요한 경우 해당 프로젝트의 공식 문서를 참조하십시오.

  • 추천 0

  • 비추천 0
이 게시물을
목록

댓글 1

  • 김영훈

    2024.01.02 15:29

    ### 인프라 엔지니어를 위한 Stable Diffusion 설치 및 사용 매뉴얼

    #### 0. 환경 설정
    - **시스템**: Rocky Linux 9
    - **Python 버전**: 3.9
    - **기타 설정**: SELinux 및 방화벽 비활성화

    #### 1. Pip 설치
    1. Python 패키지 관리자 Pip 설치:
       ```bash
       dnf install -y python-pip
       ```
    2. Pip 업그레이드:
       ```bash
       python -m pip install --upgrade pip
       ```

    #### 2. Git 설치
    - Git 설치:
      ```bash
      dnf install -y git
      ```

    #### 3. Stable Diffusion 소스 다운로드
    - Stable Diffusion 리포지토리 클론:
      ```bash
      git clone https://github.com/Stability-AI/stablediffusion
      ```

    #### 4. Python 모듈 설치
    1. 클론된 디렉토리로 이동:
       ```bash
       cd stablediffusion
       ```
    2. 필요한 Python 모듈 설치:
       ```bash
       pip install -r requirements.txt
       ```

    #### 5. Classic Img2Img 사용 방법
    - 명령어:
      ```bash
      python scripts/img2img.py --prompt "A fantasy landscape, trending on artstation" --init-img <path-to-img.jpg> --strength 0.8 --ckpt <path/to/model.ckpt>
      ```

    #### 6. Text-to-Image 사용 방법
    - 가중치 파일(SD2.1-v, SD2.1-base) 다운로드 필요
    - 명령어:
      ```bash
      python scripts/txt2img.py --prompt "a professional photograph of an astronaut riding a horse" --ckpt <path/to/768model.ckpt/> --config configs/stable-diffusion/v2-inference-v.yaml --H 768 --W 768  
      ```

    ---

    **참고사항:**
    - SELinux 및 방화벽 비활성화는 시스템 보안에 영향을 줄 수 있으므로, 필요에 따라 적절한 보안 조치를 취하는 것이 중요합니다.
    - Stable Diffusion의 사용과 관련하여 추가 설정이 필요한 경우 해당 프로젝트의 공식 문서를 참조하십시오.

    추천0 비추천0 댓글

사진 및 파일 첨부

여기에 파일을 끌어 놓거나 왼쪽의 버튼을 클릭하세요.

파일 용량 제한 : 0MB (허용 확장자 : *.*)

업로드 중... (0%)

0개 첨부 됨 ( / )
 
번호 제목 글쓴이 날짜 조회 수
공지 2025 일본 여행 계획 김영훈 2024.10.10 983
공지 현금, 저축, 투자, 지출, 예산, 보험 내역(2024-05-30) 김영훈 2024.03.10 636
265 BPFDoor 악성코드 통합 점검 스크립트 (KISA 가이드 기반) 김영훈 2025.05.16 114
264 error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive] 김영훈 2025.05.08 63
263 prometheus, grafana, node-exporter 임시 김영훈 2025.01.03 299
262 MegaCli64 Hotspare 구성 김영훈 2024.11.11 518
261 12월 기타큐슈 2박 3일 관련 김영훈 2024.11.08 444
260 rockylinux8 php7.2 -> php7.4 업그레이드 : dnf module 기능 이용 김영훈 2024.10.14 592
259 rockylinux8 apache-2.4.16, php-5.3.29 설치 file 김영훈 2024.10.11 616
258 정보보안기사 오답노트 김영훈 2024.10.01 439
257 달력 이미지(chatgpt) file 김영훈 2024.09.05 643
256 백업된 디스크 복구 김영훈 2024.06.13 549
255 openai api를 이용한 챗봇 구현 샘플 김영훈 2024.06.11 562
254 Dev-C++ 5.11 설치 매뉴얼 file 김영훈 2024.03.09 861
253 오라클 클라우드 arm 환경에서 Palworld 서버 구축 [11] 김영훈 2024.01.29 1506
252 리눅스 공인 아이피 확인 - curl ipinfo.io 김영훈 2024.01.29 562
251 Oracle 9i cx_Oracle 클라이언트 연결 방법 [1] 김영훈 2024.01.12 660
250 error: rpmdb: BDB2034 unable to allocate memory for mutex; resize mutex region [1] 김영훈 2024.01.08 710
249 마크다운 TIL 템플릿 김영훈 2024.01.03 560
» Stable Diffusion 설치 - rockylinux9 [테스트 - 나 / 정리 -chatgpt] [1] 김영훈 2024.01.02 738
247 AttributeError: module 'tarfile' has no attribute 'data_filter' 에러 김영훈 2024.01.02 718
246 2023년 월간 소비 비중 file 김영훈 2024.01.01 359
쓰기 태그
 첫 페이지 1 2 3 4 5 6 7 8 9 10 끝 페이지